Examples of XSType


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

      return complexContent;
    }

    protected XSGroup getGroupByParticle(XsTTypeDefParticle pParticle) throws SAXException {
      XSGroup result;
      XSType myOwner = getOwner();
      XSObjectFactory factory = myOwner.getXSSchema().getXSObjectFactory();
      if (pParticle == null) {
        return null;
      } else if (pParticle instanceof XsEChoice) {
        XsEChoice choice = (XsEChoice) pParticle;
        result = factory.newXSGroup(myOwner, choice);
View Full Code Here

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

        }
        XsQName base = restriction.getBase();
        if (base == null) {
          throw new LocSAXException("Invalid 'restriction': Missing 'base' attribute", getLocator());
        }
        XSType type = getXSSchema().getType(base);
        if (type == null) {
          throw new LocSAXException("Invalid 'restriction': Unknown base type " + base, getLocator());
        }
        if (type.isSimple()) {
          throw new LocSAXException("Invalid 'restriction': The base type " + getName() + " is simple.", getLocator());
        }
        XsTTypeDefParticle particle = restriction.getTypeDefParticle();

        XSGroup group = getGroupByParticle(particle);
        if (group == null) {
          // TODO: Restriction of the ur-type
          complexContentParticle = null;
        } else {
          complexContentParticle = new XSParticleImpl(group);
        }
        complexContentType = getContentTypeByParticle(particle, group);
        attributes = XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, restriction);
        restrictedType = type;
      } else {
        XsQName base = extension.getBase();
        if (base == null) {
          throw new LocSAXException("Invalid 'extension': Missing 'base' attribute", getLocator());
        }
        XSType type = getXSSchema().getType(base);
        if (type == null) {
          throw new LocSAXException("Invalid 'extension': Unknown base type " + base, getLocator());
        }
        if (type.isSimple()) {
          throw new LocSAXException("Invalid 'extension': The base type " + base + " is simple.", getLocator());
        }
        XSComplexType myComplexType = type.getComplexType();
        if (myComplexType.hasSimpleContent()) {
          throw new LocSAXException("Invalid 'extension': The base type " + base + " has simple content.",
                                       getLocator());
        }
        XsTTypeDefParticle particle = extension.getTypeDefParticle();
View Full Code Here

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

    JAXBParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testJAXBProperty1.xsd");
    JAXBSchema schema = (JAXBSchema) parser.parse(isource);
    XSType type = schema.getType(new XsQName((String) null, "ct"));
    XSComplexType complexType = assertComplexType(type);
    XSAttributable[] attributes = complexType.getAttributes();
    assertNotNull(attributes);
    assertEquals(1, attributes.length);
    JAXBAttribute a1 = (JAXBAttribute) attributes[0];
View Full Code Here

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

    JAXBSchema schema = (JAXBSchema) parser.parse(isource);
    XSAttributable[] outerAttr = schema.getAttributes();
    assertEquals(1, outerAttr.length);
    JAXBAttribute outerA = (JAXBAttribute) outerAttr[0];
   
    XSType ct = schema.getType(new XsQName((String) null, "ct"));
    XSAttributable[] attributes = assertComplexType(ct).getAttributes();
    assertNotNull(attributes);
    assertEquals(1, attributes.length);
    JAXBAttribute a1 = (JAXBAttribute) attributes[0];
    assertEquals(XSDateTime.getInstance(), a1.getType());
View Full Code Here

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

    JAXBParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testJAXBJavaType1.xsd");
    JAXBSchema schema = (JAXBSchema) parser.parse(isource);
    XSType a = schema.getType(new XsQName((String) null, "a"));
    JAXBSimpleType ast = (JAXBSimpleType) assertSimpleType(a);
    JAXBJavaType ajjt = ast.getJAXBJavaType();
    assertEquals("java.math.BigDecimal", ajjt.getName());
    assertEquals("javax.xml.bind.DatatypeConverter.parseInteger", ajjt.getParseMethod());
    assertEquals("javax.xml.bind.DatatypeConverter.printInteger", ajjt.getPrintMethod());
    assertTrue(!ajjt.hasNsContext());

    XSElement b = schema.getElement(new XsQName((String) null, "b"));
    XSType bt = b.getType();
    JAXBSimpleType bst = (JAXBSimpleType) assertSimpleType(bt);
    assertEquals(a, assertRestriction(bst));
    assertNull(bst.getJAXBJavaType());

    XSElement c = schema.getElement(new XsQName((String) null, "c"));
    XSType ct = c.getType();
    JAXBSimpleType cst = (JAXBSimpleType) assertSimpleType(ct);
    assertEquals(a, assertRestriction(cst));
    JAXBJavaType cjjt = cst.getJAXBJavaType();
    assertEquals("java.math.BigInteger", cjjt.getName());
    assertEquals("javax.xml.bind.DatatypeConverter.parseInt", cjjt.getParseMethod());
View Full Code Here

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

    JAXBParser parser = newJAXBParser();
    InputSource isource = new InputSource(new StringReader(schemaSource));
    isource.setSystemId("testJAXBJavaTypesafeEnumClass1.xsd");
    JAXBSchema schema = (JAXBSchema) parser.parse(isource);
    XSType a = schema.getType(new XsQName((String) null, "a"));
    checkJAXBTypesafeEnumClass1AType(a);

    XSType b = schema.getType(new XsQName((String) null, "b"));
    checkJAXBTypesafeEnumClass1BType(b);

    XSElement[] elements = schema.getElements();
    assertEquals(1, elements.length);
    XSElement allTypesElement = elements[0];
View Full Code Here

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

    XSType[] types = schema.getTypes();
    assertEquals(7, types.length);


    XSType stringType = types[0];
    checkJAXBTypesafeEnumClass2StringType(stringType);

    XSElement[] elements = schema.getElements();
    assertEquals(1, elements.length);
View Full Code Here

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

          XsQName elementName = pElement.getName();
          if (!elementNames.contains(elementName)) {
              elementNames.add(elementName);
            // Does the element have an ino:id attribute? If not, create it
            XsQName qName = new XsQName(InoResponseHandler.INO_RESPONSE2_URI, "id", "ino");
            XSType stringType = XSString.getInstance();
            addAttribute(result.getTypeSG(), pElement.getType(), qName, stringType, "inoId");
            // Does the element have an ino:docname attribute? If not, create it
            qName = new XsQName(InoResponseHandler.INO_RESPONSE2_URI, "docname", "ino");
            addAttribute(result.getTypeSG(), pElement.getType(), qName, stringType, "inoDocname");
          }
View Full Code Here

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

      }
    }

    if (theChild == null) {
      // We have to create a new attribute matching the column
      XSType xsType;
      if (pColumn.isBinaryColumn()) {
        xsType = XSBase64Binary.getInstance();
      } else if (pColumn.isStringColumn()) {
        xsType = XSString.getInstance();
      } else {
View Full Code Here

Examples of org.exolab.castor.builder.types.XSType

                                  final String localClassName, final String nsURI,
                                  final JSourceCode jsc) {

        XMLInfoNature xmlNature = new XMLInfoNature(member);
       
        XSType xsType = xmlNature.getSchemaType();
        XSType xsCollectionType = null;
       
        boolean any         = false;
        NodeType nodeType = xmlNature.getNodeType();
        boolean isElement   = (nodeType == NodeType.ELEMENT);
        boolean isAttribute = (nodeType == NodeType.ATTRIBUTE);
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.