Class ClientFgdcHelper
java.lang.Object
edu.ucsb.nceas.metacat.clientview.ClientFgdcHelper
- Author:
- barteau
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringData Document ID location within an FGDC document.static final Stringstatic final StringFGDC Data Document ID location within an FGDC document, relative to the "distinfo" parent node.static final Stringstatic final Stringstatic final StringMetadata Document ID location within an FGDC document.static final Stringstatic final StringIdentifies the FGDC DTD.static final Stringstatic final Stringstatic final StringMetadata Document ID query template within an FGDC document. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclientDeleteRequest(ClientView clientViewBean, ClientViewHelper clientViewHelper) Handles a client's request to delete a document.static booleanhandlePackageUpload(String metaDocId, HashMap dataDocIDs, String contactName, String metaFNm, Document metadataDoc) static booleanhasMetacatInfo(String docId, Document metadataDoc) static booleanstatic voidupdateFileNameAndType(Node root, String dataDocId, String[] fileInfo) static voidupdateMetadataFileName(Node root, String metadataDocId, String fileName)
-
Field Details
-
FGDC_DATA_FILE_DOCID_XPATH
Data Document ID location within an FGDC document. XPath expression.- See Also:
-
FGDC_DATA_FILE_QUERY_XPATH
- See Also:
-
FGDC_DATA_FILE_NAME_XPATH
- See Also:
-
FGDC_DATA_FILE_NODES_XPATH
FGDC Data Document ID location within an FGDC document, relative to the "distinfo" parent node. XPath expression.- See Also:
-
PATH4ANCESTOR
- See Also:
-
SUB_DOCS_PATH
- See Also:
-
FGDC_DOCID_XPATH
Metadata Document ID location within an FGDC document. XPath expression.- See Also:
-
FGDC_FILE_NAME_XPATH
- See Also:
-
XPATH_QUERY_TEMPLATE
Metadata Document ID query template within an FGDC document. Substitute %1s with Doc Id.- See Also:
-
FGDC_DOCID_ROOT_XPATH
- See Also:
-
FGDC_SYSTEM_ID
Identifies the FGDC DTD.- See Also:
-
-
Constructor Details
-
ClientFgdcHelper
public ClientFgdcHelper()
-
-
Method Details
-
clientDeleteRequest
public static void clientDeleteRequest(ClientView clientViewBean, ClientViewHelper clientViewHelper) Handles a client's request to delete a document. If its a data document, it removes the Doc Id from the FGDC metadata in the Metacat database. It determines what metadata Doc ID is including this Doc Id. It then queries metacat for the parent FGDC document and removes the Doc Id from it, and reloads the new version with a new revision number. If its a metadata document, it deletes any related data documents, then it deletes the metadata. In either instance, it sets the server feedback in the session ("updateFeedback").- Parameters:
request- HttpServletRequest which contains docId parameter.
-
handlePackageUpload
public static boolean handlePackageUpload(String metaDocId, HashMap dataDocIDs, String contactName, String metaFNm, Document metadataDoc) throws IOException - Throws:
IOException
-
isFGDC
-
hasMetacatInfo
-
updateFileNameAndType
-
updateMetadataFileName
-