Package com.logicaldoc.ai.sampler
Class Sampler
java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.ai.sampler.Sampler
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
- Direct Known Subclasses:
ChainSampler,MetadataSampler,StreamSampler
@Entity
public abstract class Sampler
extends com.logicaldoc.core.PersistentObject
implements Closeable
This is responsible of collecting all the samples required to train an
AIModel- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
-
Field Summary
Fields inherited from class com.logicaldoc.core.PersistentObject
DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id -
Method Summary
Modifier and TypeMethodDescriptionabstract Samplingcollect()Collects a list of samplesbooleangetDocId()getLabel()getName()inthashCode()static SamplernewSampler(String type) Factory method for instantiating a new samplervoidsetDescription(String description) voidvoidsetFolderId(Long folderId) voidvoidtoString()types()Methods inherited from class com.logicaldoc.core.PersistentObject
getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId
-
Method Details
-
getName
-
getLabel
-
setName
-
setLabel
-
getDocId
-
getFolderId
-
setDocId
-
setFolderId
-
getDescription
-
setDescription
-
collect
public abstract Sampling collect() throws IOException, com.logicaldoc.core.PersistenceException, com.logicaldoc.core.automation.AutomationExceptionCollects a list of samples- Returns:
- The iterator over the samples
- Throws:
IOException- I/O Errorcom.logicaldoc.core.PersistenceException- Error in the data layercom.logicaldoc.core.automation.AutomationException- Error in the automation engine
-
toString
- Overrides:
toStringin classcom.logicaldoc.core.PersistentObject
-
newSampler
public static Sampler newSampler(String type) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException Factory method for instantiating a new sampler- Parameters:
type- Type of sampler, matches the discriminator value- Returns:
- The new sampler
- Throws:
ClassNotFoundException- The class loader was unable to load the sampler classInstantiationException- Error instantiating the sampler implementationIllegalAccessException- The implementation class exists but cannot be accessedIllegalArgumentException- No implementation found for the given typeInvocationTargetException- The constructor raised an errorNoSuchMethodException- No empty constructorSecurityException- The implementation class exists but cannot be accessed
-
types
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.logicaldoc.core.PersistentObject
-
equals
- Overrides:
equalsin classcom.logicaldoc.core.PersistentObject
-