org.openehr.rm.composition.content.navigation
Class Section

java.lang.Object
  extended by org.openehr.rm.RMObject
      extended by org.openehr.rm.common.archetyped.Locatable
          extended by org.openehr.rm.composition.content.ContentItem
              extended by org.openehr.rm.composition.content.navigation.Section
All Implemented Interfaces:
java.io.Serializable

public final class Section
extends ContentItem

Represents a heading in a heading structure, or "section tree". Instances of this class are immutable.

Version:
1.0
Author:
Rong Chen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openehr.rm.composition.content.ContentItem
PATH_SEPARATOR
 
Constructor Summary
Section(ObjectID uid, java.lang.String archetypeNodeId, DvText name, Archetyped archetypeDetails, FeederAudit feederAudit, java.util.Set<Link> links, java.util.List<ContentItem> items)
          Constructs a Section
Section(java.lang.String archetypeNodeId, DvText name, java.util.List<ContentItem> items)
          Constructs a Section
 
Method Summary
 java.util.List<ContentItem> getItems()
          Ordered list of content items under this section, which may include more Sections or Entries
 Locatable itemAtPath(java.lang.String path)
          The item at a path that is relative to this item.
 java.lang.String pathOfItem(Locatable item)
          String The path to an item relative to the root of this archetyped structure.
 boolean validPath(java.lang.String path)
          Return true if the path is valid with respect to the current item.
 
Methods inherited from class org.openehr.rm.common.archetyped.Locatable
concept, getArchetypeDetails, getArchetypeNodeId, getFeederAudit, getLinks, getName, getUid, isArchetypeRoot, setArchetypeDetails, setArchetypeNodeId, setFeederAudit, setLinks, setName, setUid, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Section

public Section(ObjectID uid,
               java.lang.String archetypeNodeId,
               DvText name,
               Archetyped archetypeDetails,
               FeederAudit feederAudit,
               java.util.Set<Link> links,
               java.util.List<ContentItem> items)
Constructs a Section

Parameters:
uid -
archetypeNodeId -
name -
archetypeDetails -
feederAudit -
links -
items - null if not present
Throws:
java.lang.IllegalArgumentException - if items not null and empty

Section

public Section(java.lang.String archetypeNodeId,
               DvText name,
               java.util.List<ContentItem> items)
Constructs a Section

Parameters:
archetypeNodeId -
name -
items -
Method Detail

pathOfItem

public java.lang.String pathOfItem(Locatable item)
String The path to an item relative to the root of this archetyped structure.

Specified by:
pathOfItem in class Locatable
Parameters:
item -
Returns:
path of given item

itemAtPath

public Locatable itemAtPath(java.lang.String path)
The item at a path that is relative to this item.

Specified by:
itemAtPath in class Locatable
Parameters:
path -
Returns:
relative path

validPath

public boolean validPath(java.lang.String path)
Return true if the path is valid with respect to the current item.

Specified by:
validPath in class Locatable
Parameters:
path -
Returns:
true if valid

getItems

public java.util.List<ContentItem> getItems()
Ordered list of content items under this section, which may include more Sections or Entries

Returns:
unmodifiable list of ContentItem or null if not present


Copyright © 2004-2005 Acode HB. All Rights Reserved.