Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSModelGroup


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

        XSModelGroupDefinition mgd = model.getModelGroupDefinition("group4",
                "XSModelGroup");
        XSModelGroup group = mgd.getModelGroup();

        XSAnnotation annotation = group.getAnnotation();
        assertEquals("TEST4_NO_ANNOTATION_" + synth, expected, trim(annotation
                .getAnnotationString()));
        XSObjectList annotations = group.getAnnotations();
        assertEquals("TEST4_NO_ANNOTATIONS_" + synth, 1, annotations
                .getLength());
        assertEquals(
                "TEST4_NO_ANNOTATIONS_" + synth,
                expected,
View Full Code Here


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

        XSModelGroupDefinition mgd = model.getModelGroupDefinition("group5",
                "XSModelGroup");
        XSModelGroup group = mgd.getModelGroup();

        XSAnnotation annotation = group.getAnnotation();
        assertEquals("TEST5.1_NO_ANNOTATION_" + synth, expected1,
                trim(annotation.getAnnotationString()));
        XSObjectList annotations = group.getAnnotations();
        assertEquals("TEST5.1_NO_ANNOTATIONS_" + synth, 1, annotations
                .getLength());
        assertEquals(
                "TEST5.1_NO_ANNOTATIONS_" + synth,
                expected1,
                trim(((XSAnnotation) annotations.item(0)).getAnnotationString()));

        group = (XSModelGroup) ((XSParticle) group.getParticles().item(0))
                .getTerm();
        annotation = group.getAnnotation();
        assertEquals("TEST5.2_NO_ANNOTATION_" + synth, expected2,
                trim(annotation.getAnnotationString()));
        annotations = group.getAnnotations();
        assertEquals("TEST5.2_NO_ANNOTATIONS_" + synth, 1, annotations
                .getLength());
        assertEquals(
                "TEST5.2_NO_ANNOTATIONS_" + synth,
                expected2,
View Full Code Here

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

        XSModelGroupDefinition mgd = model.getModelGroupDefinition("group6",
                "XSModelGroup");
        XSModelGroup group = mgd.getModelGroup();

        XSAnnotation annotation = group.getAnnotation();
        assertEquals("TEST6.1_NO_ANNOTATION_" + synth, expected1,
                trim(annotation.getAnnotationString()));
        XSObjectList annotations = group.getAnnotations();
        assertEquals("TEST6.1_NO_ANNOTATIONS_" + synth, 1, annotations
                .getLength());
        assertEquals(
                "TEST6.1_NO_ANNOTATIONS_" + synth,
                expected1,
                trim(((XSAnnotation) annotations.item(0)).getAnnotationString()));

        group = (XSModelGroup) ((XSParticle) group.getParticles().item(0))
                .getTerm();
        annotation = group.getAnnotation();
        assertEquals("TEST6.2_NO_ANNOTATION_" + synth, expected2,
                trim(annotation.getAnnotationString()));
        annotations = group.getAnnotations();
        assertEquals("TEST6.2_NO_ANNOTATIONS_" + synth, 1, annotations
                .getLength());
        assertEquals(
                "TEST6.2_NO_ANNOTATIONS_" + synth,
                expected2,
                trim(((XSAnnotation) annotations.item(0)).getAnnotationString()));

        group = (XSModelGroup) ((XSParticle) group.getParticles().item(0))
                .getTerm();
        annotation = group.getAnnotation();
        assertEquals("TEST6.3_NO_ANNOTATION_" + synth, expected3,
                trim(annotation.getAnnotationString()));
        annotations = group.getAnnotations();
        assertEquals("TEST6.3_NO_ANNOTATIONS_" + synth, 1, annotations
                .getLength());
        assertEquals(
                "TEST6.3_NO_ANNOTATIONS_" + synth,
                expected3,
View Full Code Here

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

        XSModelGroupDefinition mgd = model.getModelGroupDefinition("group7",
                "XSModelGroup");
        XSModelGroup group = mgd.getModelGroup();

        XSAnnotation annotation = group.getAnnotation();
        assertEquals("TEST7.1_ANNOTATION_" + synth, expected1,
                trim(annotation.getAnnotationString()));
        XSObjectList annotations = group.getAnnotations();
        assertEquals("TEST7.1_ANNOTATIONS_" + synth, 1, annotations
                .getLength());
        assertEquals(
                "TEST7.1_ANNOTATIONS_" + synth,
                expected1,
                trim(((XSAnnotation) annotations.item(0)).getAnnotationString()));

        if (synth == Boolean.TRUE) {
            group = (XSModelGroup) ((XSParticle) group.getParticles().item(0))
                    .getTerm();
            annotation = group.getAnnotation();
            assertEquals("TEST7.2_ANNOTATION_" + synth, expected2,
                    trim(annotation.getAnnotationString()));
            annotations = group.getAnnotations();
            assertEquals("TEST7.2_ANNOTATIONS_" + synth, 1, annotations
                    .getLength());
            assertEquals("TEST7.2_ANNOTATIONS_" + synth, expected2,
                    trim(((XSAnnotation) annotations.item(0))
                            .getAnnotationString()));
View Full Code Here

                .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()));
        XSObjectList annotations = group.getAnnotations();
        assertEquals("TEST8_NO_ANNOTATIONS_" + synth, 1, annotations
                .getLength());
        assertEquals(
                "TEST8_NO_ANNOTATIONS_" + synth,
                expected,
View Full Code Here

                .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()));
        XSObjectList annotations = group.getAnnotations();
        assertEquals("TEST9_NO_ANNOTATIONS_" + synth, 1, annotations
                .getLength());
        assertEquals(
                "TEST9_NO_ANNOTATIONS_" + synth,
                expected,
View Full Code Here

        XSElementDeclaration elem = model.getElementDeclaration("root",
                "XSWildcardTest");
        XSParticle seq = ((XSComplexTypeDefinition) elem.getTypeDefinition())
                .getParticle();
        XSModelGroup mg = (XSModelGroup) seq.getTerm();
        XSParticle anyPart = (XSParticle) mg.getParticles().item(1);
        XSWildcard elemWC = (XSWildcard) anyPart.getTerm();

        XSAnnotation annotation = elemWC.getAnnotation();
        assertNull("TEST4_ELEMWC_NO_ANNOTATION", annotation);
View Full Code Here

        XSElementDeclaration elem = model.getElementDeclaration("root",
                "XSWildcardTest");
        XSParticle seq = ((XSComplexTypeDefinition) elem.getTypeDefinition())
                .getParticle();
        XSModelGroup mg = (XSModelGroup) seq.getTerm();
        XSParticle anyPart = (XSParticle) mg.getParticles().item(2);
        XSWildcard elemWC = (XSWildcard) anyPart.getTerm();

        XSAnnotation annotation = elemWC.getAnnotation();
        assertNotNull("TEST5_ELEMWC_SYNTH_ANNOTATION", annotation);
View Full Code Here

        XSElementDeclaration elem = model.getElementDeclaration("root",
                "XSWildcardTest");
        XSParticle seq = ((XSComplexTypeDefinition) elem.getTypeDefinition())
                .getParticle();
        XSModelGroup mg = (XSModelGroup) seq.getTerm();
        XSParticle anyPart = (XSParticle) mg.getParticles().item(3);
        XSWildcard elemWC = (XSWildcard) anyPart.getTerm();

        XSAnnotation annotation = elemWC.getAnnotation();
        assertEquals("TEST6_ELEMWC_ANNOTATION", expected, trim(annotation
                .getAnnotationString()));
View Full Code Here

        XSElementDeclaration elem = model.getElementDeclaration("root",
                "XSWildcardTest");
        XSParticle seq = ((XSComplexTypeDefinition) elem.getTypeDefinition())
                .getParticle();
        XSModelGroup mg = (XSModelGroup) seq.getTerm();
        XSParticle anyPart = (XSParticle) mg.getParticles().item(4);
        XSWildcard elemWC = (XSWildcard) anyPart.getTerm();

        XSAnnotation annotation = elemWC.getAnnotation();
        assertEquals("TEST7_ELEMWC_ANNOTATION", expected, trim(annotation
                .getAnnotationString()));
View Full Code Here

TOP

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

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.