Package org.eclipse.sapphire.modeling.xml.schema

Examples of org.eclipse.sapphire.modeling.xml.schema.XmlContentModel$Position


   
    @Test
   
    public void test_5C() throws Exception
    {
        final XmlContentModel XmlContentModel =
           
            sequence
            (
                1, 1,
                element( "A", 1, 1 ),
View Full Code Here


                    }
                }
            }
            else
            {
                final XmlContentModel parentXmlContentModel = parent.getContentModel();
               
                if( parentXmlContentModel != null )
                {
                    this.contentModel = parentXmlContentModel.findChildElementContentModel( getQualifiedName() );
                }
            }
           
            this.contentModelInitialized = true;
        }
View Full Code Here

       
        Node refNodeRevised = refNode;
       
        if( refNodeRevised == null )
        {
            final XmlContentModel xmlContentModel = getContentModel();
           
            if( xmlContentModel != null )
            {
                final int position = xmlContentModel.findInsertionPosition( siblings, name );
               
                if( position < siblingsCount )
                {
                    refNodeRevised = siblings.item( position );
                }
View Full Code Here

                    final Element root = domElement.getOwnerDocument().getDocumentElement();
                    root.setAttribute( xmlnsAttrName, namespace );
                   
                    if( ! namespace.equals( "http://www.w3.org/2001/XMLSchema-instance" ) )
                    {
                        final XmlContentModel xmlContentModel = getContentModel();
                        String schemaLocation = null;
                       
                        if( xmlContentModel != null )
                        {
                            schemaLocation = xmlContentModel.getSchema().getSchemaLocation( namespace );
                        }
                       
                        addSchemaLocation( namespace, schemaLocation );
                    }
                }
View Full Code Here

        assertEquals( "shape", ( (XmlElementDefinition) nestedContent.get( 0 ) ).getName().getLocalPart() );
        assertEquals( "aaa", ( (XmlElementDefinition) nestedContent.get( 1 ) ).getName().getLocalPart() );
        assertEquals( "bbb", ( (XmlElementDefinition) nestedContent.get( 2 ) ).getName().getLocalPart() );
        assertEquals( "ccc", ( (XmlElementDefinition) nestedContent.get( 3 ) ).getName().getLocalPart() );

        final XmlContentModel circleContentModel = rootContentModel.findChildElementContentModel(new QName( SCHEMA_LOCATION, "circle" ));
        assertNotNull(circleContentModel);
        final XmlContentModel squareContentModel = rootContentModel.findChildElementContentModel(new QName( SCHEMA_LOCATION, "square" ));
        assertNotNull(squareContentModel);
    }
View Full Code Here

        assertEquals( "x", ( (XmlElementDefinition) rectangleNestedContent.get( 0 ) ).getName().getLocalPart() );
        assertEquals( "y", ( (XmlElementDefinition) rectangleNestedContent.get( 1 ) ).getName().getLocalPart() );
        assertEquals( "width", ( (XmlElementDefinition) rectangleNestedContent.get( 2 ) ).getName().getLocalPart() );
        assertEquals( "height", ( (XmlElementDefinition) rectangleNestedContent.get( 3 ) ).getName().getLocalPart() );
       
        final XmlContentModel foundCircleContentModel = workbookContentModel.findChildElementContentModel( new QName( NAMESPACE, "circle" ) );
        assertNotNull( foundCircleContentModel );
       
        final XmlContentModel foundRectangleContentModel = workbookContentModel.findChildElementContentModel( new QName( NAMESPACE, "rectangle" ) );
        assertNotNull( foundRectangleContentModel );
    }
View Full Code Here

        assertEquals( "x", ( (XmlElementDefinition) rectangleNestedContent.get( 0 ) ).getName().getLocalPart() );
        assertEquals( "y", ( (XmlElementDefinition) rectangleNestedContent.get( 1 ) ).getName().getLocalPart() );
        assertEquals( "width", ( (XmlElementDefinition) rectangleNestedContent.get( 2 ) ).getName().getLocalPart() );
        assertEquals( "height", ( (XmlElementDefinition) rectangleNestedContent.get( 3 ) ).getName().getLocalPart() );
       
        final XmlContentModel foundCircleContentModel = workbookContentModel.findChildElementContentModel( new QName( NAMESPACE, "circle" ) );
        assertNotNull( foundCircleContentModel );
       
        final XmlContentModel foundRectangleContentModel = workbookContentModel.findChildElementContentModel( new QName( NAMESPACE, "rectangle" ) );
        assertNotNull( foundRectangleContentModel );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.xml.schema.XmlContentModel$Position

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.