public abstract class TXMLObjectModel
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
TXMLObjectModel(java.lang.String specifier,
java.lang.Class documentClass,
java.lang.Class elementClass,
java.lang.Class adapterClass,
java.lang.Class inputStreamInterpreterClass)
Initializes the object model with the given specifier, document
class, element class, adapter class and input stream interpreter
class.
|
Modifier and Type | Method and Description |
---|---|
static void |
deregister(java.lang.String specifier)
Deregisters the specified object model from the
API and can thus no longer be used afterwards.
|
java.lang.Class |
getAdapterClass()
Gets the XML object model's adapter class that implements TXMLObject.
|
java.lang.reflect.Constructor |
getAdapterConstructor(java.lang.Object element)
Gets the constructor for the adapter that is implicitly given by
the element argument ( getRegisteredModel( element ) ).
|
java.lang.Class |
getDocumentClass()
Gets the XML object model's document class which
is the entry point to the physical document representation.
|
java.lang.Class |
getElementClass()
Gets the XML object model's element class which is the entry point
to the physical document representation.
|
java.lang.Class |
getInputStreamInterpreterClass()
Gets the XML object model's input stream interpreter class that
implements TInputStreamInterpreter.
|
java.util.Locale |
getLocale()
Gets the locale.
|
java.lang.Object |
getProperty(java.lang.String key)
Gets a generic property by a specified key.
|
java.util.Iterator<java.lang.Object> |
getPropertyIterator()
Gets the iterator over all the properties.
|
java.util.Iterator<java.lang.String> |
getPropertyKeyIterator()
Gets the iterator over all the property keys.
|
static TXMLObjectModel |
getRegisteredModel(java.lang.Object element)
Gets the TXMLObjectModel for the given element object.
|
static TXMLObjectModel |
getRegisteredModel(java.lang.String specifier)
Gets the specified TXMLObjectModel.
|
static java.util.Collection<TXMLObjectModel> |
getRegisteredModels()
Gets all the registered TXMLObjectModel instances.
|
java.lang.String |
getSpecifier()
Gets the specifier for this XML object model implementation.
|
static boolean |
isRegistered(java.lang.String specifier)
Indicates if the specified TXMLObjectModel is registered.
|
static void |
register(TXMLObjectModel xmlObjectModel)
Registers the given TXMLObjectModel instance in the API, if not
already registered.
|
void |
setLocale(java.util.Locale locale)
Sets the locale.
|
void |
setProperty(java.lang.String key,
java.lang.Object value)
Sets a generic key/value pair on the XML object model.
|
protected TXMLObjectModel(java.lang.String specifier, java.lang.Class documentClass, java.lang.Class elementClass, java.lang.Class adapterClass, java.lang.Class inputStreamInterpreterClass)
specifier
- identifies the object model.documentClass
- represents the class instance for the object model's physical document.elementClass
- represents the class instance for the object model's physical element.adapterClass
- adapts the physical object model to TXMLObject.inputStreamInterpreterClass
- interprets Tamino responses for the physical object model.public static void register(TXMLObjectModel xmlObjectModel)
xmlObjectModel
- is a TXMLObjectModel implementation instance.public static void deregister(java.lang.String specifier)
specifier
- the TXMLObjectModel.public static TXMLObjectModel getRegisteredModel(java.lang.String specifier)
public static TXMLObjectModel getRegisteredModel(java.lang.Object element)
public static java.util.Collection<TXMLObjectModel> getRegisteredModels()
public static boolean isRegistered(java.lang.String specifier)
public java.lang.Class getDocumentClass()
public java.lang.Class getElementClass()
public java.lang.Class getAdapterClass()
public java.lang.Class getInputStreamInterpreterClass()
public java.lang.reflect.Constructor getAdapterConstructor(java.lang.Object element)
Please note, that this operation needs to be overidden if the adapters constructor contains another argument type. This were the case if the argument type for document or element would be derived from the given document or element class.
This method is only for internal use.
public java.lang.String getSpecifier()
public void setProperty(java.lang.String key, java.lang.Object value)
key
- for the property.value
- model's property accessible by the given key.public java.lang.Object getProperty(java.lang.String key)
public java.util.Iterator<java.lang.String> getPropertyKeyIterator()
public java.util.Iterator<java.lang.Object> getPropertyIterator()
public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
Copyright (c) 2017 Software AG. All Rights Reserved.