com.ebmwebsourcing.easybox.api
Interface ModelObject


public interface ModelObject

Empty interface flagging an object as being a model object.
A model object can be wrapped into an XmlObject.
A model object knows which unique XmlObject is attached to it. Otherly said, as long as the ModelObject object stays in memory, it remembers the XmlObject which wrapped it.

Author:
mjambert

Method Summary
 ModelObject duplicate()
          Duplicate this ModelObject.
<X extends ModelObject>
X
duplicateAs(java.lang.Class<X> targetClass)
          Duplicate this ModelObject data, but into a specific target class.
 ModelObject getAdoptiveParent()
          Get adoptive parent object.
 java.net.URI getBaseURI()
          Get base URI of originating document.
 org.w3c.dom.Node getDOMNode()
           
 ModelObject getNaturalParent()
          Get natural parent object.
 ModelObject getParent()
          Get natural or adoptive parent object.
 XmlObjectNode getXmlObject()
          Get unique XmlObjectNode wrapping this ModelObject.
 void setBaseURI(java.net.URI baseUri)
          Set base URI of originating document.
 

Method Detail

duplicate

ModelObject duplicate()
Duplicate this ModelObject.

Returns:
Copy of this ModelObject.

duplicateAs

<X extends ModelObject> X duplicateAs(java.lang.Class<X> targetClass)
Duplicate this ModelObject data, but into a specific target class.

Type Parameters:
X -
Parameters:
targetClass -
Returns:

getXmlObject

XmlObjectNode getXmlObject()
Get unique XmlObjectNode wrapping this ModelObject.

Returns:
XmlObjectNode wrapping this ModelObject.

getNaturalParent

ModelObject getNaturalParent()
Get natural parent object.

Returns:
This object natural parent.

getAdoptiveParent

ModelObject getAdoptiveParent()
Get adoptive parent object.

Returns:
This object adoptive parent.

getParent

ModelObject getParent()
Get natural or adoptive parent object.

Returns:
This natural or adoptive object parent.

getBaseURI

java.net.URI getBaseURI()
Get base URI of originating document. If no base URI was set, this object will look for return its parent base URI (recursively).

Returns:
Originating document base URI.

setBaseURI

void setBaseURI(java.net.URI baseUri)
Set base URI of originating document.

Parameters:
baseUri - Originating base URI.

getDOMNode

org.w3c.dom.Node getDOMNode()


Copyright © 2011 Petals Link. All Rights Reserved.