Examples of XMLizable


Examples of org.apache.uima.util.XMLizable

          // write the value (must be XMLizable or an array of XMLizable)
          Object val = curEntry.getValue();
          if (val.getClass().isArray()) {
            Object[] arr = (Object[]) val;
            for (int j = 0; j < arr.length; j++) {
              XMLizable elem = (XMLizable) arr[j];
              elem.toXML(aContentHandler);
            }
          } else {
            cc.lastOutputNodeAddLevel();
            try {
            ((XMLizable) val).toXML(aContentHandler);
View Full Code Here

Examples of org.apache.uima.util.XMLizable

//        }
//      }
//      System.out.print("\n");
//    }
    // build the object
    XMLizable result = mUimaXmlParser.buildObject((Element) rootDomNode, mOptions);

    // clear state to prepare for another parse
    mDOMResult = new DOMResult();
    mTransformerHandler.setResult(mDOMResult);
View Full Code Here

Examples of org.apache.uima.util.XMLizable

      if (errorHandler.getException() != null) {
        throw errorHandler.getException();
      }

      // otherwise build the UIMA XMLizable object and return it
      XMLizable result = deser.getObject();

      if (result instanceof MetaDataObject_impl) {
        // set Source URL (needed to later resolve descriptor-relative paths)
        ((MetaDataObject_impl) result).setSourceUrl(urlToParse);
      }
View Full Code Here

Examples of org.apache.uima.util.XMLizable

      throw new InvalidXMLException(InvalidXMLException.UNKNOWN_ELEMENT, new Object[] { aElement
              .getTagName() });
    }

    // resolve the class name and instantiate the class
    XMLizable object;
    try {
      object = (XMLizable) cls.newInstance();
    } catch (Exception e) {
      throw new UIMA_IllegalStateException(
              UIMA_IllegalStateException.COULD_NOT_INSTANTIATE_XMLIZABLE, new Object[] { cls
View Full Code Here

Examples of org.apache.uima.util.XMLizable

      throw new InvalidXMLException(InvalidXMLException.UNKNOWN_ELEMENT, new Object[] { aElement
              .getTagName() });
    }

    // resolve the class name and instantiate the class
    XMLizable object;
    try {
      object = (XMLizable) cls.newInstance();
    } catch (Exception e) {
      throw new UIMA_IllegalStateException(
              UIMA_IllegalStateException.COULD_NOT_INSTANTIATE_XMLIZABLE, new Object[] { cls
View Full Code Here

Examples of org.apache.uima.util.XMLizable

   */
  public ResourceSpecifier parseResourceSpecifier(XMLInputSource aInput, ParsingOptions aOptions)
          throws InvalidXMLException {
    // attempt to locate resource specifier schema
    URL schemaURL = getResourceSpecifierSchemaUrl();
    XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, schemaURL, aOptions);
    if (object instanceof ResourceSpecifier) {
      return (ResourceSpecifier) object;
    } else {
      throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] {
          ResourceSpecifier.class.getName(), object.getClass().getName() });
    }
  }
View Full Code Here

Examples of org.apache.uima.util.XMLizable

   */
  public ResourceMetaData parseResourceMetaData(XMLInputSource aInput, ParsingOptions aOptions)
          throws InvalidXMLException {
    // attempt to locate resource specifier schema
    URL schemaURL = getResourceSpecifierSchemaUrl();
    XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, schemaURL, aOptions);

    if (object instanceof ResourceMetaData) {
      return (ResourceMetaData) object;
    } else {
      throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] {
          ResourceMetaData.class.getName(), object.getClass().getName() });
    }
  }
View Full Code Here

Examples of org.apache.uima.util.XMLizable

   */
  public URISpecifier parseURISpecifier(XMLInputSource aInput, ParsingOptions aOptions)
          throws InvalidXMLException {
    // attempt to locate resource specifier schema
    URL schemaURL = getResourceSpecifierSchemaUrl();
    XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, schemaURL, aOptions);

    if (object instanceof URISpecifier) {
      return (URISpecifier) object;
    } else {
      throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] {
          URISpecifier.class.getName(), object.getClass().getName() });
    }
  }
View Full Code Here

Examples of org.apache.uima.util.XMLizable

   */
  public AnalysisEngineDescription parseAnalysisEngineDescription(XMLInputSource aInput,
          ParsingOptions aOptions) throws InvalidXMLException {
    // attempt to locate resource specifier schema
    URL schemaURL = getResourceSpecifierSchemaUrl();
    XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, schemaURL, aOptions);

    if (object instanceof AnalysisEngineDescription) {
      return (AnalysisEngineDescription) object;
    } else {
      throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] {
          AnalysisEngineDescription.class.getName(), object.getClass().getName() });
    }
  }
View Full Code Here

Examples of org.apache.uima.util.XMLizable

  @Deprecated
  public TaeDescription parseTaeDescription(XMLInputSource aInput, ParsingOptions aOptions)
          throws InvalidXMLException {
    // attempt to locate resource specifier schema
    URL schemaURL = getResourceSpecifierSchemaUrl();
    XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, schemaURL, aOptions);

    if (object instanceof TaeDescription) {
      return (TaeDescription) object;
    } else {
      throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] {
          TaeDescription.class.getName(), object.getClass().getName() });
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.