Class ClientFgdcHelper
java.lang.Object
edu.ucsb.nceas.metacat.clientview.ClientFgdcHelper
- Author:
- barteau
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Data Document ID location within an FGDC document.static final String
static final String
FGDC Data Document ID location within an FGDC document, relative to the "distinfo" parent node.static final String
static final String
static final String
Metadata Document ID location within an FGDC document.static final String
static final String
Identifies the FGDC DTD.static final String
static final String
static final String
Metadata Document ID query template within an FGDC document. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clientDeleteRequest
(ClientView clientViewBean, ClientViewHelper clientViewHelper) Handles a client's request to delete a document.static boolean
handlePackageUpload
(String metaDocId, HashMap dataDocIDs, String contactName, String metaFNm, Document metadataDoc) static boolean
hasMetacatInfo
(String docId, Document metadataDoc) static boolean
static void
updateFileNameAndType
(Node root, String dataDocId, String[] fileInfo) static void
updateMetadataFileName
(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
-