Class GetResponseRecordFilter


  • public class GetResponseRecordFilter
    extends Object
    The Class GetResponseRecordFilter.
    Author:
    Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Sep 5, 2017
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
    • Constructor Detail

      • GetResponseRecordFilter

        public GetResponseRecordFilter()
    • Method Detail

      • getTextContentStringsForTagName

        public static List<String> getTextContentStringsForTagName​(Document doc,
                                                                   String tagName)
        Gets the text content strings for tag name.
        Parameters:
        doc - the doc
        tagName - the tag name
        Returns:
        the text content strings for tag name
      • inputStreamToW3CDocument

        public static Document inputStreamToW3CDocument​(InputStream getRecordsResponse)
                                                 throws Exception
        Input stream to w3 c document.
        Parameters:
        getRecordsResponse - the get records response
        Returns:
        the document
        Throws:
        Exception - the exception
      • overrideResponseIdsByListIds

        public static InputStream overrideResponseIdsByListIds​(InputStream getRecordsResponse,
                                                               List<String> idsToRemove,
                                                               String messageToWrite)
                                                        throws IOException
        Override response ids by list ids.
        Parameters:
        getRecordsResponse - the get records response
        idsToRemove - the ids to remove
        messageToWrite - the message to replace the right ID in the response.
        Returns:
        the input stream
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • w3CDocumentToInputStream

        public static final InputStream w3CDocumentToInputStream​(Document xml)
                                                          throws Exception
        W3 c document to input stream.
        Parameters:
        xml - the xml
        Returns:
        the input stream
        Throws:
        Exception - the exception
      • requestXmlMetadataGet

        public static String requestXmlMetadataGet​(String fileIdentifier,
                                                   String geonetworkURL,
                                                   String user,
                                                   String pwd)
        Perform the request xml metadata get.
        Parameters:
        fileIdentifier - the file identifier is the UUID
        geonetworkURL - the geonetwork url
        user - the user
        pwd - the pwd
        Returns:
        the response as string
      • getMetaCategoryByFileIdentifier

        public static String getMetaCategoryByFileIdentifier​(String fileIdentifier,
                                                             String geonetworkURL,
                                                             String user,
                                                             String pwd)
        Gets the meta category by file identifier.
        Parameters:
        fileIdentifier - the file identifier
        geonetworkURL - the geonetwork url
        user - the user
        pwd - the pwd
        Returns:
        the meta category by file identifier
      • getMetaOwnerNameByFileIdentifier

        public static String getMetaOwnerNameByFileIdentifier​(String fileIdentifier,
                                                              String geonetworkURL,
                                                              String user,
                                                              String pwd)
        Gets the meta owner name by file identifier.
        Parameters:
        fileIdentifier - the file identifier
        geonetworkURL - the geonetwork url
        user - the user
        pwd - the pwd
        Returns:
        the meta owner name by file identifier
      • getMetadataValueByFileIdentifier

        public static String getMetadataValueByFileIdentifier​(String fileIdentifier,
                                                              String geonetworkURL,
                                                              String user,
                                                              String pwd,
                                                              String metadataName)
        Gets the metadata value by file identifier.
        Parameters:
        fileIdentifier - the file identifier
        geonetworkURL - the geonetwork url
        user - the user
        pwd - the pwd
        metadataName - the metadata name
        Returns:
        the metadata value by file identifier