|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.ecore.xmi.util.XMLProcessor
public class XMLProcessor
XMLProcessor provides helper methods to serialize and deserialize XML using EMF framework.
Field Summary | |
---|---|
protected EcoreBuilder |
ecoreBuilder
|
protected ExtendedMetaData |
extendedMetaData
|
protected java.util.Map<java.lang.Object,java.lang.Object> |
loadOptions
|
protected java.util.Map<java.lang.String,Resource.Factory> |
registrations
|
protected EPackage.Registry |
registry
|
protected java.util.Map<java.lang.Object,java.lang.Object> |
saveOptions
|
protected static java.lang.String |
STAR_EXTENSION
|
protected static java.lang.String |
XML_EXTENSION
|
protected static URI |
XML_URI
|
Constructor Summary | |
---|---|
|
XMLProcessor()
Use this constructor to create an XML processor that is not aware of any schema. |
|
XMLProcessor(java.util.Collection<URI> schemaURIs)
Create an XML processor that is aware of XML Schemas specified. |
protected |
XMLProcessor(EPackage.Registry registry)
Protected constructor - should be used for in statically generated models, or in the case schema(s) is known when XMLProcessor is created |
|
XMLProcessor(URI schemaURI)
|
Method Summary | |
---|---|
protected EcoreBuilder |
createEcoreBuilder()
|
protected ExtendedMetaData |
createExtendedMetaData()
This methods can be used to provide a different ExtendedMetaData. |
protected ResourceSet |
createResourceSet()
|
EPackage.Registry |
getEPackageRegistry()
|
ExtendedMetaData |
getExtendedMetaData()
|
protected java.util.Map<java.lang.String,Resource.Factory> |
getRegistrations()
|
Resource |
load(org.xml.sax.InputSource inputSource,
java.util.Map<?,?> options)
|
Resource |
load(java.io.InputStream is,
java.util.Map<?,?> options)
|
Resource |
load(org.w3c.dom.Node node,
java.util.Map<?,?> options)
|
Resource |
load(java.lang.String systemId,
java.util.Map<?,?> options)
Given a system identifier and option, this methods creates an EMF Resource (using URI#createURI method) and loads the resource data. |
void |
save(org.w3c.dom.Document document,
Resource resource,
DOMHandler handler,
java.util.Map<?,?> options)
|
void |
save(java.io.OutputStream outputStream,
Resource resource,
java.util.Map<?,?> options)
|
void |
save(java.io.Writer writer,
Resource resource,
java.util.Map<?,?> options)
|
java.lang.String |
saveToString(Resource resource,
java.util.Map<?,?> options)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EcoreBuilder ecoreBuilder
protected static final java.lang.String XML_EXTENSION
protected static final java.lang.String STAR_EXTENSION
protected static final URI XML_URI
protected java.util.Map<java.lang.String,Resource.Factory> registrations
protected java.util.Map<java.lang.Object,java.lang.Object> loadOptions
protected java.util.Map<java.lang.Object,java.lang.Object> saveOptions
protected ExtendedMetaData extendedMetaData
protected EPackage.Registry registry
Constructor Detail |
---|
protected XMLProcessor(EPackage.Registry registry)
public XMLProcessor()
XMLOptions
to configure this processor to
process, for example, schemaLocation/noNamespaceSchema location attributes.
public XMLProcessor(URI schemaURI) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public XMLProcessor(java.util.Collection<URI> schemaURIs) throws org.xml.sax.SAXException
schemaURIs
- - a list of URI URI
which point to XML Schemas
org.xml.sax.SAXException
Method Detail |
---|
protected java.util.Map<java.lang.String,Resource.Factory> getRegistrations()
public EPackage.Registry getEPackageRegistry()
public ExtendedMetaData getExtendedMetaData()
public Resource load(java.lang.String systemId, java.util.Map<?,?> options) throws java.io.IOException
systemId
- - system identifieroptions
- - options map
java.io.IOException
Resource
,
URI
public Resource load(java.io.InputStream is, java.util.Map<?,?> options) throws java.io.IOException
java.io.IOException
public Resource load(org.xml.sax.InputSource inputSource, java.util.Map<?,?> options) throws java.io.IOException
java.io.IOException
public Resource load(org.w3c.dom.Node node, java.util.Map<?,?> options) throws java.io.IOException
java.io.IOException
public void save(java.io.OutputStream outputStream, Resource resource, java.util.Map<?,?> options) throws java.io.IOException
java.io.IOException
public void save(java.io.Writer writer, Resource resource, java.util.Map<?,?> options) throws java.io.IOException
java.io.IOException
public void save(org.w3c.dom.Document document, Resource resource, DOMHandler handler, java.util.Map<?,?> options) throws java.io.IOException
java.io.IOException
public java.lang.String saveToString(Resource resource, java.util.Map<?,?> options) throws java.io.IOException
java.io.IOException
protected ResourceSet createResourceSet()
protected EcoreBuilder createEcoreBuilder()
protected ExtendedMetaData createExtendedMetaData()
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |