Package com.esri.gpt.catalog.schema

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


      String loc = Val.chkStr(request.getParameter("loc"));
      if (key.length() > 0) {
        Schemas schemas = context.getCatalogConfiguration().getConfiguredSchemas();
        Schema schema = schemas.get(key);
        if (schema == null) {
          throw new SchemaException("Unsupported schema key.");
        } else {
          definition = schema.getGxeEditorDefinition();
        }
      } else if (loc.length() > 0) {
        definition = new GxeDefinition();
        definition.setFileLocation(loc);
      }
      String sCfg = "";
      if (definition != null) {
        msgBroker = this.getMessageBroker(request,response,context,msgBroker);
        sCfg = this.generateDefinition(request,response,context,msgBroker,definition);
      }
     
      // set the response
      if ((sCfg != null) && (sCfg.length() > 0)) {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        sb.append("\r\n\"cfgDefinition\":").append(sCfg);
        sb.append("\r\n}");
        sResponse = sb.toString();
      } else {
        throw new SchemaException("Unsupported schema type.");
      }

    } catch (Throwable t) {
      if (!(t instanceof SchemaException)) {
        LOGGER.log(Level.WARNING,"Error processing request.",t);
View Full Code Here


        sb.append(",\r\n\"xml\":\"").append(
            Val.escapeStrForJson(schema.getActiveDocumentXml())).append("\"");
        sb.append("\r\n}");
        sResponse = sb.toString();
      } else {
        throw new SchemaException("Unsupported XML type.");
      }

    } catch (Throwable t) {
      if (!(t instanceof SchemaException)) {
        LOGGER.log(Level.WARNING,"Error processing request.",t);
View Full Code Here

  
  // determine the uuid for the document to open
  String sOpenDocumentUuid = getOpenDocumentUuid();
  if (sOpenDocumentUuid.length() == 0) {
    String sMsg = "Programming error: The openDocumentUuid was not specified.";
    throw new SchemaException(sMsg);
  }
 
  // determine the owner
  ImsMetadataAdminDao adminDao = new ImsMetadataAdminDao(context);
  setOnBehalfOf(adminDao.queryOwnerDN(sOpenDocumentUuid));
View Full Code Here

  // find the metadata editor form
  UIViewRoot root = getContextBroker().extractViewRoot();
  UIComponent editorForm = root.findComponent("mdEditor");
  if (editorForm == null) {
    String sMsg = "Programming error: The mdEditor form connot be located.";
    throw new SchemaException(sMsg);
  }
 
  // determine the currently open schema
  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);
  }
 
View Full Code Here

TOP

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

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.