|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ecore.resource.impl.ContentHandlerImpl
org.eclipse.emf.ecore.xmi.impl.XMLContentHandlerImpl
public class XMLContentHandlerImpl
A ContentHandler
content handler implementation for dealing with XML content.
Nested Class Summary | |
---|---|
static class |
XMLContentHandlerImpl.XMI
|
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl |
---|
ContentHandlerImpl.Describer |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.ContentHandler |
---|
ContentHandler.ByteOrderMark, ContentHandler.Registry, ContentHandler.Validity |
Field Summary |
---|
Fields inherited from interface org.eclipse.emf.ecore.resource.ContentHandler |
---|
BYTE_ORDER_MARK_PROPERTY, CHARSET_PROPERTY, CONTENT_TYPE_PROPERTY, INVALID_CONTENT_DESCRIPTION, OPTION_REQUESTED_PROPERTIES, UNSPECIFIED_CONTENT_TYPE, VALIDITY_PROPERTY |
Constructor Summary | |
---|---|
XMLContentHandlerImpl()
|
Method Summary | |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
contentDescription(URI uri,
java.io.InputStream inputStream,
java.util.Map<?,?> options,
java.util.Map<java.lang.Object,java.lang.Object> context)
This implementation augments the base implementation by computing the character set property . |
protected XMLResource |
createXMLResource()
Creates a specialized XML resource for consuming just the root elements as well as the first nested element, if the root element is an XMI root element . |
protected java.lang.String |
getCharset(URI uri,
java.io.InputStream inputStream,
java.util.Map<?,?> options,
java.util.Map<java.lang.Object,java.lang.Object> context)
Returns the character set of the input stream; it's computed from the encoding specified in the XML content. |
static boolean |
isXMINameAndNamespace(java.lang.String name,
java.lang.String namespace)
Returns whether the given name and namespace represents a specialize XMI root element tag. |
static boolean |
isXMINamespace(java.lang.String namespace)
Returns whether the given namespace represents an XMI namespace. |
protected XMLResource |
load(URI uri,
java.io.InputStream inputStream,
java.util.Map<?,?> options,
java.util.Map<java.lang.Object,java.lang.Object> context)
Returns the XML resource loaded from the input stream. |
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl |
---|
canHandle, createContentDescription, getByteOrderMark, getRequestedProperties, isRequestedProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLContentHandlerImpl()
Method Detail |
---|
public static boolean isXMINameAndNamespace(java.lang.String name, java.lang.String namespace)
name
- the element name to consider.namespace
- the element namespace to consider.
public static boolean isXMINamespace(java.lang.String namespace)
namespace
- the element namespace to consider.
protected XMLResource createXMLResource()
XMI root element
.
protected java.lang.String getCharset(URI uri, java.io.InputStream inputStream, java.util.Map<?,?> options, java.util.Map<java.lang.Object,java.lang.Object> context) throws java.io.IOException
uri
- the URI of the input stream.inputStream
- the input stream of the XML content.options
- any options that might influence the loading the the XML content.context
- a cache for previously computed information.
java.io.IOException
- if there is a problem loading the XML content.protected XMLResource load(URI uri, java.io.InputStream inputStream, java.util.Map<?,?> options, java.util.Map<java.lang.Object,java.lang.Object> context) throws java.io.IOException
uri
- the URI of the input stream.inputStream
- the input stream of the XML content.options
- any options that might influence the loading the the XML content.context
- a cache for previously computed information.
java.io.IOException
- if there is a problem loading the XML content.public java.util.Map<java.lang.String,java.lang.Object> contentDescription(URI uri, java.io.InputStream inputStream, java.util.Map<?,?> options, java.util.Map<java.lang.Object,java.lang.Object> context) throws java.io.IOException
character set property
.
contentDescription
in interface ContentHandler
contentDescription
in class ContentHandlerImpl
uri
- the URI for which to determine the content description.inputStream
- the input stream associated with the given URI.options
- a map of options to direct what kind of description is needed.context
- a map of contextual information that content handlers use to store partially computed results.
java.io.IOException
- if there is a problem reading the stream.
|
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 |