Package org.apache.tuscany.sca.contribution.resource

Examples of org.apache.tuscany.sca.contribution.resource.ResourceExport


   
    /**
     * Process <export.resource uri=""/>
     */
    public ResourceExport read(XMLStreamReader reader) throws ContributionReadException {
      ResourceExport resourceExport = this.factory.createResourceExport();
        QName element = null;
       
        try {
            while (reader.hasNext()) {
                int event = reader.getEventType();
                switch (event) {
                    case START_ELEMENT:
                        element = reader.getName();
                       
                        // Read <export.resource>
                        if (EXPORT_RESOURCE.equals(element)) {
                            String uri = reader.getAttributeValue(null, URI);
                            if (uri == null) {
                              error("AttributeURIMissing", reader);
                                //throw new ContributionReadException("Attribute 'uri' is missing");
                            } else
                                resourceExport.setURI(uri);
                        }
                       
                        break;
                    case XMLStreamConstants.END_ELEMENT:
                        if (EXPORT_RESOURCE.equals(reader.getName())) {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.resource.ResourceExport

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.