Package org.apache.ws.jaxme.xs

Examples of org.apache.ws.jaxme.xs.XSParser


    private XSSchema parse(String pSchema, String pName)
            throws ParserConfigurationException, SAXException, IOException {
        InputSource isource = new InputSource(new StringReader(pSchema));
        isource.setSystemId(pName);
        XSParser parser = new XSParser();
        parser.setValidating(false);
        return parser.parse(isource);
    }
View Full Code Here


  protected ParserTestBase(String pName) {
    super(pName);
  }

  protected XSParser newXSParser() {
    XSParser parser = new XSParser();
    parser.setValidating(false);
    return parser;
  }
View Full Code Here

      }

      InputSource iSource = new InputSource(zipFile.getInputStream(entry));
      iSource.setSystemId(name);
      System.out.print(name);
      XSParser parser = new XSParser();
      parser.setValidating(false);
      try {
        parser.parseSyntax(iSource);
        passXSDFiles++;
        System.out.println(": PASS");
      } catch (Exception e) {
        failXSDFiles++;
        System.out.println(": FAIL");
View Full Code Here

    public void startElement(String pNamespaceURI, String pLocalName, String pQName,
                              Attributes pAttr) throws SAXException {
      if (xsContentHandler == null) {
        if (XSParser.XML_SCHEMA_URI.equals(pNamespaceURI&&  "schema".equals(pLocalName)) {
          XSParser parser = new XSParser();
          Element element = myDataTypes.getDocumentElement();
          String namespace = element.getAttributeNS(null, "targetNamespace");
          if (namespace == null  ||  namespace.length() == 0) {
            throw new IllegalStateException("Namespace is not set");
          }
          parser.addImport(namespace, soapDataTypes);
          xsContentHandler = new XSParser().getXSContentHandler();
          if (locator != null) {
            xsContentHandler.setDocumentLocator(locator);
          }
          xsContentHandler.startDocument();
          for (int i = 0;  i < prefixes.size();  i += 2) {
View Full Code Here

  public SyntaxTest(String pName) {
    super(pName);
  }

  protected void parseSyntax(File f) throws IOException, SAXException, ParserConfigurationException {
    XSParser xsp = new XSParser();
    InputSource isource = new InputSource(new FileInputStream(f));
    isource.setSystemId(f.toURL().toString());
    xsp.parseSyntax(isource);
  }
View Full Code Here

    isource.setSystemId(f.toURL().toString());
    xsp.parseSyntax(isource);
  }

  protected void parseLogical(File f) throws IOException, SAXException, ParserConfigurationException {
    XSParser xsp = new XSParser();
    InputSource isource = new InputSource(new FileInputStream(f));
    isource.setSystemId(f.toURL().toString());
    xsp.parse(isource);
  }
View Full Code Here

  public SchemaSG parse(InputSource pSource) throws Exception {
    final String mName = "parse";
    log.finest(mName, "->", pSource.getSystemId());
    SGFactory factory = getSGFactory();
    XSParser parser = factory.newXSParser();
    log.finest(mName, "Parser = " + parser + ", validating = " + getGenerator().isValidating());
    parser.setValidating(getGenerator().isValidating());
    XSSchema schema = parser.parse(pSource);
    log.finest(mName, "Schema = " + schema);
    SchemaSG result = factory.getSchemaSG(schema);
    log.finest(mName, "<-", result);
    return result;
  }
View Full Code Here

    result.init();
    return result;
  }
 
  public XSParser newXSParser(SGFactory pController) throws SAXException {
    XSParser parser = new JAXBParser();
    XSContext context = parser.getContext();
    context.setXsObjectFactory(pController.newXsObjectFactory());
    context.setXSObjectFactory(pController.newXSObjectFactory());
    return parser;
  }
View Full Code Here

  public SchemaSG parse(InputSource pSource) throws Exception {
    final String mName = "parse";
    log.finest(mName, "->", pSource.getSystemId());
    SGFactory factory = getSGFactory();
    XSParser parser = factory.newXSParser();
    log.finest(mName, "Parser = " + parser + ", validating = " + getGenerator().isValidating());
    parser.setValidating(getGenerator().isValidating());
    XSSchema schema = parser.parse(pSource);
    log.finest(mName, "Schema = " + schema);
    SchemaSG result = factory.getSchemaSG(schema);
    log.finest(mName, "<-", result);
    return result;
  }
View Full Code Here

    result.init();
    return result;
  }
 
  public XSParser newXSParser(SGFactory pController) throws SAXException {
    XSParser parser = new JAXBParser();
    XSContext context = parser.getContext();
    context.setXsObjectFactory(pController.newXsObjectFactory());
    context.setXSObjectFactory(pController.newXSObjectFactory());
    return parser;
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.xs.XSParser

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.