|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.sequencer.teiid.model.ModelObjectHandler
public abstract class ModelObjectHandler
Base implementation of a model object handler.
Field Summary | |
---|---|
protected static boolean |
DEBUG
|
protected Logger |
logger
|
Constructor Summary | |
---|---|
ModelObjectHandler()
|
Method Summary | |
---|---|
protected Node |
addNode(Node parentNode,
XmiElement element,
String nameAttributeUri,
String primaryNodeType)
|
protected void |
addPropertyValue(Node node,
String propertyName,
String newValue)
|
protected void |
addPropertyValue(Node node,
String propertyName,
Value newValue)
|
protected void |
debug(String message)
|
protected Sequencer.Context |
getContext()
|
protected String |
getQName(XmiPart xmiPart)
|
protected org.modeshape.sequencer.teiid.model.ModelReader |
getReader()
|
protected ReferenceResolver |
getResolver()
|
protected VdbModel |
getVdbModel()
|
protected abstract void |
process(XmiElement element,
Node parentNode)
|
protected void |
setBooleanProperty(Node node,
String jcrPropertyName,
String value)
If the value is null or empty the property is not set. |
protected void |
setContext(Sequencer.Context context)
This method should only be called by the framework loading model object handlers. |
protected void |
setProperty(Node node,
String propertyName,
String propertyValue)
Sets the specified, single-valued, property only if the value is not null and not empty. |
protected void |
setReader(org.modeshape.sequencer.teiid.model.ModelReader reader)
This method should only be called by the framework loading model object handlers. |
protected void |
setResolver(ReferenceResolver resolver)
This method should only be called by the framework loading model object handlers. |
protected void |
setVdbModel(VdbModel vdbModel)
This method should only be called by the framework loading model object handlers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Logger logger
protected static final boolean DEBUG
Constructor Detail |
---|
public ModelObjectHandler()
Method Detail |
---|
protected void debug(String message)
protected Node addNode(Node parentNode, XmiElement element, String nameAttributeUri, String primaryNodeType) throws Exception
parentNode
- the parent node where the child node is being added (cannot be null
)element
- the XMI element to use to create the child node (cannot be null
)nameAttributeUri
- the URI of the name property (cannot be null
or empty)primaryNodeType
- the primary node type to use when creating the new node (cannot be null
or empty)
null
)
Exception
- if there is a problem creating the nodeprotected void addPropertyValue(Node node, String propertyName, String newValue) throws Exception
node
- the node whose multi-valued property a value is being added to (cannot be null
)propertyName
- the multi-valued property name (cannot be null
or empty)newValue
- the value being added (cannot be null
or empty)
Exception
- if there is a problem adding the property valueprotected void addPropertyValue(Node node, String propertyName, Value newValue) throws Exception
node
- the node whose multi-valued property a value is being added to (cannot be null
)propertyName
- the multi-valued property name (cannot be null
or empty)newValue
- the value being added (cannot be null
or empty)
Exception
- if there is a problem adding the property valueprotected Sequencer.Context getContext()
null
)protected String getQName(XmiPart xmiPart)
xmiPart
- the XMI part whose qualified name is being requested (cannot be null
)
null
or empty)protected org.modeshape.sequencer.teiid.model.ModelReader getReader()
null
)protected ReferenceResolver getResolver()
null
)protected VdbModel getVdbModel()
null
if model did not come from a VDB)protected abstract void process(XmiElement element, Node parentNode) throws Exception
element
- the element being processed (cannot be null
)parentNode
- the parent node to use if a node is created for the element (cannot be null
)
Exception
- if there is a problem processing the XMI elementprotected void setBooleanProperty(Node node, String jcrPropertyName, String value) throws Exception
null
or empty the property is not set.
node
- the node whose boolean property is being set (cannot be null
)value
- the property value (can be null
or empty)jcrPropertyName
- the JCR property name (cannot be null
or empty)
Exception
- if there is a problem setting the propertyprotected void setContext(Sequencer.Context context)
context
- the sequencer context being set (never null
)protected void setProperty(Node node, String propertyName, String propertyValue) throws Exception
null
and not empty.
node
- the node whose property is being set (cannot be null
)propertyName
- the name of the property being set (cannot be null
)propertyValue
- the proposed property value (can be null
or empty)
Exception
- if there is a problem setting the propertyprotected void setReader(org.modeshape.sequencer.teiid.model.ModelReader reader)
reader
- the model reader being set (never null
)protected void setResolver(ReferenceResolver resolver)
resolver
- the reference resolver used during sequencing (cannot be null
)protected void setVdbModel(VdbModel vdbModel)
vdbModel
- the VDB model being sequenced (can be null
if model is not from a VDB)
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |