Examples of XSAttributeGroupDefinition


Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

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

        XSAttributeGroupDefinition AG = model.getAttributeGroup("AG",
                "XSAttributeGroupAnnotationsTest");
        XSAnnotation annotation = AG.getAnnotation();

        assertNull(annotation);
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

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

        XSAttributeGroupDefinition AG = model.getAttributeGroup("AG",
                "XSAttributeGroupAnnotationsTest");
        XSObjectList annotations = AG.getAnnotations();

        assertEquals(0, annotations.getLength());
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

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

        XSAttributeGroupDefinition AG = model.getAttributeGroup("AG",
                "XSAttributeGroupAnnotationsTest");
        XSAnnotation annotation = AG.getAnnotation();

        String expectedResult = "<annotation id=\"ANNOT1\" "
                + "xmlns=\"http://www.w3.org/2001/XMLSchema\" "
                + "xmlns:sv=\"XSAttributeGroupAnnotationsTest\" >"
                + "<appinfo source=\"None\">"
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

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

        XSAttributeGroupDefinition AG = model.getAttributeGroup("AG",
                "XSAttributeGroupAnnotationsTest");
        XSObjectList annotations = AG.getAnnotations();

        String expectedResult = "<annotation id=\"ANNOT1\" "
                + "xmlns=\"http://www.w3.org/2001/XMLSchema\" "
                + "xmlns:sv=\"XSAttributeGroupAnnotationsTest\" >"
                + "<appinfo source=\"None\">"
                + "<!-- No Appinfo -->"
                + "</appinfo><documentation>ANNOT1 should be seen</documentation>"
                + "</annotation>";

        for (int i = 0; i < annotations.getLength(); i++) {
            XSAnnotation annotation = (XSAnnotation) annotations.item(i);
            String actual = annotation.getAnnotationString();
            assertEquals(trim(expectedResult), trim(actual));
        }

        AG = model.getAttributeGroup("AG2", "XSAttributeGroupAnnotationsTest");
        annotations = AG.getAnnotations();

        expectedResult = "<annotation id=\"ANNOT2\" "
                + "xmlns=\"http://www.w3.org/2001/XMLSchema\" "
                + "xmlns:sv=\"XSAttributeGroupAnnotationsTest\" >"
                + "</annotation>";
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

                        Boolean.TRUE);

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

        XSAttributeGroupDefinition AG = model.getAttributeGroup("AG",
                "XSAttributeGroupAnnotationsTest");
        XSAnnotation annotation = AG.getAnnotation();

        assertNotNull("Synthetic Annotation Null", annotation);
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

                        Boolean.TRUE);

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

        XSAttributeGroupDefinition AG = model.getAttributeGroup("AG",
                "XSAttributeGroupAnnotationsTest");
        XSObjectList annotations = AG.getAnnotations();

        assertEquals("Synthetic Annotation Empty", 1, annotations.getLength());
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

                        Boolean.FALSE);

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

        XSAttributeGroupDefinition AG = model.getAttributeGroup("AG",
                "XSAttributeGroupAnnotationsTest");
        XSAnnotation annotation = AG.getAnnotation();

        assertNull("Synthetic Annotation Not Null", annotation);
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

                        Boolean.TRUE);

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

        XSAttributeGroupDefinition AG = model.getAttributeGroup("AG1",
                "XSAttributeGroupAnnotationsTest");
        XSObjectList annotations = AG.getAnnotations();

        assertEquals("Synthetic Annotation Empty", 0, annotations.getLength());
    }
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

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

        XSAttributeGroupDefinition AG = model.getAttributeGroup("AG",
                "XSAttributeGroupAnnotationsTest");

        XSObjectList annotations = AG.getAnnotations();

        String expectedResult = "<annotation id=\"ANNOT1\" "
                + "xmlns=\"http://www.w3.org/2001/XMLSchema\" "
                + "xmlns:sv=\"XSAttributeGroupAnnotationsTest\" >"
                + "<appinfo source=\"None\">"
View Full Code Here

Examples of org.apache.xerces.xs.XSAttributeGroupDefinition

                + "<appinfo>APPINFO</appinfo><documentation>DOC</documentation>"
                + "</annotation>");

        XSModel model = getXSModel(synthetic);

        XSAttributeGroupDefinition attgp = model.getAttributeGroup("attgrp",
                "XSWildcardTest");
        XSWildcard attrWC = attgp.getAttributeWildcard();

        XSAnnotation annotation = attrWC.getAnnotation();
        assertEquals("TEST3_ATTRWC_ANNOTATION_" + synthetic, expected,
                trim(annotation.getAnnotationString()));
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.