Package org.eclipse.sapphire.modeling.xml.annotations

Examples of org.eclipse.sapphire.modeling.xml.annotations.XmlListBinding


                }
            }
           
            if( xmlPath == null )
            {
                final XmlListBinding xmlListBindingAnnotation = property.getAnnotation( XmlListBinding.class );
               
                if( xmlListBindingAnnotation != null )
                {
                    if( xmlListBindingAnnotation.mappings().length == 1 )
                    {
                        xmlPath = xmlListBindingAnnotation.mappings()[ 0 ].element();
                       
                        if( xmlListBindingAnnotation.path().length() > 0 )
                        {
                            xmlPath = xmlListBindingAnnotation.path() + "/" + xmlPath;
                        }
                    }
                    else
                    {
                        continue; // todo: report unsupported
View Full Code Here


        }
    }
   
    protected void initBindingMetadata()
    {
        final XmlListBinding annotation = property().definition().getAnnotation( XmlListBinding.class );
        final XmlNamespaceResolver xmlNamespaceResolver = ( (XmlResource) property().element().resource() ).getXmlNamespaceResolver();
       
        final SortedSet<ElementType> possible = this.possibleTypesService.types();
        this.modelElementTypes = possible.toArray( new ElementType[ possible.size() ] );

        if( annotation == null )
        {
            this.path = new XmlPath( property().name(), xmlNamespaceResolver );
           
            this.xmlElementNames = new QName[ this.modelElementTypes.length ];
           
            for( int i = 0; i < this.modelElementTypes.length; i++ )
            {
                this.xmlElementNames[ i ] = createDefaultElementName( this.modelElementTypes[ i ], xmlNamespaceResolver );
            }
        }
        else
        {
            if( annotation.path().length() > 0 )
            {
                this.path = new XmlPath( annotation.path(), xmlNamespaceResolver );
            }
           
            final XmlListBinding.Mapping[] mappings = annotation.mappings();
            this.xmlElementNames = new QName[ this.modelElementTypes.length ];
           
            for( int i = 0; i < this.modelElementTypes.length; i++ )
            {
                final ElementType type = this.modelElementTypes[ i ];
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.xml.annotations.XmlListBinding

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.