Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSAnnotation


        XSSimpleTypeDefinition st = (XSSimpleTypeDefinition) attr
                .getTypeDefinition();
        // Item 0 is minInclusive
        XSFacet maxLength = (XSFacet) st.getFacets().item(1);

        XSAnnotation annotation = maxLength.getAnnotation();
        assertEquals("TEST16_ANNOTATION_" + synth, expected, trim(annotation
                .getAnnotationString()));
        XSObjectList annotations = maxLength.getAnnotations();
        assertEquals(
                "TES16_ANNOTATIONS_" + synth,
                expected,
View Full Code Here


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

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

        assertNull(annotation);
    }
View Full Code Here

        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\">"
                + "<!-- No Appinfo -->"
                + "</appinfo><documentation>ANNOT1 should be seen</documentation>"
                + "</annotation>";

        String actual = annotation.getAnnotationString();

        assertEquals(trim(expectedResult), trim(actual));
    }
View Full Code Here

                + "<!-- 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>";

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

        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

        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

                + "<!-- 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));
        }
    }
View Full Code Here

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSElementTest01.xsd"));
        XSElementDeclaration elem = model.getElementDeclaration("elem1",
                "XSElement");

        XSAnnotation annotation = elem.getAnnotation();
        assertNull("TEST1_NO_ANNOTATION", annotation);
        XSObjectList annotations = elem.getAnnotations();
        assertEquals("TEST1_NO_ANNOTATIONS", 0, annotations.getLength());
    }
View Full Code Here

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSElementTest01.xsd"));
        XSElementDeclaration elem = model.getElementDeclaration("elem2",
                "XSElement");

        XSAnnotation annotation = elem.getAnnotation();
        assertNull("TEST2_NO_ANNOTATION", annotation);
        XSObjectList annotations = elem.getAnnotations();
        assertEquals("TEST2_NO_ANNOTATIONS", 0, annotations.getLength());
    }
View Full Code Here

        XSModel model = fSchemaLoader
                .loadURI(getResourceURL("XSElementTest01.xsd"));
        XSElementDeclaration elem = model.getElementDeclaration("elem2",
                "XSElement");

        XSAnnotation annotation = elem.getAnnotation();
        assertEquals("TEST3_ANNOTATION", expected, trim(annotation
                .getAnnotationString()));
        XSObjectList annotations = elem.getAnnotations();
        assertEquals(
                "TEST3_ANNOTATIONS",
                expected,
View Full Code Here

TOP

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

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.