Package org.eclipse.sapphire.modeling

Examples of org.eclipse.sapphire.modeling.ByteArrayResourceStore


        }
    }
   
    public XmlResourceStore( final byte[] contents )
    {
        this( new ByteArrayResourceStore( contents ) );
    }
View Full Code Here


        this( new ByteArrayResourceStore( contents ) );
    }
   
    public XmlResourceStore( final String contents )
    {
        this( new ByteArrayResourceStore( contents ) );
    }
View Full Code Here

        this( new ByteArrayResourceStore( contents ) );
    }
   
    public XmlResourceStore( final InputStream contents ) throws ResourceStoreException
    {
        this( new ByteArrayResourceStore( contents ) );
    }
View Full Code Here

    }

    @Override
    public RootXmlResource convert( final Object object )
    {
        final ByteArrayResourceStore store = service( MasterConversionService.class ).convert( object, ByteArrayResourceStore.class );
       
        if( compatible( store ) )
        {
            return new RootXmlResource( new XmlResourceStore( store ) );
        }
View Full Code Here

{
    @Test
   
    public void testUniqueValue() throws Exception
    {
        final ByteArrayResourceStore byteArrayResourceStore = new ByteArrayResourceStore( generateTestData( 10 ) );
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( byteArrayResourceStore );
        final TestElement element = TestElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
        final ElementList<TestElement.ListEntry> list = element.getList();
       
        assertValidationOk( element );
View Full Code Here

    @Test
   
    public void testUniqueValue_ValidateNull() throws Exception
    {
        final ByteArrayResourceStore byteArrayResourceStore = new ByteArrayResourceStore( generateTestData( 10 ) );
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( byteArrayResourceStore );
        final TestElementValidateNull element = TestElementValidateNull.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
        final ElementList<TestElementValidateNull.ListEntry> list = element.getList();
       
        assertValidationOk( element );
View Full Code Here

   
    private void testUniqueValuePerformance( final int entries ) throws Exception
    {
        final Counter counter = Counter.find( UniqueValueValidationService.class );
       
        final ByteArrayResourceStore byteArrayResourceStore = new ByteArrayResourceStore( generateTestData( entries ) );
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( byteArrayResourceStore );
       
        counter.reset();
       
        final TestElement element = TestElement.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
View Full Code Here

    }

    @Override
    public RootXmlResource convert( final Object object )
    {
        final ByteArrayResourceStore store = service( MasterConversionService.class ).convert( object, ByteArrayResourceStore.class );
       
        if( store != null )
        {
            return new RootXmlResource( new XmlResourceStore( store ) );
        }
View Full Code Here

                includedSchemaLocation = context + "/" + includedSchemaLocation;
            }

            try
            {
                ByteArrayResourceStore includedSchemaResourceStore;
               
                if( includedSchemaLocation.startsWith( "http://" ) )
                {
                    includedSchemaResourceStore = new UrlResourceStore( new URL( includedSchemaLocation ) );
                }
View Full Code Here

{
    @Test
   
    public void testValueProperties1() throws Exception
    {
        final ByteArrayResourceStore resourceStore = new ByteArrayResourceStore();
        final XmlResourceStore xmlResourceStore = new XmlResourceStore( resourceStore );
        final XmlBindingTestModel model = XmlBindingTestModel.TYPE.instantiate( new RootXmlResource( xmlResourceStore ) );
       
        testValueProperties( resourceStore, model, loadResource( XmlBindingTests.class.getSimpleName() + ".testValueProperties1.txt" ) );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.ByteArrayResourceStore

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.