org.eclipse.xsd.util
Class XSDResourceImpl
java.lang.Object
|
+--org.eclipse.emf.common.notify.impl.NotifierImpl
|
+--org.eclipse.emf.ecore.resource.impl.ResourceImpl
|
+--org.eclipse.xsd.util.XSDResourceImpl
- All Implemented Interfaces:
- org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.resource.Resource, org.eclipse.emf.ecore.resource.Resource.Internal
- public class XSDResourceImpl
- extends org.eclipse.emf.ecore.resource.impl.ResourceImpl
The Resource implementation for the model.
This specialized resource implementation supports it's own way of making keys and hrefs, and it's own serialization.
This class is not intended for subclassing outside of the model implementation;
it is intended to be used as is with the Resource framework.
Inner classes inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
org.eclipse.emf.ecore.resource.impl.ResourceImpl.ContentsEList, org.eclipse.emf.ecore.resource.impl.ResourceImpl.ModificationTrackingAdapter |
Inner classes inherited from class org.eclipse.emf.ecore.resource.Resource |
org.eclipse.emf.ecore.resource.Resource.Diagnostic, org.eclipse.emf.ecore.resource.Resource.Factory, org.eclipse.emf.ecore.resource.Resource.Internal, org.eclipse.emf.ecore.resource.Resource.IOWrappedException |
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
contents, defaultLoadOptions, defaultSaveOptions, errors, isLoaded, isModified, modificationTrackingAdapter, resourceSet, uri, warnings |
Fields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl |
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG |
Fields inherited from interface org.eclipse.emf.ecore.resource.Resource |
RESOURCE__CONTENTS, RESOURCE__ERRORS, RESOURCE__IS_LOADED, RESOURCE__IS_MODIFIED, RESOURCE__IS_TRACKING_MODIFICATION, RESOURCE__RESOURCE_SET, RESOURCE__URI, RESOURCE__WARNINGS |
Method Summary |
protected static void |
assignDiagnostics(XSDSchema xsdSchema,
java.util.Collection xsdDiagnostics)
Assigns diagnostics to a schema. |
void |
attached(org.eclipse.emf.ecore.EObject eObject)
|
protected static org.xml.sax.EntityResolver |
createEntityResolver()
Creates an EntityResovler that can be used to help with parsing schema documents. |
protected void |
doLoad(java.io.InputStream inputStream,
java.util.Map options)
Loads a new XSDResourceImpl into the resource set. |
protected void |
doSave(java.io.OutputStream os,
java.util.Map options)
|
protected static void |
doSerialize(java.io.OutputStream outputStream,
org.w3c.dom.Document document)
|
protected static void |
doSerialize(java.io.OutputStream outputStream,
org.w3c.dom.Document document,
java.lang.String encoding)
|
protected static void |
doSerialize(java.io.OutputStream outputStream,
org.w3c.dom.Element element)
|
protected static void |
doSerialize(java.io.OutputStream outputStream,
org.w3c.dom.Element element,
java.lang.String encoding)
|
java.util.Map |
getDefaultSaveOptions()
|
protected static org.w3c.dom.Document |
getDocument(java.io.InputStream inputStream,
org.xml.sax.ErrorHandler errorHandler)
Builds a document using Xerces. |
org.eclipse.emf.ecore.EObject |
getEObject(java.lang.String uriFragment)
|
java.util.Map |
getLoadSaveOptions()
|
XSDSchema |
getSchema()
This gets the resource's schema. |
java.lang.String |
getURIFragment(org.eclipse.emf.ecore.EObject eObject)
|
static void |
serialize(java.io.OutputStream outputStream,
org.w3c.dom.Document document)
|
static void |
serialize(java.io.OutputStream outputStream,
org.w3c.dom.Document document,
java.lang.String encoding)
|
static void |
serialize(java.io.OutputStream outputStream,
org.w3c.dom.Element element)
|
static void |
serialize(java.io.OutputStream outputStream,
org.w3c.dom.Element element,
java.lang.String encoding)
|
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl |
addModificationTrackingAdapters, basicSetResourceSet, createModificationTrackingAdapter, detached, doUnload, getAllContents, getContents, getDefaultURIConverter, getEObject, getEObjectByID, getEObjectForURIFragmentRootSegment, getErrors, getResourceSet, getURI, getURIConverter, getURIFragmentRootSegment, getWarnings, isContentZipEntry, isLoaded, isModified, isTrackingModification, load, load, newContentZipEntry, removeModificationTrackingAdapters, save, save, setLoaded, setModified, setTrackingModification, setURI, toKeyString, toString, unload, unloaded, useZip |
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl |
eAdapters, eDeliver, eNotificationRequired, eNotify, eSetDeliver |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
XSD_TRACK_LOCATION
public static java.lang.String XSD_TRACK_LOCATION
XSD_PROGRESS_MONITOR
public static java.lang.String XSD_PROGRESS_MONITOR
XSD_ENCODING
public static java.lang.String XSD_ENCODING
XSDResourceImpl
public XSDResourceImpl()
XSDResourceImpl
public XSDResourceImpl(org.eclipse.emf.common.util.URI uri)
serialize
public static void serialize(java.io.OutputStream outputStream,
org.w3c.dom.Element element)
serialize
public static void serialize(java.io.OutputStream outputStream,
org.w3c.dom.Element element,
java.lang.String encoding)
doSerialize
protected static void doSerialize(java.io.OutputStream outputStream,
org.w3c.dom.Element element)
throws java.io.IOException
doSerialize
protected static void doSerialize(java.io.OutputStream outputStream,
org.w3c.dom.Element element,
java.lang.String encoding)
throws java.io.IOException
serialize
public static void serialize(java.io.OutputStream outputStream,
org.w3c.dom.Document document)
serialize
public static void serialize(java.io.OutputStream outputStream,
org.w3c.dom.Document document,
java.lang.String encoding)
doSerialize
protected static void doSerialize(java.io.OutputStream outputStream,
org.w3c.dom.Document document)
throws java.io.IOException
doSerialize
protected static void doSerialize(java.io.OutputStream outputStream,
org.w3c.dom.Document document,
java.lang.String encoding)
throws java.io.IOException
getDocument
protected static org.w3c.dom.Document getDocument(java.io.InputStream inputStream,
org.xml.sax.ErrorHandler errorHandler)
throws java.io.IOException
- Builds a document using Xerces.
- Parameters:
inputStream
- the contents to parse.errorHandler
- the handled used by the parser.- Returns:
- a document.
createEntityResolver
protected static org.xml.sax.EntityResolver createEntityResolver()
- Creates an EntityResovler that can be used to help with parsing schema documents.
- Returns:
- an EntityResolver.
assignDiagnostics
protected static void assignDiagnostics(XSDSchema xsdSchema,
java.util.Collection xsdDiagnostics)
- Assigns diagnostics to a schema.
- Parameters:
xsdSchema
- the schema.xsdDiagnostics
- the XSDDiagnostic
s.
doSave
protected void doSave(java.io.OutputStream os,
java.util.Map options)
throws java.io.IOException
- Overrides:
doSave
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
getSchema
public XSDSchema getSchema()
- This gets the resource's schema.
doLoad
protected void doLoad(java.io.InputStream inputStream,
java.util.Map options)
throws java.io.IOException
- Loads a new
XSDResourceImpl
into the resource set.
- Overrides:
doLoad
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
- Parameters:
resourceSet
- the resource set to hold the new resource.uri
- the URI of the new resource.inputStream
- the contents of the new resource.options
- any options to influence loading behavior.- Returns:
- a new XSDResourceImpl.
attached
public void attached(org.eclipse.emf.ecore.EObject eObject)
- Overrides:
attached
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
getURIFragment
public java.lang.String getURIFragment(org.eclipse.emf.ecore.EObject eObject)
- Overrides:
getURIFragment
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
getEObject
public org.eclipse.emf.ecore.EObject getEObject(java.lang.String uriFragment)
- Overrides:
getEObject
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
getDefaultSaveOptions
public java.util.Map getDefaultSaveOptions()
getLoadSaveOptions
public java.util.Map getLoadSaveOptions()