Package com.esri.gpt.catalog.schema

Examples of com.esri.gpt.catalog.schema.MetadataDocument


*/
public Schema prepareForPublication()
  throws SchemaException, SQLException {

  // prepare the schema for publication, send the request
  MetadataDocument document = new MetadataDocument();
  Schema schema = document.prepareForPublication(this);
  determineSourceUri(schema);
  determineUuid(schema);

  return schema;
}
View Full Code Here


* @throws SchemaException if a schems related exception occurs
*/
public void verify() throws SchemaException {

  // prepare the schema for publication, send the request
  MetadataDocument document = new MetadataDocument();
  document.prepareForPublication(this);
}
View Full Code Here

   * @throws AgpPublishException if extracting ESRI Item Information fails
   */
  protected Node extractItemInfo(String metadata) throws AgpPublishException {
    try {
      // find the right schema
      MetadataDocument document = new MetadataDocument();
      Schema schema = document.prepareForView(requestContext, metadata);

      // get transformation file
      String toEsriItemInfoXslt = schema.getToEsriItemInfoXslt();
      if (toEsriItemInfoXslt.isEmpty()) {
        throw new AgpPublishException("Schema: " + schema.getKey() + " has no transformation to ItemInformation.");
View Full Code Here

      ims.executeGet(uuid);
      Timestamp updateDate = ims.getUpdateDate();
      String xml = ims.getXml();
     
      // build the schema
      MetadataDocument mdDoc = new MetadataDocument();
      Schema schema = mdDoc.prepareForView(getRequestContext(),xml);
     
      // publish
      publishDocument(uuid,updateDate,schema,acl);
     
      return xml;
View Full Code Here

    throw new SearchException("UUID given for document requested is either null or empty");
  }
  String metadataXml = this.getMetadataText(uuid, catalogUri);
  this.getSearchResult().setCurrentMetadataXmlInView(metadataXml);
  this.setNavigationOutcome(NAV_RESULTS2VIEWDETAILS);
  MetadataDocument document = new MetadataDocument();
  Schema schema = document.prepareForView(context,metadataXml);
  if ((detailsPanelGroup != null) && (schema != null)) {
    setResourceUrl(schema.getMeaning().getResourceUrl());
   
    // check for a configured XSLT to generate the details page,
    // otherwise, generate the details page from the defined schema
    String htmlFragment = "";
    if (schema.getDetailsXslt().length() > 0) {
       try {
           MessageBroker broker = this.extractMessageBroker();
            htmlFragment = Val.chkStr(document.transformDetails(metadataXml,schema.getDetailsXslt(),broker));
      } catch (TransformerException e) {
        htmlFragment = "";
        LOG.log(Level.SEVERE,"Cannot transform metadata details: "+schema.getDetailsXslt(),e);
      }
    }
View Full Code Here

    * @throws Exception if an exception occurs
   */
  private void executeGet(HttpServletRequest request, HttpServletResponse response,
      RequestContext context, Publisher publisher) throws Exception {
    String uuid = this.determineUuid(request,context,true);
    MetadataDocument mdDoc = new MetadataDocument();
    String xml = Val.chkStr(mdDoc.prepareForDownload(context,publisher,uuid));
    if (xml.length() > 0) {
      this.writeXmlResponse(response,xml);
    }
  }
View Full Code Here

  if (bStripStyleSheets) {
    //sMetadata = sMetadata.replaceAll("<\\?xml\\-stylesheet.*\\?>|<\\!DOCTYPE.*>","");
    sMetadata = sMetadata.replaceAll("<\\?xml\\-stylesheet.+?>|<\\!DOCTYPE.+?>","");
  }
 
  MetadataDocument document = new MetadataDocument();
  String sXml = document.prepareForFullViewing(sMetadata);
  writer.write(sXml);
}
View Full Code Here

                                 MessageBroker msgBroker,
                                 Schema schema)
    throws Exception {
    String sXslt = Val.chkStr(schema.getDetailsXslt());
    if (sXslt.length() > 0) {
      MetadataDocument document = new MetadataDocument();
      return document.transformDetails(
          schema.getActiveDocumentXml(),sXslt,msgBroker);
    }
    return null;
  }
View Full Code Here

    throws Exception {
    String sXml = Val.chkStr(Val.removeBOM(xml));
    if (sXml.length() == 0) {
      throw new UnrecognizedSchemaException("Unrecognized metadata schema.");
    } else {
      MetadataDocument document = new MetadataDocument();
      Schema schema = document.prepareForView(context,sXml);
      return schema;
    }
  } 
View Full Code Here

          LOGGER.log(Level.WARNING,"Error processing request.",e);
          throw new ServletException("400: IOException while reading request body.");
        }
        xml = Val.chkStr(Val.removeBOM(xml));
        if (xml.length() > 0) {
          MetadataDocument document = new MetadataDocument();
          Schema schema = document.prepareForView(context,xml);
          if (schema != null) {
            definition = schema.getGxeEditorDefinition();
          }
        }
       
View Full Code Here

TOP

Related Classes of com.esri.gpt.catalog.schema.MetadataDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.