Package org.eclipse.sapphire.modeling.xml

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


    @Test
   
    public void testMoveUp() throws Exception
    {
        final RootXmlResource rootXmlResource = new RootXmlResource( new XmlResourceStore( loadResource( "TestData.xml" ) ) );
        final TestRootElement root = TestRootElement.TYPE.instantiate( rootXmlResource );
       
        root.getChildren().moveUp( root.getChildren().get( 1 ) );
       
        try
View Full Code Here


    @Test
   
    public void testMoveDown() throws Exception
    {
        final RootXmlResource rootXmlResource = new RootXmlResource( new XmlResourceStore( loadResource( "TestData.xml" ) ) );
        final TestRootElement root = TestRootElement.TYPE.instantiate( rootXmlResource );
       
        root.getChildren().moveDown( root.getChildren().get( 0 ) );
       
        try
View Full Code Here

    @Test
   
    public void testSwap() throws Exception
    {
        final RootXmlResource rootXmlResource = new RootXmlResource( new XmlResourceStore( loadResource( "TestData.xml" ) ) );
        final TestRootElement root = TestRootElement.TYPE.instantiate( rootXmlResource );
       
        root.getChildren().swap( root.getChildren().get( 0 ), root.getChildren().get( 1 ) );
       
        try
View Full Code Here

    @Test
   
    public void testRemove1() throws Exception
    {
        final RootXmlResource rootXmlResource = new RootXmlResource( new XmlResourceStore( loadResource( "TestData.xml" ) ) );
        final TestRootElement root = TestRootElement.TYPE.instantiate( rootXmlResource );
       
        root.getChildren().remove( root.getChildren().get( 0 ) );
       
        try
View Full Code Here

    @Test
   
    public void testRemove2() throws Exception
    {
        final RootXmlResource rootXmlResource = new RootXmlResource( new XmlResourceStore( loadResource( "TestData.xml" ) ) );
        final TestRootElement root = TestRootElement.TYPE.instantiate( rootXmlResource );
       
        root.getChildren().remove( 0 );
       
        try
View Full Code Here

   
    @Test

    public void testRemoveAll() throws Exception
    {
        final RootXmlResource rootXmlResource = new RootXmlResource( new XmlResourceStore( loadResource( "TestData.xml" ) ) );
        final TestRootElement root = TestRootElement.TYPE.instantiate( rootXmlResource );
       
        root.getChildren().removeAll( Collections.singleton( root.getChildren().get( 0 ) ) );
       
        try
View Full Code Here

   
    @Test

    public void testRetainAll() throws Exception
    {
        final RootXmlResource rootXmlResource = new RootXmlResource( new XmlResourceStore( loadResource( "TestData.xml" ) ) );
        final TestRootElement root = TestRootElement.TYPE.instantiate( rootXmlResource );
       
        root.getChildren().retainAll( Collections.singleton( root.getChildren().get( 0 ) ) );
       
        try
View Full Code Here

   
    @Test

    public void testClear() throws Exception
    {
        final RootXmlResource rootXmlResource = new RootXmlResource( new XmlResourceStore( loadResource( "TestData.xml" ) ) );
        final TestRootElement root = TestRootElement.TYPE.instantiate( rootXmlResource );
       
        root.getChildren().clear();
       
        try
View Full Code Here

            file = new File( file, digest );
           
            try
            {
                final FileResourceStore fileResourceStore = new FileResourceStore( file );
                final XmlResourceStore xmlResourceStore = new XmlResourceStore( fileResourceStore );
                final XmlResource xmlResource = new RootXmlResource( xmlResourceStore );
               
                return PersistedState.TYPE.instantiate( xmlResource );
            }
            catch( ResourceStoreException e )
View Full Code Here

    {
        final ByteArrayResourceStore store = service( MasterConversionService.class ).convert( object, ByteArrayResourceStore.class );
       
        if( store != null )
        {
            return new RootXmlResource( new XmlResourceStore( store ) );
        }
       
        return null;
    }
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.