Package org.apache.ws.jaxme.xs

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


        XSAttributable[] agAttributes = getAttributes(pObject, ag);
        for (int j = 0;  j < agAttributes.length;  j++) {
          attributes.add(agAttributes[j]);
        }
      } else if (o instanceof XsTWildcard) {
        XSWildcard wildcard = pObject.getXSSchema().getXSObjectFactory().newXSWildcard(pObject, (XsTWildcard) o);
        wildcard.validate();
        attributes.add(wildcard);
      } else {
        throw new IllegalStateException("Unknown attribute type: " + o.getClass().getName());
      }
    }
View Full Code Here


        SchemaReader schemaReader = pController.getTypeSG().getFactory().getGenerator().getSchemaReader();
        if (schemaReader instanceof JAXBSchemaReader) {
          isSupportingExtensions = ((JAXBSchemaReader) schemaReader).isSupportingExtensions();
        }
        if (isSupportingExtensions) {
          XSWildcard wildcard = (XSWildcard) xsAttributes[i];
          attrChain = (AttributeSGChain) pController.newAttributeSG(wildcard);
        } else {
          throw new SAXParseException("Extensions must be enabled to support wildcard attributes (JAXB 1.0, App. E.2.1.1)",
              ((XSWildcard) xsAttributes[i]).getLocator());
        }
View Full Code Here

        XSAttributable[] agAttributes = getAttributes(pObject, ag);
        for (int j = 0;  j < agAttributes.length;  j++) {
          attributes.add(agAttributes[j]);
        }
      } else if (o instanceof XsTWildcard) {
        XSWildcard wildcard = pObject.getXSSchema().getXSObjectFactory().newXSWildcard(pObject, (XsTWildcard) o);
        wildcard.validate();
        attributes.add(wildcard);
      } else {
        throw new IllegalStateException("Unknown attribute type: " + o.getClass().getName());
      }
    }
View Full Code Here

        isource.setSystemId("testNamespaceLists.xsd");
      XSSchema schema = pParser.parse(isource);
      XSParticle[] particles = assertGroup(assertComplexContent(assertComplexType(schema.getTypes()[0]))).getParticles();
        assertEquals(2, particles.length);
        assertTrue(particles[0].isWildcard());
        XSWildcard wildcard = particles[0].getWildcard();
        XsNamespaceList namespaceList = wildcard.getNamespaceList();
        assertTrue(!namespaceList.isAny());
        assertTrue(!namespaceList.isAny());
        assertEquals(1, namespaceList.getUris().length);
        assertEquals("http://purl.org/dc/elements/1.1/", namespaceList.getUris()[0].getURI());
        assertTrue(particles[1].isWildcard());
        wildcard = particles[1].getWildcard();
        namespaceList = wildcard.getNamespaceList();
        assertTrue(!namespaceList.isAny());
        assertTrue(!namespaceList.isAny());
        assertEquals(1, namespaceList.getUris().length);
        assertEquals("http://www.jeckle.de/rss", namespaceList.getUris()[0].getURI());
        XSAttributable[] attributes = assertComplexType(schema.getTypes()[0]).getAttributes();
        assertEquals(1, attributes.length);
        assertTrue(attributes[0] instanceof XSWildcard);
        wildcard = (XSWildcard) attributes[0];
        namespaceList = wildcard.getNamespaceList();
        assertTrue(!namespaceList.isAny());
        assertTrue(!namespaceList.isAny());
        assertEquals(1, namespaceList.getUris().length);
        assertEquals("http://www.w3.org/1999/02/22-rdf-syntax-ns#", namespaceList.getUris()[0].getURI());
    }
View Full Code Here

        assertEquals(new XsQName("xyz", "d"), elements[1].getName());
        XSComplexType anyAttrElem = assertComplexType(elements[2].getType());
        XSAttributable[] attrs = anyAttrElem.getAttributes();
        assertEquals(1, attrs.length);
        assertTrue(attrs[0] instanceof XSWildcard);
        XSWildcard wc = (XSWildcard) attrs[0];
        XsNamespaceList nsl = wc.getNamespaceList();
        assertTrue(nsl.isAny());
        assertNull(nsl.getUris());
        XSComplexType otherAttrElem = assertComplexType(elements[3].getType());
        attrs = otherAttrElem.getAttributes();
        assertEquals(1, attrs.length);
