Class ClientFgdcHelper

java.lang.Object
edu.ucsb.nceas.metacat.clientview.ClientFgdcHelper

public abstract class ClientFgdcHelper extends Object
Author:
barteau
  • Field Details

    • FGDC_DATA_FILE_DOCID_XPATH

      public static final String FGDC_DATA_FILE_DOCID_XPATH
      Data Document ID location within an FGDC document. XPath expression.
      See Also:
    • FGDC_DATA_FILE_QUERY_XPATH

      public static final String FGDC_DATA_FILE_QUERY_XPATH
      See Also:
    • FGDC_DATA_FILE_NAME_XPATH

      public static final String FGDC_DATA_FILE_NAME_XPATH
      See Also:
    • FGDC_DATA_FILE_NODES_XPATH

      public static final String 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

      public static final String PATH4ANCESTOR
      See Also:
    • SUB_DOCS_PATH

      public static final String SUB_DOCS_PATH
      See Also:
    • FGDC_DOCID_XPATH

      public static final String FGDC_DOCID_XPATH
      Metadata Document ID location within an FGDC document. XPath expression.
      See Also:
    • FGDC_FILE_NAME_XPATH

      public static final String FGDC_FILE_NAME_XPATH
      See Also:
    • XPATH_QUERY_TEMPLATE

      public static final String XPATH_QUERY_TEMPLATE
      Metadata Document ID query template within an FGDC document. Substitute %1s with Doc Id.
      See Also:
    • FGDC_DOCID_ROOT_XPATH

      public static final String FGDC_DOCID_ROOT_XPATH
      See Also:
    • FGDC_SYSTEM_ID

      public static final String 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

      public static boolean isFGDC(Document metadataDoc)
    • hasMetacatInfo

      public static boolean hasMetacatInfo(String docId, Document metadataDoc)
    • updateFileNameAndType

      public static void updateFileNameAndType(Node root, String dataDocId, String[] fileInfo)
    • updateMetadataFileName

      public static void updateMetadataFileName(Node root, String metadataDocId, String fileName)