Class TikaField

    • Constructor Detail

      • TikaField

        public TikaField()
        Creates a new Tika field corresponding to the Tika content: its Tika name is null and its MG4J name text.
      • TikaField

        public TikaField​(String tikaName)
        Creates a new Tika field with given Tika name and the same MG4J name.
        Parameters:
        tikaName - the Tika name of the field, which will be used also as MG4J name.
      • TikaField

        public TikaField​(String mg4jName,
                         String tikaName)
        Creates a new Tika field with given Tika name and given MG4J name.
        Parameters:
        mg4jName - the MG4J name of the field.
        tikaName - the Tika name of the field.
    • Method Detail

      • mg4jName

        public String mg4jName()
        The MG4J name of this field.
        Returns:
        the MG4J name.
      • tikaName

        public String tikaName()
        The Tika name of this field (null for the Tika content).
        Returns:
        the Tika name.
      • contentFromMetadata

        public String contentFromMetadata​(org.apache.tika.metadata.Metadata metadata)
        Gets the content of this Tika field from the given metadata.
        Parameters:
        metadata - the metadata.
        Returns:
        the content of this Tika field.
      • isBody

        public boolean isBody()
        Returns true if this field represents the Tika content.
        Returns:
        true iff this field is the Tika content.