Class MetacardCreator

java.lang.Object
ddf.catalog.transformer.common.tika.MetacardCreator

public class MetacardCreator extends Object
Creates Metacards from Tika Metadata objects.
  • Field Details

  • Method Details

    • createMetacard

      public static ddf.catalog.data.Metacard createMetacard(org.apache.tika.metadata.Metadata metadata, String id, String metadataXml, ddf.catalog.data.MetacardType metacardType)
      Parameters:
      metadata - the Metadata object containing the metadata relevant to the metacard, must not be null
      id - the value for the Metacard.ID attribute that should be set in the generated Metacard, may be null
      metadataXml - the XML for the Metacard.METADATA attribute that should be set in the generated Metacard, may be null
      metacardType - The MetacardType for the created metacard
      Returns:
      a new Metacard
    • createMetacard

      public static ddf.catalog.data.Metacard createMetacard(org.apache.tika.metadata.Metadata metadata, String id, String metadataXml, ddf.catalog.data.MetacardType metacardType, boolean useMetadataTitle)
      Parameters:
      metadata - the Metadata object containing the metadata relevant to the metacard, must not be null
      id - the value for the Metacard.ID attribute that should be set in the generated Metacard, may be null
      metadataXml - the XML for the Metacard.METADATA attribute that should be set in the generated Metacard, may be null
      metacardType - The MetacardType for the created metacard
      useMetadataTitle - If true then use title from the metadata as the metacard title
      Returns:
      a new Metacard