Class JodConverterMetadataExtracter

    • Constructor Detail

      • JodConverterMetadataExtracter

        public JodConverterMetadataExtracter()
      • JodConverterMetadataExtracter

        public JodConverterMetadataExtracter​(java.util.Set<java.lang.String> supportedMimetypes)
    • Method Detail

      • isConnected

        public boolean isConnected()
        Specified by:
        isConnected in interface OpenOfficeMetadataWorker
        Returns:
        Returns true if a connection to the Uno server could be established
      • extractRaw

        public java.util.Map<java.lang.String,​java.io.Serializable> extractRaw​(org.alfresco.service.cmr.repository.ContentReader reader)
                                                                              throws java.lang.Throwable
        Override to provide the raw extracted metadata values. An extracter should extract as many of the available properties as is realistically possible. Even if the default mapping doesn't handle all properties, it is possible for each instance of the extracter to be configured differently and more or less of the properties may be used in different installations.

        Raw values must not be trimmed or removed for any reason. Null values and empty strings are

        • Null: Removed
        • Empty String: Passed to the OverwritePolicy
        • Non Serializable: Converted to String or fails if that is not possible

        Properties extracted and their meanings and types should be thoroughly described in the class-level javadocs of the extracter implementation, for example:

         editor: - the document editor        -->  cm:author
         title:  - the document title         -->  cm:title
         user1:  - the document summary
         user2:  - the document description   -->  cm:description
         user3:  -
         user4:  -
         
        Specified by:
        extractRaw in interface OpenOfficeMetadataWorker
        Specified by:
        extractRaw in class AbstractMappingMetadataExtracter
        Parameters:
        reader - the document to extract the values from. This stream provided by the reader must be closed if accessed directly.
        Returns:
        Returns a map of document property values keyed by property name.
        Throws:
        java.lang.Throwable - All exception conditions can be handled.
        See Also:
        AbstractMappingMetadataExtracter.getDefaultMapping()