|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ecore.xmi.util.XMLProcessor
XMLProcessor provides helper methods to serialize and deserialize XML using EMF framework.
Field Summary | |
protected EcoreBuilder |
ecoreBuilder
|
protected ExtendedMetaData |
extendedMetaData
|
protected Map |
loadOptions
|
protected Map |
registrations
|
protected EPackage.Registry |
registry
|
protected Map |
saveOptions
|
protected static String |
STAR_EXTENSION
|
protected static 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(Collection schemaURIs)
Create an XML processor that is aware of XML Schemas specified. |
protected |
XMLProcessor(EPackage.Registry registry)
Protected constructor - should be used for in staticly 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 Map |
getRegistrations()
|
Resource |
load(InputSource inputSource,
Map options)
|
Resource |
load(InputStream is,
Map options)
|
Resource |
load(Node node,
Map options)
|
Resource |
load(String systemId,
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(Document document,
Resource resource,
DOMHandler handler,
Map options)
|
void |
save(OutputStream outputStream,
Resource resource,
Map options)
|
void |
save(Writer writer,
Resource resource,
Map options)
|
String |
saveToString(Resource resource,
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 String XML_EXTENSION
protected static final String STAR_EXTENSION
protected static final URI XML_URI
protected Map registrations
protected Map loadOptions
protected Map 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 SAXException
public XMLProcessor(Collection schemaURIs) throws SAXException
schemaURIs
- - a list of URI org.eclipse.common.util.URI
which point to XML Schemas
SAXException
Method Detail |
protected Map getRegistrations()
public EPackage.Registry getEPackageRegistry()
public ExtendedMetaData getExtendedMetaData()
public Resource load(String systemId, Map options) throws IOException
systemId
- - system identifieroptions
- - options map
IOException
Resource
,
URI
public Resource load(InputStream is, Map options) throws IOException
IOException
public Resource load(InputSource inputSource, Map options) throws IOException
IOException
public Resource load(Node node, Map options) throws IOException
IOException
public void save(OutputStream outputStream, Resource resource, Map options) throws IOException
IOException
public void save(Writer writer, Resource resource, Map options) throws IOException
IOException
public void save(Document document, Resource resource, DOMHandler handler, Map options) throws IOException
IOException
public String saveToString(Resource resource, Map options) throws IOException
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 |