public static class ContentHandlerImpl.Describer
extends java.lang.Object
ContentHandler
.Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CONTENT_TYPE_ID
The key in the
parameters map representing the content type identifier String. |
protected ContentHandler |
contentHandler
The content handler delegate.
|
protected static java.lang.String |
EXTENSIONS
The key in the
parameters map representing the extensions,
which are encoded as a space separate list of suffixes. |
static QualifiedName |
LINE_DELIMITER
An property that, in addition to
IContentDescription#CHARSET and IContentDescription#BYTE_ORDER_MARK , is supported by all EMF's content describers. |
Constructor and Description |
---|
ContentHandlerImpl.Describer() |
Modifier and Type | Method and Description |
---|---|
protected ContentHandler |
createContentHandler(java.util.Map<java.lang.String,java.lang.String> parameters)
Returns the new content handler for the given parameters that were supplied by the registration of the Eclipse content type.
|
int |
describe(java.io.InputStream inputStream,
IContentDescription description) |
int |
describe(java.io.Reader reader,
IContentDescription description) |
protected java.lang.Object |
getDescriptionValue(QualifiedName qualifiedName,
java.lang.Object value)
Returns the given property's basic EMF value converted to the corresponding Eclipse value.
|
protected java.util.Map<java.lang.String,java.lang.String> |
getParameters(IConfigurationElement configurationElement,
java.lang.String propertyName,
java.lang.Object data)
Returns the map of parameters as fetched from the given configuration element's information.
|
protected java.lang.String |
getProperty(QualifiedName qualifiedName)
Returns the qualified name converted to the corresponding property string.
|
QualifiedName[] |
getSupportedOptions()
Returns the qualified names of the supported options.
|
void |
setInitializationData(IConfigurationElement configurationElement,
java.lang.String propertyName,
java.lang.Object data) |
public static final QualifiedName LINE_DELIMITER
IContentDescription#CHARSET
and IContentDescription#BYTE_ORDER_MARK
, is supported by all EMF's content describers.protected ContentHandler contentHandler
protected static final java.lang.String CONTENT_TYPE_ID
parameters map
representing the content type identifier String.protected static final java.lang.String EXTENSIONS
parameters map
representing the extensions,
which are encoded as a space separate list of suffixes.public QualifiedName[] getSupportedOptions()
LINE_DELIMITER
, IContentDescription#CHARSET
, and IContentDescription#BYTE_ORDER_MARK
.protected java.lang.String getProperty(QualifiedName qualifiedName)
qualifiedName
- the qualified name to convert.protected java.lang.Object getDescriptionValue(QualifiedName qualifiedName, java.lang.Object value)
qualifiedName
- the name of the property for which this value applies.value
- the value to convert.public int describe(java.io.InputStream inputStream, IContentDescription description) throws java.io.IOException
java.io.IOException
public int describe(java.io.Reader reader, IContentDescription description) throws java.io.IOException
java.io.IOException
public void setInitializationData(IConfigurationElement configurationElement, java.lang.String propertyName, java.lang.Object data) throws CoreException
CoreException
protected ContentHandler createContentHandler(java.util.Map<java.lang.String,java.lang.String> parameters)
parameters
- the parameter for configuring the content handler.protected java.util.Map<java.lang.String,java.lang.String> getParameters(IConfigurationElement configurationElement, java.lang.String propertyName, java.lang.Object data)
content type identifier
and the extensions
.configurationElement
- the configuration element of the content type.propertyName
- the property for this particular for this instance.data
- the data associated with this instance.