Class MetadataSampler

java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.ai.sampler.Sampler
com.logicaldoc.ai.sampler.MetadataSampler
All Implemented Interfaces:
Closeable, Serializable, AutoCloseable

@Entity public class MetadataSampler extends Sampler
A Sampler that extract samples from a list of extensible objects. By default the extended attributes are considered as the features, and so the provided collection of objects must share the same attributes scheme. But with the Automation you may extract whatever data for each object.
Since:
9.2
Author:
Marco Meschieri - LogicalDOC
See Also:
  • Constructor Details

    • MetadataSampler

      public MetadataSampler()
    • MetadataSampler

      public MetadataSampler(List<com.logicaldoc.core.metadata.ExtensibleObject> source)
  • Method Details

    • getAutomation

      public String getAutomation()
    • setAutomation

      public void setAutomation(String extractSamplesAutomation)
    • getSource

      public List<com.logicaldoc.core.metadata.ExtensibleObject> getSource()
    • setSource

      public void setSource(List<com.logicaldoc.core.metadata.ExtensibleObject> source)
    • getCategory

      public String getCategory()
    • setCategory

      public void setCategory(String category)
    • getFeatures

      public String getFeatures()
    • getFeaturesList

      public List<String> getFeaturesList()
    • setFeatures

      public void setFeatures(String features)
    • close

      public void close() throws IOException
      Throws:
      IOException
    • collect

      public Sampling collect() throws IOException, com.logicaldoc.core.PersistenceException, com.logicaldoc.core.automation.AutomationException
      Description copied from class: Sampler
      Collects a list of samples
      Specified by:
      collect in class Sampler
      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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Sampler
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Sampler