org.eclipse.gmt.umlx.registry.resource
Class EcoreFamilyResourceSetImpl
java.lang.Object
org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.NotifierImpl
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
org.eclipse.gmt.umlx.registry.resource.EcoreFamilyResourceSetImpl
- All Implemented Interfaces:
- org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.resource.ResourceSet
public class EcoreFamilyResourceSetImpl
- extends org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
EcoreFamilyResourceSetImpl extends ResourceSetImpl to support automatic translation of
loaded models to Ecore exploiting the root namespace of XML files or textual analysers
for non-XML files.
This supports translation of EMOF models to Ecore regardless of extension. (The inherited
functionality would require each extension for EMOF to be distinct and that the relevant
EMOFResourceFactoryImpl be declared in the ResourceFactoryRegistry.)
Registration of translators occurs through the model_content extension point.
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter> |
Fields inherited from interface org.eclipse.emf.ecore.resource.ResourceSet |
RESOURCE_SET__RESOURCES |
Method Summary |
org.eclipse.emf.ecore.resource.Resource |
createResourceFromFactory(org.eclipse.emf.common.util.URI uri,
org.eclipse.emf.ecore.resource.Resource.Factory resourceFactory)
Create a resource with a URI using a resourceFactory, adding the resource to this resource set. |
java.util.Set<java.lang.String> |
getElementURIs(java.io.InputStream inputStream)
Return the set of URIs mentioned as element namespaces or xsi/xmi:type qualifiers. |
org.eclipse.emf.ecore.resource.Resource.Factory |
getResourceFactory(java.util.Collection<java.lang.String> elementURIs)
Return the resource factory suitable for creating a resource potentially containing elements from
each of elementURIs. |
org.eclipse.emf.ecore.resource.Resource |
loadResource(java.io.InputStream inputStream,
org.eclipse.emf.common.util.URI uri)
|
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl |
createResource, getAdapterFactories, getAllContents, getEObject, getLoadOptions, getPackageRegistry, getResource, getResourceFactoryRegistry, getResources, getURIConverter, getURIResourceMap, setPackageRegistry, setResourceFactoryRegistry, setURIConverter, setURIResourceMap, toString |
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl |
eAdapters, eDeliver, eSetDeliver |
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
eNotificationRequired, eNotify |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
EcoreFamilyResourceSetImpl
public EcoreFamilyResourceSetImpl()
createResourceFromFactory
public org.eclipse.emf.ecore.resource.Resource createResourceFromFactory(org.eclipse.emf.common.util.URI uri,
org.eclipse.emf.ecore.resource.Resource.Factory resourceFactory)
- Create a resource with a URI using a resourceFactory, adding the resource to this resource set.
loadResource
public org.eclipse.emf.ecore.resource.Resource loadResource(java.io.InputStream inputStream,
org.eclipse.emf.common.util.URI uri)
throws java.lang.Exception
- Parameters:
inputStream
- uri
-
- Returns:
-
- Throws:
java.net.URISyntaxException
java.lang.Exception
getResourceFactory
public org.eclipse.emf.ecore.resource.Resource.Factory getResourceFactory(java.util.Collection<java.lang.String> elementURIs)
- Return the resource factory suitable for creating a resource potentially containing elements from
each of elementURIs.
- Parameters:
elementURIs
-
- Returns:
getElementURIs
public java.util.Set<java.lang.String> getElementURIs(java.io.InputStream inputStream)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
- Return the set of URIs mentioned as element namespaces or xsi/xmi:type qualifiers.
- Parameters:
inputStream
-
- Returns:
-
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException