Package org.apache.ws.jaxme.xs

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


    } else {
      isValidated = true;
    }

    if (isReference()) {
      XSAttributeGroup referencedGroup = getXSSchema().getAttributeGroup(getName());
      if (referencedGroup == null) {
        throw new LocSAXException("Invalid attribute group: Unknown attribute group " + name + " referenced",
                                   getLocator());
      }
      referencedGroup.validate();
      attributes = referencedGroup.getAttributes();
    } else {
      XsTAttributeGroup attributeGroup = (XsTAttributeGroup) getXsObject();
      attributes = getAttributes(this, attributeGroup);
    }
  }
View Full Code Here


        XsTAttributeGroupRef agRef = (XsTAttributeGroupRef) o;
        XsQName ref = agRef.getRef();
        if (ref == null) {
          throw new LocSAXException("Invalid attribute group: Missing 'ref' attribute", pObject.getLocator());
        }
        XSAttributeGroup attributeGroup = pObject.getXSSchema().getAttributeGroup(ref);
        if (attributeGroup == null) {
          throw new LocSAXException("Unknown attribute group name: " + ref, pObject.getLocator());
        }
        attributeGroup.validate();
        XSAttributable[] agAttributes = attributeGroup.getAttributes();
        for (int j = 0;  j < agAttributes.length;  j++) {
          attributes.add(agAttributes[j]);
        }
      } else if (o instanceof XsTAttributeGroup) {
        XsTAttributeGroup ag = (XsTAttributeGroup) o;
View Full Code Here

    XSAttributeGroup[] groups = schema.getAttributeGroups();
    assertNotNull(groups);
    assertEquals(2, groups.length);

    XSAttributeGroup ag1 = groups[0];
    assertEquals(new XsQName((String) null, "c"), ag1.getName());
    XSAttributable[] attr1 = ag1.getAttributes();
    assertEquals(3, attr1.length);
    XSAttribute attr1_1 = (XSAttribute) attr1[0];
    assertEquals(new XsQName((String) null, "d"), attr1_1.getName());
    assertEquals(XSDateTime.getInstance(), attr1_1.getType());
    XSAttribute attr1_2 = (XSAttribute) attr1[1];
    assertEquals(new XsQName((String) null, "e"), attr1_2.getName());
    assertEquals(XSFloat.getInstance(), attr1_2.getType());
    XSAttribute attr1_3 = (XSAttribute) attr1[2];
    assertEquals(new XsQName((String) null, "a"), attr1_3.getName());
    assertEquals(XSString.getInstance(), attr1_3.getType());

    XSAttributeGroup ag2 = groups[1];
    assertEquals(new XsQName((String) null, "f"), ag2.getName());
    XSAttributable[] attr2 = ag2.getAttributes();
    assertEquals(5, attr2.length);
    XSAttribute attr2_1 = (XSAttribute) attr2[0];
    assertEquals(new XsQName((String) null, "g"), attr2_1.getName());
    assertEquals(XSDouble.getInstance(), attr2_1.getType());
    XSAttribute attr2_2 = (XSAttribute) attr2[1];
View Full Code Here

    XSAttributeGroup[] groups = schema.getAttributeGroups();
    assertNotNull(groups);
    assertEquals(2, groups.length);

    XSAttributeGroup ag1 = groups[0];
    assertEquals(new XsQName((String) null, "c"), ag1.getName());
    XSAttributable[] attr1 = ag1.getAttributes();
    assertEquals(3, attr1.length);
    XSAttribute attr1_1 = (XSAttribute) attr1[0];
    assertEquals(new XsQName((String) null, "d"), attr1_1.getName());
    assertEquals(XSDateTime.getInstance(), attr1_1.getType());
    XSAttribute attr1_2 = (XSAttribute) attr1[1];
    assertEquals(new XsQName((String) null, "e"), attr1_2.getName());
    assertEquals(XSFloat.getInstance(), attr1_2.getType());
    XSAttribute attr1_3 = (XSAttribute) attr1[2];
    assertEquals(new XsQName((String) null, "a"), attr1_3.getName());
    assertEquals(XSString.getInstance(), attr1_3.getType());

    XSAttributeGroup ag2 = groups[1];
    assertEquals(new XsQName((String) null, "f"), ag2.getName());
    XSAttributable[] attr2 = ag2.getAttributes();
    assertEquals(5, attr2.length);
    XSAttribute attr2_1 = (XSAttribute) attr2[0];
    assertEquals(new XsQName((String) null, "g"), attr2_1.getName());
    assertEquals(XSDouble.getInstance(), attr2_1.getType());
    XSAttribute attr2_2 = (XSAttribute) attr2[1];
View Full Code Here

    } else {
      isValidated = true;
    }

    if (isReference()) {
      XSAttributeGroup referencedGroup = getXSSchema().getAttributeGroup(getName());
      if (referencedGroup == null) {
        throw new LocSAXException("Invalid attribute group: Unknown attribute group " + name + " referenced",
                                   getLocator());
      }
      referencedGroup.validate();
      attributes = referencedGroup.getAttributes();
    } else {
      XsTAttributeGroup attributeGroup = (XsTAttributeGroup) getXsObject();
      attributes = getAttributes(this, attributeGroup);
    }
  }
