Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.XSNotationDeclaration


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

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation1", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNull("TEST1_NO_ANNOTATION", annotation);

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST1_NO_ANNOTATIONS", 0, annotations.getLength());

    }
View Full Code Here


                        Boolean.TRUE);

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

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation2", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNotNull("TEST2_ANNOTATION", annotation);

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST2_ANNOTATIONS", 1, annotations.getLength());
    }
View Full Code Here

                        Boolean.FALSE);

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

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation2", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNull("TEST3_NO_ANNOTATION", annotation);

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST3_NO_ANNOTATIONS", 0, annotations.getLength());

    }
View Full Code Here

    private void annotationsTest4(XSModel model) {
        String expected = "<annotation id=\"ANNOT1\" xmlns=\"http://www.w3.org/2001/XMLSchema\" xmlns:sv=\"XSNotationAnnotationsTest\" xmlns:sn=\"SyntheticAnnotation\" > "
                + "<appinfo>APPINFO1</appinfo>" + "</annotation>";

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation3", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNotNull("TEST4_ANNOTATION", annotation);
        assertEquals("TEST4_ANNOTATION_EQ", trim(expected), trim(annotation
                .getAnnotationString()));

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST4_ANNOTATIONS", 1, annotations.getLength());
        assertEquals(
                "TEST4_ANNOTATIONS_EQ",
                trim(expected),
                trim(((XSAnnotation) annotations.item(0)).getAnnotationString()));
View Full Code Here

    private void annotationsTest5(XSModel model) {
        String expected = "<annotation sn:att=\"synth\" id=\"ANNOT2\" xmlns=\"http://www.w3.org/2001/XMLSchema\" xmlns:sv=\"XSNotationAnnotationsTest\" xmlns:sn=\"SyntheticAnnotation\" > "
                + "<documentation>DOC1</documentation>" + "</annotation>";

        XSNotationDeclaration notation = model.getNotationDeclaration(
                "notation4", "XSNotationAnnotationsTest");
        XSAnnotation annotation = notation.getAnnotation();
        assertNotNull("TEST5_ANNOTATION", annotation);
        assertEquals("TEST5_ANNOTATION_EQ", trim(expected), trim(annotation
                .getAnnotationString()));

        XSObjectList annotations = notation.getAnnotations();
        assertEquals("TEST5_ANNOTATIONS", 1, annotations.getLength());
        assertEquals(
                "TEST5_ANNOTATIONS_EQ",
                trim(expected),
                trim(((XSAnnotation) annotations.item(0)).getAnnotationString()));
View Full Code Here

TOP

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

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.