Package org.apache.ws.jaxme.xs

Examples of org.apache.ws.jaxme.xs.XSType.validate()


    XSType type = getXSSchema().getType(myName);
    if (type == null) {
      throw new LocSAXException("Invalid 'restriction': Unknown 'base' type " + myName,
                                   pRestriction.getLocator());
    }
    type.validate();
    if (type.isSimple()) {
      throw new LocSAXException("The 'base' type " + myName + " of 'simpleContent/restriction' is simple." +
                                   " It ought to be a complex type with simple content: ",
                                   pRestriction.getLocator());
    }
View Full Code Here


                                   " but doesn't have simple content: ", pRestriction.getLocator());
    }
    XSObjectFactory factory = pParent.getXSSchema().getXSObjectFactory();
    if (myComplexType.isExtension()) {
      XSType extendedType = myComplexType.getSimpleContent().getType();
      extendedType.validate();
      XSSimpleType extendedSimpleType = extendedType.getSimpleType();
 
      XSSimpleType mySimpleType;
      if (extendedSimpleType.isAtomic()) {
        mySimpleType = factory.newXSAtomicType(this, extendedType, pRestriction);
View Full Code Here

      if (localSimpleType != null) {
        restrictedType = factory.newXSType(this, localSimpleType);
      } else {
        restrictedType = myComplexType.getSimpleContent().getType();
      }
      restrictedType.validate();
      XSSimpleType restrictedSimpleType = restrictedType.getSimpleType();
      if (restrictedSimpleType.isAtomic()) {
        simpleType = factory.newXSAtomicType(this, restrictedType, pRestriction);
      } else if (restrictedSimpleType.isList()) {
        simpleType = factory.newXSListType(this, restrictedType, pRestriction);
View Full Code Here

              if (restrictedType == null) {
                throw new LocSAXException("Unknown base type: " + myName,
                    restriction.getLocator());
              }
            }
            restrictedType.validate();
            if (!restrictedType.isSimple()) {
              throw new LocSAXException("The restricted type " + myName + " is complex.",
                  restriction.getLocator());
            }
            XSSimpleType baseType = restrictedType.getSimpleType();
View Full Code Here

      if (simpleType == null) {
        throw new LocSAXException("You must either set the 'itemType' attribute or add a 'simpleType' element.",
                                   pBaseList.getLocator());
      }
      XSType type = pOwner.getXSSchema().getXSObjectFactory().newXSType(pOwner, simpleType);
      type.validate();
      itemType = type;
    } else {
      XSType type = pOwner.getXSSchema().getType(itemTypeName);
      if (type == null) {
        throw new LocSAXException("Unknown item type: " + itemTypeName, pBaseList.getLocator());
View Full Code Here

    } else {
      XSType type = pOwner.getXSSchema().getType(itemTypeName);
      if (type == null) {
        throw new LocSAXException("Unknown item type: " + itemTypeName, pBaseList.getLocator());
      }
      type.validate();
      if (!type.isSimple()) {
        throw new LocSAXException("The item type " + itemTypeName + " is complex.",
                                     pBaseList.getLocator());
      }
      itemType = type;
View Full Code Here

        XsQName name = names[i];
        XSType type = pOwner.getXSSchema().getType(name);
        if (type == null) {
          throw new LocSAXException("Unknown member type: " + name, pBaseUnion.getLocator());
        }
        type.validate();
        if (!type.isSimple()) {
          throw new LocSAXException("The member type " + name + " is complex.",
                                       pBaseUnion.getLocator());
        }
        memberTypes.add(type);
View Full Code Here

    XsTLocalSimpleType[] simpleTypes = pBaseUnion.getSimpleTypes();
    if (simpleTypes != null) {
      for (int i = 0;  i < simpleTypes.length;  i++) {
        XsTLocalSimpleType localSimpleType = simpleTypes[i];
        XSType type = pOwner.getXSSchema().getXSObjectFactory().newXSType(pOwner, localSimpleType);
        type.validate();
        memberTypes.add(type);
      }
    }
    if (memberTypes.size() == 0) {
      throw new LocSAXException("Neither the 'memberTypes' attribute nor the 'simpleType' child elements did define a member type.",
View Full Code Here

      }
      myType = attribute.getType();
    } else if (isInnerSimpleType()) {
      XsTLocalSimpleType innerSimpleType = getXsTAttribute().getSimpleType();
      myType = getXSSchema().getXSObjectFactory().newXSType(this, innerSimpleType);
      myType.validate();
    } else {
      XsQName typeName = getXsTAttribute().getType();
      if (typeName == null) {
        typeName = XSAnySimpleType.getInstance().getName();
      }
View Full Code Here

                                       getLocator());
        }
      }
    }
    this.type = myType;
    myType.validate();
  }

  public XSAnnotation[] getAnnotations() {
    return annotations;
  }
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.