View Full Code Here

        SchemaReader schemaReader = pController.getTypeSG().getFactory().getGenerator().getSchemaReader();
        if (schemaReader instanceof JAXBSchemaReader) {
          isSupportingExtensions = ((JAXBSchemaReader) schemaReader).isSupportingExtensions();
        }
        if (isSupportingExtensions) {
          XSWildcard wildcard = (XSWildcard) xsAttributes[i];
          attrChain = (AttributeSGChain) pController.newAttributeSG(wildcard);
        } else {
          throw new SAXParseException("Extensions must be enabled to support wildcard attributes (JAXB 1.0, App. E.2.1.1)",
              ((XSWildcard) xsAttributes[i]).getLocator());
        }
View Full Code Here

        isource.setSystemId("testNamespaceLists.xsd");
      XSSchema schema = pParser.parse(isource);
      XSParticle[] particles = assertGroup(assertComplexContent(assertComplexType(schema.getTypes()[0]))).getParticles();
        assertEquals(2, particles.length);
        assertTrue(particles[0].isWildcard());
        XSWildcard wildcard = particles[0].getWildcard();
        XsNamespaceList namespaceList = wildcard.getNamespaceList();
        assertTrue(!namespaceList.isAny());
        assertTrue(!namespaceList.isAny());
        assertEquals(1, namespaceList.getUris().length);
        assertEquals("http://purl.org/dc/elements/1.1/", namespaceList.getUris()[0].getURI());
        assertTrue(particles[1].isWildcard());
        wildcard = particles[1].getWildcard();
        namespaceList = wildcard.getNamespaceList();
        assertTrue(!namespaceList.isAny());
        assertTrue(!namespaceList.isAny());
        assertEquals(1, namespaceList.getUris().length);
        assertEquals("http://www.jeckle.de/rss", namespaceList.getUris()[0].getURI());
        XSAttributable[] attributes = assertComplexType(schema.getTypes()[0]).getAttributes();
        assertEquals(1, attributes.length);
        assertTrue(attributes[0] instanceof XSWildcard);
        wildcard = (XSWildcard) attributes[0];
        namespaceList = wildcard.getNamespaceList();
        assertTrue(!namespaceList.isAny());
        assertTrue(!namespaceList.isAny());
        assertEquals(1, namespaceList.getUris().length);
        assertEquals("http://www.w3.org/1999/02/22-rdf-syntax-ns#", namespaceList.getUris()[0].getURI());
    }
View Full Code Here

        assertEquals(new XsQName("xyz", "d"), elements[1].getName());
        XSComplexType anyAttrElem = assertComplexType(elements[2].getType());
        XSAttributable[] attrs = anyAttrElem.getAttributes();
        assertEquals(1, attrs.length);
        assertTrue(attrs[0] instanceof XSWildcard);
        XSWildcard wc = (XSWildcard) attrs[0];
        XsNamespaceList nsl = wc.getNamespaceList();
        assertTrue(nsl.isAny());
        assertNull(nsl.getUris());
        XSComplexType otherAttrElem = assertComplexType(elements[3].getType());
        attrs = otherAttrElem.getAttributes();
        assertEquals(1, attrs.length);
View Full Code Here

        XSAttributable[] agAttributes = getAttributes(pObject, ag);
        for (int j = 0;  j < agAttributes.length;  j++) {
          attributes.add(agAttributes[j]);
        }
      } else if (o instanceof XsTWildcard) {
        XSWildcard wildcard = pObject.getXSSchema().getXSObjectFactory().newXSWildcard(pObject, (XsTWildcard) o);
        wildcard.validate();
        attributes.add(wildcard);
      } else {
        throw new IllegalStateException("Unknown attribute type: " + o.getClass().getName());
      }
    }
View Full Code Here

        SchemaReader schemaReader = pController.getTypeSG().getFactory().getGenerator().getSchemaReader();
        if (schemaReader instanceof JAXBSchemaReader) {
          isSupportingExtensions = ((JAXBSchemaReader) schemaReader).isSupportingExtensions();
        }
        if (isSupportingExtensions) {
          XSWildcard wildcard = (XSWildcard) xsAttributes[i];
          attrChain = (AttributeSGChain) pController.newAttributeSG(wildcard);
        } else {
          throw new SAXParseException("Extensions must be enabled to support wildcard attributes (JAXB 1.0, App. E.2.1.1)",
              ((XSWildcard) xsAttributes[i]).getLocator());
        }
View Full Code Here

TOP

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

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.