public abstract class MCcontentItem extends java.lang.Object implements MCdataSetSerializable
Constructor and Description |
---|
MCcontentItem()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(MCcontentItem childItem,
MCrelationshipType relationshipType)
Adds a child to the node
|
void |
addChildAt(MCcontentItem childItem,
MCrelationshipType relationshipType,
int position)
Inserts a child at the specific position.
|
void |
addReference(MCitemRelationship reference)
Adds a reference to another node in the tree.
|
abstract MCcontentItemType |
contentItemType()
Gets the value type of this content item.
|
MCcontentItem |
getChildAt(int index)
Gets the child content item at the specified position.
|
MCcontentItem[] |
getChildren()
Gets child content items.
|
MCbasicCodedEntry |
getConceptName()
Gets Code describing the concept represented by this Content Item.
|
java.lang.Object |
getDataContext()
Gets Observation Context.
|
MCitemIdentifer |
getItemId()
Gets the identifier of this content item.
|
MCdateTime |
getObservationDateTime()
Gets Observation DateTime.
|
java.lang.String |
getObservationUID()
Gets Observation UID.
|
MCcontentItem |
getParent()
Gets the parent item.
|
long |
getPosition()
Gets the position of this item in its parent item.
|
MCitemRelationship[] |
getReferences()
Gets the relationships to other items.
|
MCrelationshipType |
getRelationshipType()
Gets the relationship type between parent and this item.
|
MCcontentItem |
getRootItem()
Gets the Root content item.
|
void |
read(MCattributeSet source)
Reads the common attributes defined for all types of content items from the source attribute set.
|
boolean |
removeChild(MCcontentItem childItem)
Removes the specified child node from this content item.
|
MCcontentItem |
removeChildAt(int position)
Removes the child node at the specific position.
|
void |
removeReference(MCcontentItem targetItem)
Removes reference to the specific node.
|
void |
removeReference(MCitemRelationship reference)
Removes reference to another node in the tree.
|
void |
setConceptName(MCbasicCodedEntry conceptName)
Sets Code describing the concept represented by this Content Item.
|
void |
setDataContext(java.lang.Object context)
Gets Observation Context.
|
void |
setObservationDataTime(MCdateTime obsDateTime)
Sets Observation DateTime.
|
void |
setObservationUID(java.lang.String obsUID)
Sets Observation UID.
|
void |
setRelationshipType(MCrelationshipType relationType)
Sets the relationship type between parent and this item.
|
void |
write(MCattributeSet destination)
Writes the common attributes defined for all types of content items to the destination attribute set.
|
public MCcontentItem getParent()
public MCcontentItem[] getChildren()
public MCitemRelationship[] getReferences()
public MCcontentItem getRootItem()
public MCbasicCodedEntry getConceptName()
Concept Name is a code sequence describing the concept represented by this Content Item. It also conveys the value of Document Title and section headings in documents. For References to images, waveforms or other composite objects, the purpose of References is conveyed in it.
public void setConceptName(MCbasicCodedEntry conceptName)
Concept Name is a code sequence describing the concept represented by this Content Item. It also conveys the value of Document Title and section headings in documents. For References to images, waveforms or other composite objects, the purpose of References is conveyed in it.
conceptName
- Concept Name.public java.lang.Object getDataContext()
public void setDataContext(java.lang.Object context)
context
- Observation Context.public MCdateTime getObservationDateTime()
public void setObservationDataTime(MCdateTime obsDateTime)
obsDateTime
- Observation DateTime.public java.lang.String getObservationUID()
public void setObservationUID(java.lang.String obsUID)
obsUID
- Observation UID.public abstract MCcontentItemType contentItemType()
public MCrelationshipType getRelationshipType()
public void setRelationshipType(MCrelationshipType relationType)
relationType
- Relationship type.public long getPosition()
public MCitemIdentifer getItemId()
public MCcontentItem getChildAt(int index)
index
- The 1 based position of the child in this content item.MCexception
- if the index parameter is out of range.public void addChild(MCcontentItem childItem, MCrelationshipType relationshipType)
childItem
- A new child node.relationshipType
- Relationship betwen this content item and the child.MCexception
- If the child item is null or it has a parent already.public void addChildAt(MCcontentItem childItem, MCrelationshipType relationshipType, int position)
childItem
- A new child node.relationshipType
- Relationship betwen this content item and the child.position
- Position for the child node starting from 1.MCexception
- If the child item is null; it has a parent already;
or the position is out of range: if(position < 1 || position > getChildren().length + 1)
.public boolean removeChild(MCcontentItem childItem)
childItem
- The child node that needs to be removed.public MCcontentItem removeChildAt(int position)
position
- 1 based position at which the child is to be removed.MCexception
- If the position is out of range.public void addReference(MCitemRelationship reference)
reference
- A reference to another node in the tree.MCexception
- If the reference parameter is null or
the node referenced doesn't belong to this document.public void removeReference(MCitemRelationship reference)
reference
- Reference to remove.public void removeReference(MCcontentItem targetItem)
targetItem
- referenced node to remove if refered to by this node.public void read(MCattributeSet source)
These attributes include Observation Date Time(0040,A032) and Concept Name (0040, A043). They are set to be null in this object if not present in the source attribute set.
read
in interface MCdataSetSerializable
source
- Source attribute set.MCexception
- If the source parameter is null.public void write(MCattributeSet destination)
write
in interface MCdataSetSerializable
destination
- Destination attribute set.MCexception
- If the destination parameter is null or isn't an MCitem
object for a non-container content item.