Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSComplexTypeDefinition


                        synth);

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSModelGroupTest01.xsd"));

        XSComplexTypeDefinition ct = (XSComplexTypeDefinition) model
                .getTypeDefinition("CT1", "XSModelGroup");
        XSParticle particle = ct.getParticle();
        XSModelGroup group = (XSModelGroup) particle.getTerm();

        XSAnnotation annotation = group.getAnnotation();
        assertEquals("TEST8_NO_ANNOTATION_" + synth, expected, trim(annotation
                .getAnnotationString()));
View Full Code Here


                        synth);

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSModelGroupTest01.xsd"));

        XSComplexTypeDefinition ct = (XSComplexTypeDefinition) model
                .getTypeDefinition("CT3", "XSModelGroup");
        XSParticle particle = ct.getParticle();
        XSModelGroup group = (XSModelGroup) particle.getTerm();

        XSAnnotation annotation = group.getAnnotation();
        assertEquals("TEST9_NO_ANNOTATION_" + synth, expected, trim(annotation
                .getAnnotationString()));
View Full Code Here

     */
    public void testAttrUseNoAnnotations() {
        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSAttributeUseAnnotationsTest01.xsd"));

        XSComplexTypeDefinition ct = (XSComplexTypeDefinition) model
                .getTypeDefinition("CT", "XSAttributeUseAnnotationsTest");

        XSObjectList attrUses = ct.getAttributeUses();

        // Attr ref
        XSAttributeUse attr = (XSAttributeUse) attrUses.item(0);
        XSObjectList annotations = attr.getAnnotations();
        assertEquals("REF", 0, annotations.getLength());
View Full Code Here

                        Boolean.FALSE);

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSAttributeUseAnnotationsTest01.xsd"));

        XSComplexTypeDefinition ct = (XSComplexTypeDefinition) model
                .getTypeDefinition("CT", "XSAttributeUseAnnotationsTest");

        XSObjectList attrUses = ct.getAttributeUses();

        // Attr ref
        XSAttributeUse attr = (XSAttributeUse) attrUses.item(0);
        XSObjectList annotations = attr.getAnnotations();
        assertEquals("REF", 0, annotations.getLength());
View Full Code Here

                        Boolean.TRUE);

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSAttributeUseAnnotationsTest01.xsd"));

        XSComplexTypeDefinition ct = (XSComplexTypeDefinition) model
                .getTypeDefinition("CT", "XSAttributeUseAnnotationsTest");

        XSObjectList attrUses = ct.getAttributeUses();

        // Attr ref
        XSAttributeUse attr = (XSAttributeUse) attrUses.item(0);
        XSObjectList annotations = attr.getAnnotations();
        assertEquals("REF", 1, annotations.getLength());
View Full Code Here

                        Boolean.FALSE);

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSAttributeUseAnnotationsTest02.xsd"));

        XSComplexTypeDefinition ct = (XSComplexTypeDefinition) model
                .getTypeDefinition("CT", "XSAttributeUseAnnotationsTest");

        XSObjectList attrUses = ct.getAttributeUses();

        // Attr ref
        XSAttributeUse attr = (XSAttributeUse) attrUses.item(0);
        XSObjectList annotations = attr.getAnnotations();
        assertEquals("REF", 1, annotations.getLength());
View Full Code Here

                        Boolean.TRUE);

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSAttributeUseAnnotationsTest02.xsd"));

        XSComplexTypeDefinition ct = (XSComplexTypeDefinition) model
                .getTypeDefinition("CT", "XSAttributeUseAnnotationsTest");

        XSObjectList attrUses = ct.getAttributeUses();

        // Attr ref
        XSAttributeUse attr = (XSAttributeUse) attrUses.item(0);
        XSObjectList annotations = attr.getAnnotations();
        assertEquals("REF", 1, annotations.getLength());
View Full Code Here

                        Boolean.TRUE);

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSAttributeUseAnnotationsTest03.xsd"));

        XSComplexTypeDefinition ct = (XSComplexTypeDefinition) model
                .getTypeDefinition("CT", "XSAttributeUseAnnotationsTest");

        XSObjectList attrUses = ct.getAttributeUses();

        // Attr ref
        XSAttributeUse attr = (XSAttributeUse) attrUses.item(0);
        XSObjectList annotations = attr.getAnnotations();
        assertEquals("REF", 1, annotations.getLength());
View Full Code Here

      assertTrue("Schema Annotations length > 0", xsobjlist.getLength()>0);
     
      //Test Annotation at the Complex Type Level
      XSTypeDefinition xt = xsmodel.getTypeDefinition("USAddress","http://org.jboss.ws/types");
      assertTrue("USAddress is a complex type?",xt instanceof XSComplexTypeDefinition);
      XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xt;
      XSObjectList xo = xc.getAnnotations();
      assertTrue("There is one annotation", xo.getLength() == 1);
     
      //Test Annotation at the Global Element Level
      XSElementDeclaration xe = xsmodel.getElementDeclaration("myAddress","http://org.jboss.ws/types");
      XSAnnotation xa = xe.getAnnotation();
View Full Code Here

      XSElementDeclaration decl = xsmodel.getElementDeclaration(">root>inside", "http://org.jboss.ws/anonymous/types");
      assertEquals(decl.getName(), "inside");

      XSTypeDefinition defi = xsmodel.getTypeDefinition(">>root>inside", "http://org.jboss.ws/anonymous/types");
      assertEquals(defi.getTypeCategory(), XSTypeDefinition.COMPLEX_TYPE);
      XSComplexTypeDefinition complex = (XSComplexTypeDefinition) defi;
      XSTerm term = complex.getParticle().getTerm();
      assertEquals(term.getType(), XSConstants.MODEL_GROUP);
      XSModelGroup group = (XSModelGroup) term;
      XSParticle particle = (XSParticle) group.getParticles().item(0);
      term = particle.getTerm();
      assertEquals(term.getType(), XSConstants.ELEMENT_DECLARATION);
View Full Code Here

TOP

Related Classes of org.apache.xerces.xs.XSComplexTypeDefinition

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.