Package org.apache.ws.jaxme.xs.parser.impl

Examples of org.apache.ws.jaxme.xs.parser.impl.LocSAXException


  public XsEMinLength createMinLength() throws SAXException {
    throw new LocSAXException("A restriction with complex content doesn't support the 'minLength' child element.", getLocator());
  }

  public XsEMaxLength createMaxLength() throws SAXException {
    throw new LocSAXException("A restriction with complex content doesn't support the 'maxLength' child element.", getLocator());
  }
View Full Code Here


  public XsEMaxLength createMaxLength() throws SAXException {
    throw new LocSAXException("A restriction with complex content doesn't support the 'maxLength' child element.", getLocator());
  }

  public XsEWhiteSpace createWhiteSpace() throws SAXException {
    throw new LocSAXException("A restriction with complex content doesn't support the 'whiteSpace' child element.", getLocator());
  }
View Full Code Here

  public XsEWhiteSpace createWhiteSpace() throws SAXException {
    throw new LocSAXException("A restriction with complex content doesn't support the 'whiteSpace' child element.", getLocator());
  }

  public XsEPattern createPattern() throws SAXException {
    throw new LocSAXException("A restriction with complex content doesn't support the 'pattern' child element.", getLocator());
  }
View Full Code Here

  public XsEPattern createPattern() throws SAXException {
    throw new LocSAXException("A restriction with complex content doesn't support the 'pattern' child element.", getLocator());
  }

  public XsEEnumeration createEnumeration() throws SAXException {
    throw new LocSAXException("A restriction with complex content doesn't support the 'enumeration' child element.", getLocator());
  }
View Full Code Here

    if (isReference()) {
      qName = pBaseElement.getRef();
    } else {
      XsNCName myName = pBaseElement.getName();
      if (myName == null) {
        throw new LocSAXException("Invalid element: Must have either of its 'ref' or 'name' attributes set.",
                                     getLocator());
      }
      XsESchema schema = pBaseElement.getXsESchema();

      XsAnyURI namespace;
View Full Code Here

    XSType myType;
    if (isReference()) {
      XSElement element = getXSSchema().getElement(getName());
      if (element == null) {
        throw new LocSAXException("Invalid element reference: " + getName() + " is not defined.",
                                     getLocator());
      }
      element.validate();
      myType = element.getType();
    } else {
      XsTElement element = getXsTElement();
      if (isInnerSimpleType()) {
        myType = getXSSchema().getXSObjectFactory().newXSType(this, element.getSimpleType());
      } else if (isInnerComplexType()) {
        myType = getXSSchema().getXSObjectFactory().newXSType(this, element.getComplexType());
      } else {
        XsQName typeName = element.getType();
        if (typeName == null) {
          throw new LocSAXException("Invalid element: Either of its 'type' or 'ref' attributes or its 'simpleType' or 'complexType' children must be set.",
                                       getLocator());
        }
        myType = getXSSchema().getType(typeName);
        if (myType == null) {
          throw new LocSAXException("Invalid element: The type " + typeName + " is not defined.",
                                       getLocator());
        }
      }
    }
    this.type = myType;
View Full Code Here

    return minOccurs;
  }

  public void validate() throws SAXException {
    if (maxOccurs != -&&  minOccurs > maxOccurs) {
      throw new LocSAXException("The 'minOccurs' attribute value (" +
                                 minOccurs +
                                 ") is greater than the 'maxOccurs' attribute value (" +
                                 maxOccurs + ")", owner.getLocator());
    }
  }
View Full Code Here

    super(pParent);
  }

  public void setValue(long pValue) throws SAXException {
    if (pValue <= 0) {
      throw new LocSAXException("The 'value' attribute must be > 0.", getLocator());
    }
    super.setValue(pValue);
  }
View Full Code Here

        if (i == 0) {
          e = ex;
        }
      }
    }
    throw new LocSAXException("Failed to convert value " + pValue, getLocator(), e);
  }
View Full Code Here

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new DatatypeConverterImpl().parseInteger(pValue);
    } catch (NumberFormatException e) {
      throw new LocSAXException("Failed to convert string value to BigInteger: " + pValue, getLocator());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.xs.parser.impl.LocSAXException

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.