Package com.esri.gpt.catalog.schema

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


    MessageBroker msgBroker = extractMessageBroker();
    msgBroker.addErrorMessage("publication.createMetadata.err.noSchemaSelected");
  } else {
   
    // create the new schema
    MetadataDocument document = new MetadataDocument();
    Schema schema = document.prepareForCreate(context,sCreateSchemaKey);
    setOpenSchemaKey(schema.getKey());
   
    // check for a defined GXE based Geoportal XML editor
    GxeDefinition gxeDefinition = schema.getGxeEditorDefinition();
    if (gxeDefinition != null) {
View Full Code Here


  // prepare the publisher
  getSelectablePublishers().setSelectedKey(getOnBehalfOf());
  Publisher publisher = getSelectablePublishers().selectedAsPublisher(context,false);
 
  // prepare the schema for edit
  MetadataDocument document = new MetadataDocument();
  Schema schema = document.prepareForEdit(context,publisher,sOpenDocumentUuid);
  setOpenSchemaKey(schema.getKey());
 
  // check for a defined GXE based Geoportal XML editor
  GxeDefinition gxeDefinition = schema.getGxeEditorDefinition();
  if (gxeDefinition != null) {
View Full Code Here

  String sOpenSchemaKey = getOpenSchemaKey();
  if (sOpenSchemaKey.length() == 0) {
    String sMsg = "Programming error: The openSchemaKey was not specified.";
    throw new SchemaException(sMsg);
  } else {
    MetadataDocument document = new MetadataDocument();
    schema = document.prepareForCreate(context,sOpenSchemaKey);
  }
 
  // un-bind editor values, validate the input
  UiContext uiContext = new UiContext();
  schema.unBind(uiContext,editorForm);
View Full Code Here

                if (sDbAcl == null) sDbAcl = rs.getString(6);
              }
              String sXml = Val.chkStr(this.readXml(uuid));
              if (sXml.length() > 0) {
                info.numRequiringUpdate++;
                MetadataDocument mdDoc = new MetadataDocument();
                Schema schema = mdDoc.prepareForView(this.context,sXml);
                this.adapter.publishDocument(uuid,tsDbModified,schema,sDbAcl);
                info.numDocsUpdated++;
              }
            } catch (SchemaException se) {
             
View Full Code Here

          }
         
          try {
            String sXml = Val.chkStr(dao.readXml(uuid));
            if (sXml.length() > 0) {
              MetadataDocument mdDoc = new MetadataDocument();
              Schema schema = mdDoc.prepareForView(context,sXml);
              adapter.publishDocument(uuid,tsDbModified,schema,sDbAcl);
            }
          } catch (SchemaException se) {
           
            // don't allow the entire process to fail over one bad xml
View Full Code Here

        fld = new Field(fldName,cswOutputSchema,Field.Store.YES,Field.Index.NOT_ANALYZED,Field.TermVector.NO);
        document.add(fld);
      }
      String briefXslt = Val.chkStr(schema.getCswBriefXslt());
      if (briefXslt.length() > 0) {
        MetadataDocument mdDoc = new MetadataDocument();
        String briefXml = mdDoc.transform(xml,briefXslt);
        fldName = Storeables.FIELD_XML_BRIEF;
        LOGGER.log(Level.FINER, "Appending field: {0}", fldName);
        fld = new Field(fldName,briefXml,Field.Store.YES,Field.Index.NO,Field.TermVector.NO);
        document.add(fld);
      }
      String summaryXslt = Val.chkStr(schema.getCswSummaryXslt());
      if (summaryXslt.length() > 0) {
        MetadataDocument mdDoc = new MetadataDocument();
        String summaryXml = mdDoc.transform(xml,summaryXslt);
        fldName = Storeables.FIELD_XML_SUMMARY;
        LOGGER.log(Level.FINER, "Appending field: {0}", fldName);
        fld = new Field(fldName,summaryXml,Field.Store.YES,Field.Index.NO,Field.TermVector.NO);
        document.add(fld);
      }
View Full Code Here

   * @param record the publication record
   */
  protected void onRecordUpdated(String xml) {
    if (!this.isActive()) return;
    try {
      MetadataDocument mdDoc = new MetadataDocument();
      Schema schema = mdDoc.prepareForView(requestContext,xml);
      xml = mdDoc.prepareForFullViewing(xml);
      publish(schema,xml);
    } catch (Exception e) {
      LOGGER.log(Level.SEVERE,"Publication to remote service failed.",e);
    }
  }
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.