View Full Code Here

        XsTAttributeGroupRef agRef = (XsTAttributeGroupRef) o;
        XsQName ref = agRef.getRef();
        if (ref == null) {
          throw new LocSAXException("Invalid attribute group: Missing 'ref' attribute", pObject.getLocator());
        }
        XSAttributeGroup attributeGroup = pObject.getXSSchema().getAttributeGroup(ref);
        if (attributeGroup == null) {
          throw new LocSAXException("Unknown attribute group name: " + ref, pObject.getLocator());
        }
        attributeGroup.validate();
        XSAttributable[] agAttributes = attributeGroup.getAttributes();
        for (int j = 0;  j < agAttributes.length;  j++) {
          attributes.add(agAttributes[j]);
        }
      } else if (o instanceof XsTAttributeGroup) {
        XsTAttributeGroup ag = (XsTAttributeGroup) o;
View Full Code Here

    XSAttributeGroup[] groups = schema.getAttributeGroups();
    assertNotNull(groups);
    assertEquals(2, groups.length);

    XSAttributeGroup ag1 = groups[0];
    assertEquals(new XsQName((String) null, "c"), ag1.getName());
    XSAttributable[] attr1 = ag1.getAttributes();
    assertEquals(3, attr1.length);
    XSAttribute attr1_1 = (XSAttribute) attr1[0];
    assertEquals(new XsQName((String) null, "d"), attr1_1.getName());
    assertEquals(XSDateTime.getInstance(), attr1_1.getType());
    XSAttribute attr1_2 = (XSAttribute) attr1[1];
    assertEquals(new XsQName((String) null, "e"), attr1_2.getName());
    assertEquals(XSFloat.getInstance(), attr1_2.getType());
    XSAttribute attr1_3 = (XSAttribute) attr1[2];
    assertEquals(new XsQName((String) null, "a"), attr1_3.getName());
    assertEquals(XSString.getInstance(), attr1_3.getType());

    XSAttributeGroup ag2 = groups[1];
    assertEquals(new XsQName((String) null, "f"), ag2.getName());
    XSAttributable[] attr2 = ag2.getAttributes();
    assertEquals(5, attr2.length);
    XSAttribute attr2_1 = (XSAttribute) attr2[0];
    assertEquals(new XsQName((String) null, "g"), attr2_1.getName());
    assertEquals(XSDouble.getInstance(), attr2_1.getType());
    XSAttribute attr2_2 = (XSAttribute) attr2[1];
View Full Code Here

    XSAttributeGroup[] groups = schema.getAttributeGroups();
    assertNotNull(groups);
    assertEquals(2, groups.length);

    XSAttributeGroup ag1 = groups[0];
    assertEquals(new XsQName((String) null, "c"), ag1.getName());
    XSAttributable[] attr1 = ag1.getAttributes();
    assertEquals(3, attr1.length);
    XSAttribute attr1_1 = (XSAttribute) attr1[0];
    assertEquals(new XsQName((String) null, "d"), attr1_1.getName());
    assertEquals(XSDateTime.getInstance(), attr1_1.getType());
    XSAttribute attr1_2 = (XSAttribute) attr1[1];
    assertEquals(new XsQName((String) null, "e"), attr1_2.getName());
    assertEquals(XSFloat.getInstance(), attr1_2.getType());
    XSAttribute attr1_3 = (XSAttribute) attr1[2];
    assertEquals(new XsQName((String) null, "a"), attr1_3.getName());
    assertEquals(XSString.getInstance(), attr1_3.getType());

    XSAttributeGroup ag2 = groups[1];
    assertEquals(new XsQName((String) null, "f"), ag2.getName());
    XSAttributable[] attr2 = ag2.getAttributes();
    assertEquals(5, attr2.length);
    XSAttribute attr2_1 = (XSAttribute) attr2[0];
    assertEquals(new XsQName((String) null, "g"), attr2_1.getName());
    assertEquals(XSDouble.getInstance(), attr2_1.getType());
    XSAttribute attr2_2 = (XSAttribute) attr2[1];
View Full Code Here

    } else {
      isValidated = true;
    }

    if (isReference()) {
      XSAttributeGroup referencedGroup = getXSSchema().getAttributeGroup(getName());
      if (referencedGroup == null) {
        throw new LocSAXException("Invalid attribute group: Unknown attribute group " + name + " referenced",
                                   getLocator());
      }
      referencedGroup.validate();
      attributes = referencedGroup.getAttributes();
    } else {
      XsTAttributeGroup attributeGroup = (XsTAttributeGroup) getXsObject();
      attributes = getAttributes(this, attributeGroup);
    }
  }
View Full Code Here

        XsTAttributeGroupRef agRef = (XsTAttributeGroupRef) o;
        XsQName ref = agRef.getRef();
        if (ref == null) {
          throw new LocSAXException("Invalid attribute group: Missing 'ref' attribute", pObject.getLocator());
        }
        XSAttributeGroup attributeGroup = pObject.getXSSchema().getAttributeGroup(ref);
        if (attributeGroup == null) {
          throw new LocSAXException("Unknown attribute group name: " + ref, pObject.getLocator());
        }
        attributeGroup.validate();
        XSAttributable[] agAttributes = attributeGroup.getAttributes();
        for (int j = 0;  j < agAttributes.length;  j++) {
          attributes.add(agAttributes[j]);
        }
      } else if (o instanceof XsTAttributeGroup) {
        XsTAttributeGroup ag = (XsTAttributeGroup) o;
View Full Code Here

TOP

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

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.