Interface MetadataLoader

All Known Implementing Classes:
PropertiesFileMetadataLoader, XmlPropertiesFileMetadataLoader

public interface MetadataLoader
Definition of a metadata loader - a class that can load metadata for a file from some other source. Note that metadata loaders can be "chained", so an implementation needs to be careful about how the Metadata object is populated in the populateMetadata method. Implementors also need to be careful when configuring the bulk import process, as the order in which metadata loaders are configured into a bulk importer is the order of precendence (from lowest to highest).
Since:
4.0
  • Field Details

    • METADATA_SUFFIX

      static final String METADATA_SUFFIX
      Metadata filename suffix (excluding file-type specific ending)
      See Also:
  • Method Details

    • getMetadataFileExtension

      String getMetadataFileExtension()
      Returns:
      The extension for files used to store this metadata, minus the stop character (.) e.g. "properties", "xml", "json", etc.
    • loadMetadata

      void loadMetadata(ImportableItem.ContentAndMetadata contentAndMetadata, MetadataLoader.Metadata metadata)
      Method that populates the type, aspects and properties to attach to a given file or space.
      Parameters:
      contentAndMetadata - The contentAndMetadata from which to obtain the metadata (will not be null).
      metadata - The metadata object to populate (will not be null, and may already be partially populated).