com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class SearchFacade



  • public class SearchFacade
    extends Object

    Find and Replace API implementation.


    Could not be used in evaluation mode.

    • Constructor Detail

      • SearchFacade

        public SearchFacade()
    • Method Detail

      • scanDocument

        public static MetadataPropertyCollection scanDocument(String path,
                                              String propertyOrPhrase,
                                              int searchCondition)

        Scans properties in document. Available for document formats like Word, PDF, PowerPoint and Excel.

        Parameters:
        path - Absolute path to the document.
        propertyOrPhrase - The property or phrase.
        searchCondition - Defines how to search result.
        Returns:
        MetadataPropertyCollection.
      • scanDocument

        public static MetadataPropertyCollection scanDocument(String path,
                                              String propertyOrPhrase)

        Scans properties in document. Available for document formats like Word, PDF, PowerPoint and Excel.

        Parameters:
        path - Absolute path to the document.
        propertyOrPhrase - The property or phrase.
        Returns:
        MetadataPropertyCollection.
      • scanDocument

        public static MetadataPropertyCollection scanDocument(InputStream stream,
                                              String propertyOrPhrase,
                                              int searchCondition)

        Scans properties in document. Available for document formats like Word, PDF, PowerPoint and Excel.

        Parameters:
        stream - Document stream.
        propertyOrPhrase - The property or phrase.
        searchCondition - Defines how to search result.
        Returns:
        MetadataPropertyCollection.
      • scanDocument

        public static MetadataPropertyCollection scanDocument(InputStream stream,
                                              String propertyOrPhrase)

        Scans properties in document. Available for document formats like Word, PDF, PowerPoint and Excel.

        Parameters:
        stream - Document stream.
        propertyOrPhrase - The property or phrase.
        Returns:
        MetadataPropertyCollection.
      • scanXmp

        public static XmpNodeView[] scanXmp(String path,
                            String propertyOrPhrase,
                            int searchCondition)

        Scans the XMP metadata. Available for image formats.

        Parameters:
        path - Absolute path to the file with XMP metadata.
        propertyOrPhrase - XMP property name or XMP property value.
        searchCondition - Defines how to search result.
        Returns:
        The array of XmpNodeView.
      • scanXmp

        public static XmpNodeView[] scanXmp(String path,
                            String propertyOrPhrase)

        Scans the XMP metadata. Available for image formats.

        Parameters:
        path - Absolute path to the file with XMP metadata.
        propertyOrPhrase - XMP property name or XMP property value.
        Returns:
        The array of XmpNodeView.
      • scanXmp

        public static XmpNodeView[] scanXmp(InputStream stream,
                            String propertyOrPhrase,
                            int searchCondition)

        Scans the XMP metadata. Available for image formats.

        Parameters:
        stream - File stream with XMP metadata.
        propertyOrPhrase - XMP property name or XMP property value.
        searchCondition - Defines how to search result.
        Returns:
        The array of XmpNodeView.
      • scanXmp

        public static XmpNodeView[] scanXmp(InputStream stream,
                            String propertyOrPhrase)

        Scans the XMP metadata. Available for image formats.

        Parameters:
        stream - File stream with XMP metadata.
        propertyOrPhrase - XMP property name or XMP property value.
        Returns:
        The array of XmpNodeView.
      • scanExif

        public static ExifProperty[] scanExif(String path,
                              String propertyOrPhrase,
                              int searchCondition)

        Scans the EXIF metadata. Available for image formats like Jpeg, Tiff.

        Parameters:
        path - Path to file with EXIF metadata.
        propertyOrPhrase - EXIF property name or EXIF property value.
        searchCondition - Defines how to search result.
        Returns:
        The array of ExifProperty.
      • scanExif

        public static ExifProperty[] scanExif(String path,
                              String propertyOrPhrase)

        Scans the EXIF metadata. Available for image formats like Jpeg, Tiff.

        Parameters:
        path - Path to file with EXIF metadata.
        propertyOrPhrase - EXIF property name or EXIF property value.
        Returns:
        The array of ExifProperty
      • scanExif

        public static ExifProperty[] scanExif(InputStream stream,
                              String propertyOrPhrase,
                              int searchCondition)

        Scans the EXIF metadata. Available for image formats like Jpeg, Tiff.

        Parameters:
        stream - Stream with EXIF metadata.
        propertyOrPhrase - EXIF property name or EXIF property value.
        searchCondition - Defines how to search result.
        Returns:
        The array of ExifProperty.
      • scanExif

        public static ExifProperty[] scanExif(InputStream stream,
                              String propertyOrPhrase)

        Scans the EXIF metadata. Available for image formats like Jpeg, Tiff.

        Parameters:
        stream - Stream with EXIF metadata.
        propertyOrPhrase - EXIF property name or EXIF property value.
        Returns:
        The array of ExifProperty.
      • replaceInDocument

        public static int replaceInDocument(String path,
                            IReplaceHandler<MetadataProperty> replaceHandler)

        Replaces metadata properties in document formats using custom IReplaceHandler.

        Parameters:
        path - Absolute path to the target file.
        replaceHandler - Instance of IReplaceHandler.
        Returns:
        The number of affected properties.
      • replaceInDocument

        public static int replaceInDocument(InputStream stream,
                            IReplaceHandler<MetadataProperty> replaceHandler)

        Replaces metadata properties in document formats using custom IReplaceHandler.

        Parameters:
        stream - Document stream.
        replaceHandler - Replace handler.
        Returns:
        The number of affected properties.
      • replaceInDocument

        public static int replaceInDocument(String path,
                            String propertyOrPhrase,
                            String replaceWith,
                            int searchCondition,
                            String outputPath)

        Replaces metadata properties in document formats.

        Parameters:
        path - Absolute path to the target file.
        propertyOrPhrase - The property or phrase.
        replaceWith - Replacing value.
        searchCondition - Search condition.
        outputPath - Absolute path to the output path.
        Returns:
        The number of affected properties.
      • replaceInDocument

        public static int replaceInDocument(String path,
                            String propertyOrPhrase,
                            String replaceWith,
                            String outputPath)

        Replaces metadata properties in document formats.

        Parameters:
        path - Absolute path to the target file.
        propertyOrPhrase - The property or phrase.
        replaceWith - Replacing value.
        outputPath - Absolute path to the output path.
        Returns:
        The number of affected properties.
      • replaceInDocument

        public static int replaceInDocument(InputStream stream,
                            String propertyOrPhrase,
                            String replaceWith,
                            int searchCondition,
                            String outputPath)

        Replaces metadata properties in document formats.

        Parameters:
        stream - Document stream.
        propertyOrPhrase - The property or phrase.
        replaceWith - Replacing value.
        searchCondition - Search condition.
        outputPath - Absolute path to the output path.
        Returns:
        The number of affected properties.
      • replaceInDocument

        public static int replaceInDocument(InputStream stream,
                            String propertyOrPhrase,
                            String replaceWith,
                            String outputPath)

        Replaces metadata properties in document formats.

        Parameters:
        stream - Document stream.
        propertyOrPhrase - The property or phrase.
        replaceWith - Replacing value.
        outputPath - Absolute path to the output path.
        Returns:
        The number of affected properties.
      • replaceInXmp

        public static int replaceInXmp(String path,
                       String propertyOrPhrase,
                       String replaceWith,
                       String outputPath)

        Replaces XMP metadata properties.

        Parameters:
        path - Absolute path to the target file.
        propertyOrPhrase - XMP property name.
        replaceWith - The replace with.
        outputPath - The output path.
        Returns:
        The number of affected properties.
      • replaceInXmp

        public static int replaceInXmp(InputStream stream,
                       String propertyOrPhrase,
                       String replaceWith,
                       String outputPath)

        Replaces XMP metadata properties.

        Parameters:
        stream - File stream.
        propertyOrPhrase - XMP property name.
        replaceWith - The replace with.
        outputPath - The output path.
        Returns:
        The number of affected properties.
      • replaceInExif

        public static int replaceInExif(String path,
                        String propertyOrPhrase,
                        String replaceWith,
                        String outputPath)

        Replaces EXIF metadata properties.

        Parameters:
        path - Absolute path to the target file.
        propertyOrPhrase - EXIF property name.
        replaceWith - The replace with.
        outputPath - The output path.
        Returns:
        The number of affected properties.
      • replaceInExif

        public static int replaceInExif(InputStream stream,
                        String propertyOrPhrase,
                        String replaceWith,
                        String outputPath)

        Replaces EXIF metadata properties.

        Parameters:
        stream - File stream.
        propertyOrPhrase - EXIF property name.
        replaceWith - The replace with.
        outputPath - The output path.
        Returns:
        The number of affected properties.