Class DocumentMetadata

java.lang.Object
org.apache.camel.component.docling.DocumentMetadata

public class DocumentMetadata extends Object
Represents metadata extracted from a document.
  • Constructor Details

    • DocumentMetadata

      public DocumentMetadata()
  • Method Details

    • getTitle

      public String getTitle()
      Gets the document title.
      Returns:
      document title
    • setTitle

      public void setTitle(String title)
    • getAuthor

      public String getAuthor()
      Gets the document author.
      Returns:
      author name
    • setAuthor

      public void setAuthor(String author)
    • getCreator

      public String getCreator()
      Gets the creator (application that created the document).
      Returns:
      creator application name
    • setCreator

      public void setCreator(String creator)
    • getProducer

      public String getProducer()
      Gets the producer (application that produced the PDF, if applicable).
      Returns:
      producer application name
    • setProducer

      public void setProducer(String producer)
    • getSubject

      public String getSubject()
      Gets the document subject.
      Returns:
      document subject
    • setSubject

      public void setSubject(String subject)
    • getKeywords

      public String getKeywords()
      Gets the document keywords.
      Returns:
      keywords as a comma-separated string
    • setKeywords

      public void setKeywords(String keywords)
    • getCreationDate

      public Instant getCreationDate()
      Gets the document creation date.
      Returns:
      creation date
    • setCreationDate

      public void setCreationDate(Instant creationDate)
    • getModificationDate

      public Instant getModificationDate()
      Gets the document modification date.
      Returns:
      modification date
    • setModificationDate

      public void setModificationDate(Instant modificationDate)
    • getPageCount

      public Integer getPageCount()
      Gets the number of pages in the document.
      Returns:
      page count
    • setPageCount

      public void setPageCount(Integer pageCount)
    • getLanguage

      public String getLanguage()
      Gets the document language.
      Returns:
      language code (e.g., "en", "fr", "de")
    • setLanguage

      public void setLanguage(String language)
    • getDocumentType

      public String getDocumentType()
      Gets the document type/format.
      Returns:
      document type (e.g., "PDF", "DOCX", "PPTX")
    • setDocumentType

      public void setDocumentType(String documentType)
    • getFormat

      public String getFormat()
      Gets the MIME type or format identifier.
      Returns:
      format (e.g., "application/pdf")
    • setFormat

      public void setFormat(String format)
    • getFileSizeBytes

      public Long getFileSizeBytes()
      Gets the file size in bytes.
      Returns:
      file size
    • setFileSizeBytes

      public void setFileSizeBytes(Long fileSizeBytes)
    • getFileName

      public String getFileName()
      Gets the file name.
      Returns:
      file name
    • setFileName

      public void setFileName(String fileName)
    • getFilePath

      public String getFilePath()
      Gets the file path.
      Returns:
      file path
    • setFilePath

      public void setFilePath(String filePath)
    • getCustomMetadata

      public Map<String,Object> getCustomMetadata()
      Gets custom metadata fields.
      Returns:
      map of custom metadata fields
    • setCustomMetadata

      public void setCustomMetadata(Map<String,Object> customMetadata)
    • addCustomMetadata

      public void addCustomMetadata(String key, Object value)
      Adds a custom metadata field.
      Parameters:
      key - the field name
      value - the field value
    • getRawMetadata

      public Map<String,Object> getRawMetadata()
      Gets the raw metadata as returned by the parser.
      Returns:
      map of raw metadata
    • setRawMetadata

      public void setRawMetadata(Map<String,Object> rawMetadata)
    • addRawMetadata

      public void addRawMetadata(String key, Object value)
      Adds a raw metadata field.
      Parameters:
      key - the field name
      value - the field value
    • hasTitle

      public boolean hasTitle()
      Checks if the metadata has a title.
      Returns:
      true if title is present
    • hasAuthor

      public boolean hasAuthor()
      Checks if the metadata has an author.
      Returns:
      true if author is present
    • hasPageCount

      public boolean hasPageCount()
      Checks if the metadata has a page count.
      Returns:
      true if page count is present
    • toString

      public String toString()
      Overrides:
      toString in class Object