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 SummaryFields inherited from class com.logicaldoc.core.PersistentObjectDELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id
- 
Method SummaryModifier 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.PersistentObjectgetCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId
- 
Method Details- 
getName
- 
getLabel
- 
setName
- 
setLabel
- 
getDocId
- 
getFolderId
- 
setDocId
- 
setFolderId
- 
getDescription
- 
setDescription
- 
collectpublic 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 Error
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.core.automation.AutomationException- Error in the automation engine
 
- 
toString- Overrides:
- toStringin class- com.logicaldoc.core.PersistentObject
 
- 
newSamplerpublic 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 class
- InstantiationException- Error instantiating the sampler implementation
- IllegalAccessException- The implementation class exists but cannot be accessed
- IllegalArgumentException- No implementation found for the given type
- InvocationTargetException- The constructor raised an error
- NoSuchMethodException- No empty constructor
- SecurityException- The implementation class exists but cannot be accessed
 
- 
types
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- com.logicaldoc.core.PersistentObject
 
- 
equals- Overrides:
- equalsin class- com.logicaldoc.core.PersistentObject
 
 
-