com.ibm.wsspi.ar

Class ArtifactResouceFactoryImpl

  • java.lang.Object
    • org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl
      • com.ibm.wsspi.ar.ArtifactResouceFactoryImpl
  • All Implemented Interfaces:
    ARConstants, org.eclipse.emf.ecore.resource.Resource.Factory


    public class ArtifactResouceFactoryImpl
    extends org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl
    implements ARConstants
    Extension to EMF to support loading WSDL and XSD documents within an EAR file. Since a the files in an EAR are physically a JAR within a JAR, we also support a custom scheme, "archive:/" which can open streams and within these nested JARs. To configure a ResourceSet for the ArtifactResolver use the following steps:
    
       Resource.Factory rf = ArtifactResouceFactoryImpl.INSTANCE;
             Resource.Factory.Registry registry = resourceSet.getResourceFactoryRegistry ();
    
            // Register the resource factory for wbi_artifact protocol
            registry.getProtocolToFactoryMap ().put (
                                    ArtifactResourceFactoryImpl.WBI_ARTIFACT_PROTOCOL, rf);
            registry.getExtensionToFactoryMap ().put ("xsd", rf);
            registry.getExtensionToFactoryMap ().put ("wsdl", rf);
            resourceSet.getAdapterFactories ().add (ArtifactURIResolver.getFactory ());
            resourceSet.setURIConverter (ArtifactURIConverter.INSTANCE);
            
    If a WSDL target namespace is spread across several documents the elements are merged into a single model.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.Resource.Factory

        org.eclipse.emf.ecore.resource.Resource.Factory.Descriptor, org.eclipse.emf.ecore.resource.Resource.Factory.Registry
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.common.util.URI uri) 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ArtifactResouceFactoryImpl

        protected ArtifactResouceFactoryImpl()
    • Method Detail

      • createResource

        public org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.common.util.URI uri)
        Specified by:
        createResource in interface org.eclipse.emf.ecore.resource.Resource.Factory
        Overrides:
        createResource in class org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl
        See Also:
        Resource.Factory.createResource(org.eclipse.emf.common.util.URI)
IBM Business Process ManagerTM
Release 8