|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Content
The Content
interface is the primary datatype for the entire
SR Object Model. It represents a single Content Item in the
document tree.
Nested Class Summary | |
---|---|
static class |
Content.RelationType
Enumeration of Relationship Types between the (enclosing) Source Content Item and the Target Content Item. |
static class |
Content.ValueType
Enumeration of Value Types of Content Items. |
Field Summary | |
---|---|
static org.apache.log4j.Logger |
log
|
Method Summary | |
---|---|
Content |
appendChild(Content.RelationType rel,
Content node)
Adds the content newChild with the specified
RelationType at the end of the list of children. |
Content |
clone(boolean deep)
Returns a duplicate of this content. |
Content |
getFirstChild()
Gets first child of this content. |
Content |
getFirstChildBy(Content.RelationType rel,
Code name)
Gets first child with the specified RelationType and
name of this content, If there is no such child content,
this returns null . |
int[] |
getID()
Returns the Content Item Identifier< of this content, specifying its position in the document tree. |
Content |
getLastChild()
Gets last child of this content. |
Code |
getName()
Returns the Concept Name Code of this content. |
Content |
getNextSibling()
Gets the content immediately following this content. |
Content |
getNextSiblingBy(Content.RelationType rel,
Code name)
Gets the next content following this content with the specified RelationType to its parent and Concept Name Code. |
java.util.Date |
getObservationDateTime(boolean inherit)
Gets the Observation DateTime associated with this content. |
KeyObject |
getOwnerDocument()
Gets the SRDocument or KeyObject object
associated with this content. |
Content |
getParent()
Gets (enclosing) parent content. |
Content |
getPreviousSibling()
Gets the content immediately preceding this content. |
Content.RelationType |
getRelationType()
Gets type of relationship between (enclosing) parent content and this (child) content. |
Template |
getTemplate()
Gets the Template that describes the content of this
Content Item. |
Content.ValueType |
getValueType()
Gets type of the value encoded in this Content Item. |
boolean |
hasChildren()
Returns whether this content has any children. |
Content |
insertBefore(Content.RelationType rel,
Content newChild,
Content refChild)
Inserts the content newChild with the specified
RelationType before the existing child content
refChild . |
Content |
removeChild(Content oldChild)
Removes the child content indicated by oldChild from the
list of children, and returns it. |
Content |
replaceChild(Content.RelationType rel,
Content node,
Content old)
Replaces the child content oldChild with
newChild and the specified RelationType in the
list of children, and returns the oldChild content. |
void |
setName(Code newName)
Sets new Concept Name Code of this content. |
void |
toDataset(Dataset ds)
|
Field Detail |
---|
static final org.apache.log4j.Logger log
Method Detail |
---|
int[] getID()
null
, if this
content is not inserted in the document tree yet.
Code getName()
null
, if no name is associated with this content.
void setName(Code newName)
newName
- new Concept Name Code of this Content Item.KeyObject getOwnerDocument()
SRDocument
or KeyObject
object
associated with this content.
This is also the SRDocument
or KeyObject
object
used to create this ontent.
SRDocument
or KeyObject
object
associated with this content.java.util.Date getObservationDateTime(boolean inherit)
null
if inherit
is false
,
and there is no Observation DateTime (0040,A032) directly associated with
this content. If inherit
is true
, the
function searchs for a parent content with an associated
Observation DateTime, and returns that value. If there is also no
parent content with an associated Observation DateTime, the
function returns the Content DataTime of the associated
SRDocument
.
inherit
- specifies whether to inherit value from parents.
Template getTemplate()
Template
that describes the content of this
Content Item. Returns null
,
if no code>Template is associated with this content.
Template
that describes the content of this
Content ItemContent.RelationType getRelationType()
null
, if this content is not
inserted in the document tree yet or it is the root content of the
document.
Content.ValueType getValueType()
Content getParent()
null
, if this
content is not inserted in the document tree yet or it is the root
content of the document.
Content getFirstChild()
null
.
Content getFirstChildBy(Content.RelationType rel, Code name)
RelationType
and
name
of this content, If there is no such child content,
this returns null
.
rel
- specifies RelationType
; null
for
any RelationType
.name
- specifies Concept Name Code; null
for
any Concept Name Code.
RelationType
and
name
of this content.Content getLastChild()
null
.
Content getPreviousSibling()
null
.
Content getNextSibling()
null
.
Content getNextSiblingBy(Content.RelationType rel, Code name)
RelationType
to its parent and Concept Name Code.
rel
- specifies RelationType
; null
for
any RelationType
.name
- specifies Concept Name Code; null
for
any Concept Name Code.
RelationType
to its parent and Concept Name Code.Content insertBefore(Content.RelationType rel, Content newChild, Content refChild)
newChild
with the specified
RelationType
before the existing child content
refChild
. If refChild
is null
,
inserts newChild
at the end of the list of children.
rel
- RelationType
of the new child to this content.newChild
- The content to insert.refChild
- The reference content, i.e., the content before which the
new content must be inserted.
java.lang.IllegalArgumentException
- if newChild
is not associated to the same SRDocument
as this content, or newChild
is already in the tree, or
refChild
is not a child of this content, or
RelationType
or the RelationType
of
newChild
violates constraints of the IOD,
associated with the SOP Class, specified by the
SOP Class UID of the associated SRDocument
.Content replaceChild(Content.RelationType rel, Content node, Content old)
oldChild
with
newChild
and the specified RelationType
in the
list of children, and returns the oldChild
content.
rel
- RelationType
of the new child to this content.newChild
- The content to insert.oldChild
- The content to replace.
java.lang.IllegalArgumentException
- if newChild
is not associated to the same SRDocument
as this content, or newChild
is already in the tree, or
oldChild
is not a child of this content, or
RelationType
or the RelationType
of
newChild
violates constraints of the IOD,
associated with the SOP Class, specified by the
SOP Class UID of the associated SRDocument
.Content removeChild(Content oldChild)
oldChild
from the
list of children, and returns it.
oldChild
- The content being removed.
java.lang.IllegalArgumentException
- if oldChild
is not a child of this content.Content appendChild(Content.RelationType rel, Content node)
newChild
with the specified
RelationType
at the end of the list of children.
rel
- RelationType
of the new child to this content.newChild
- The content to insert.
java.lang.IllegalArgumentException
- if newChild
is not associated to the same SRDocument
as this content, or newChild
is already in the tree, or
RelationType
or the RelationType
of
newChild
violates constraints of the IOD,
associated with the SOP Class, specified by the
SOP Class UID of the associated SRDocument
.boolean hasChildren()
true
if this content has any children,
false
otherwise.Content clone(boolean deep)
SRDocument
object as
this content. Use SRDocument.importContent
instead, to change the associated
SRDocument
object.
The Observation DateTime of the duplicate content is explicitly
set to this.getObservationDateTime(true)
.
deep
- If true
, recursively clone the subtree under
the specified content; if false
, clone only the content
itself.
void toDataset(Dataset ds)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |