Package org.eclipse.sapphire.modeling.xml

Examples of org.eclipse.sapphire.modeling.xml.XmlResourceStore


    @Test
   
    public void test() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestModelRoot root = TestModelRoot.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        ( (TestModelElementA1) root.getList().insert( TestModelElementA1.TYPE ) ).setValue( "1111" );
        ( (TestModelElementA2) root.getList().insert( TestModelElementA2.TYPE ) ).setValue( "2222" );
       
View Full Code Here


    @Test
   
    public void test() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestModelRoot root = TestModelRoot.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        ( (TestModelElementA1) root.getList().insert( TestModelElementA1.TYPE ) ).setValue( "1111" );
        ( (TestModelElementA2) root.getList().insert( TestModelElementA2.TYPE ) ).setValue( "2222" );
       
View Full Code Here

{
    @Test
   
    public void testInMapping() throws Exception
    {
        final XmlResourceStore xmlResourceStore = new XmlResourceStore();
        final TestXmlBinding0006A element = TestXmlBinding0006A.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        try
        {
            element.getTestProperty().insert();
View Full Code Here

   
    @Test

    public void testInPath() throws Exception
    {
        final XmlResourceStore xmlResourceStore = new XmlResourceStore();
        final TestXmlBinding0006B element = TestXmlBinding0006B.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        try
        {
            element.getTestProperty().insert();
View Full Code Here

    @Test
   
    public void test() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final TestModelRoot root = TestModelRoot.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        ( (TestModelElementA1) root.getList().insert( TestModelElementA1.TYPE ) ).setValue( "1111" );
        ( (TestModelElementA2) root.getList().insert( TestModelElementA2.TYPE ) ).setValue( "2222" );
       
View Full Code Here

    @Test
   
    public void test() throws Exception
    {
        final ByteArrayResourceStore byteArrayResourceStore = new ByteArrayResourceStore( loadResourceAsStream( "initial.txt" ) );
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( byteArrayResourceStore );

        final TestElement root = TestElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
        root.setTestProperty( "abc" );
       
        root.resource().save();
View Full Code Here

{
    @Test
   
    public void test() throws Exception
    {
        final XmlResourceStore xmlResourceStore = new XmlResourceStore();
        final TestXmlBinding0001ModelElement element = TestXmlBinding0001ModelElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        try
        {
            element.getTestProperty().content( true );
View Full Code Here

        final XmlDocumentSchema schema = XmlDocumentSchemasCache.getSchema( null, null, "http://www.eclipse.org/sapphire/tests/xml/dtd/0005s.dtd" );
       
        assertNotNull( schema );
        assertNotNull( schema.getElement( "system" ) );
       
        final XmlResourceStore store = new XmlResourceStore( loadResource( "System.xml" ) );
        final XmlElement element = new XmlElement( store, store.getDomDocument().getDocumentElement() );
       
        assertNotNull( element.getContentModel() );
    }
View Full Code Here

        final XmlDocumentSchema schema = XmlDocumentSchemasCache.getSchema( null, "-//Sapphire//TestCatalogResolution1//EN", "http://www.eclipse.org/sapphire/tests/xml/dtd/0005p.dtd" );
       
        assertNotNull( schema );
        assertNotNull( schema.getElement( "public" ) );
       
        final XmlResourceStore store = new XmlResourceStore( loadResource( "Public1.xml" ) );
        final XmlElement element = new XmlElement( store, store.getDomDocument().getDocumentElement() );
       
        assertNotNull( element.getContentModel() );
    }
View Full Code Here

        final XmlDocumentSchema schema = XmlDocumentSchemasCache.getSchema( null, "-//Sapphire//TestCatalogResolution2//EN", "http://www.eclipse.org/sapphire/tests/xml/dtd/0005p.dtd" );
       
        assertNotNull( schema );
        assertNotNull( schema.getElement( "public" ) );
       
        final XmlResourceStore store = new XmlResourceStore( loadResource( "Public2.xml" ) );
        final XmlElement element = new XmlElement( store, store.getDomDocument().getDocumentElement() );
       
        assertNotNull( element.getContentModel() );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.xml.XmlResourceStore

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.