Class GetResponseRecordFilter
- java.lang.Object
-
- org.gcube.datatransfer.resolver.util.GetResponseRecordFilter
-
public class GetResponseRecordFilter extends Object
The Class GetResponseRecordFilter.- Author:
- Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Sep 5, 2017
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description GetResponseRecordFilter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Long>fileIdentifiersToIds(List<String> UUIDs, String scope)File identifiers to ids.static StringgetMetaCategoryByFileIdentifier(String fileIdentifier, String geonetworkURL, String user, String pwd)Gets the meta category by file identifier.static StringgetMetadataValueByFileIdentifier(String fileIdentifier, String geonetworkURL, String user, String pwd, String metadataName)Gets the metadata value by file identifier.static StringgetMetaOwnerNameByFileIdentifier(String fileIdentifier, String geonetworkURL, String user, String pwd)Gets the meta owner name by file identifier.static List<String>getTextContentStringsForTagName(Document doc, String tagName)Gets the text content strings for tag name.static DocumentinputStreamToW3CDocument(InputStream getRecordsResponse)Input stream to w3 c document.static InputStreamoverrideResponseIdsByListIds(InputStream getRecordsResponse, List<String> idsToRemove, String messageToWrite)Override response ids by list ids.static StringrequestXmlMetadataGet(String fileIdentifier, String geonetworkURL, String user, String pwd)Perform the request xml metadata get.static InputStreamw3CDocumentToInputStream(Document xml)W3 c document to input stream.
-
-
-
Method Detail
-
getTextContentStringsForTagName
public static List<String> getTextContentStringsForTagName(Document doc, String tagName)
Gets the text content strings for tag name.- Parameters:
doc- the doctagName- 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 responseidsToRemove- the ids to removemessageToWrite- 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
-
fileIdentifiersToIds
public static List<Long> fileIdentifiersToIds(List<String> UUIDs, String scope) throws GeonetworkInstanceException
File identifiers to ids.- Parameters:
UUIDs- the UUI dsscope- the scope- Returns:
- the list
- Throws:
GeonetworkInstanceException- the geonetwork instance 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 UUIDgeonetworkURL- the geonetwork urluser- the userpwd- 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 identifiergeonetworkURL- the geonetwork urluser- the userpwd- 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 identifiergeonetworkURL- the geonetwork urluser- the userpwd- 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 identifiergeonetworkURL- the geonetwork urluser- the userpwd- the pwdmetadataName- the metadata name- Returns:
- the metadata value by file identifier
-
-