|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.publication.SiteTreeNodeImpl
public class SiteTreeNodeImpl
Concrete implementation of the SiteTreeNode interface.
SiteTreeNode| Field Summary | |
|---|---|
static java.lang.String |
HREF_ATTRIBUTE_NAME
|
static java.lang.String |
ID_ATTRIBUTE_NAME
|
static java.lang.String |
LABEL_NAME
|
static java.lang.String |
LANGUAGE_ATTRIBUTE_NAME
|
static java.lang.String |
LINK_ATTRIBUTE_NAME
|
static java.lang.String |
NODE_NAME
|
static java.lang.String |
SUFFIX_ATTRIBUTE_NAME
|
static java.lang.String |
VISIBLEINNAV_ATTRIBUTE_NAME
|
| Constructor Summary | |
|---|---|
SiteTreeNodeImpl(org.w3c.dom.Node node,
DefaultSiteTree sitetree)
Creates a new SiteTreeNodeImpl object. |
|
| Method Summary | |
|---|---|
void |
accept(SiteTreeNodeVisitor visitor)
Call the visit method of the visitor, that mean the operation that shall be perfoemed on this node (Visitor pattern) |
void |
acceptReverseSubtree(SiteTreeNodeVisitor visitor)
Traverse in a reverse way the node ant its children and call the accept method. |
void |
acceptSubtree(SiteTreeNodeVisitor visitor)
(non-Javadoc) |
void |
addLabel(Label label)
Add a label to this node iff the node does not have this label already. |
void |
deleteChildren()
Remove the children of this node. |
java.lang.String |
getAbsoluteId()
Get the absolute id of this node. |
java.lang.String |
getAbsoluteParentId()
Deprecated. use getParent().getAbsoluteId() instead |
SiteTreeNode[] |
getChildren()
Get the sitetreenodes, which are children of this node |
SiteTreeNode[] |
getChildren(java.lang.String language)
Get the sitetreenodes, which are children of this node and contain a label for the given language. |
protected DefaultSiteTree |
getDefaultSiteTree()
|
java.lang.String |
getHref()
Get the href of this node. |
java.lang.String |
getId()
Get the id of this node. |
Label |
getLabel(java.lang.String xmlLanguage)
Get the label for a specific language. |
Label[] |
getLabels()
Get all labels for this node (independent of their language attribute). |
protected NamespaceHelper |
getNamespaceHelper()
Returns the namespace helper of the sitetree XML document. |
java.lang.String |
getNextSiblingDocumentId()
|
SiteTreeNode[] |
getNextSiblings()
Get the sitetreenodes, which are the siblings following this node |
SiteTreeNode |
getParent()
Returns the parent node of this node. |
SiteTreeNode |
getParent(java.lang.String language)
Returns the parent node of this node or null if the parent has no label for the given language. |
java.lang.String |
getParentId()
Deprecated. use getParent().getId() instead |
java.lang.String |
getSuffix()
Get the suffix of this node. |
boolean |
hasLink()
Check whether this node has a link. |
java.util.List |
postOrder()
Give a list of the children and this node in a post order way |
java.util.List |
preOrder()
Give a list of the children and this node in a pre order way |
SiteTreeNode[] |
removeChildren()
Remove the children of the node |
void |
removeLabel(Label label)
Remove a label from this node. |
void |
setLabel(Label label)
Sets a label of an this node. |
void |
setNodeAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Sets an attribute of this node. |
boolean |
visibleInNav()
Check whether this node is visible in the navigation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ID_ATTRIBUTE_NAME
public static final java.lang.String VISIBLEINNAV_ATTRIBUTE_NAME
public static final java.lang.String HREF_ATTRIBUTE_NAME
public static final java.lang.String SUFFIX_ATTRIBUTE_NAME
public static final java.lang.String LINK_ATTRIBUTE_NAME
public static final java.lang.String LANGUAGE_ATTRIBUTE_NAME
public static final java.lang.String NODE_NAME
public static final java.lang.String LABEL_NAME
| Constructor Detail |
|---|
public SiteTreeNodeImpl(org.w3c.dom.Node node,
DefaultSiteTree sitetree)
node - the node which is to be wrapped by this SiteTreeNode| Method Detail |
|---|
public java.lang.String getParentId()
SiteTreeNode
getParentId in interface SiteTreeNodeSiteTreeNode.getParentId()public java.lang.String getId()
SiteTreeNode
getId in interface SiteTreeNodeSiteTreeNode.getId()public java.lang.String getAbsoluteParentId()
SiteTreeNode
getAbsoluteParentId in interface SiteTreeNodeSiteTreeNode.getAbsoluteParentId()public java.lang.String getAbsoluteId()
SiteTreeNode
getAbsoluteId in interface SiteTreeNodeSiteTreeNode.getAbsoluteId()public Label[] getLabels()
SiteTreeNode
getLabels in interface SiteTreeNodeArray of labels.SiteTreeNode.getLabels()public Label getLabel(java.lang.String xmlLanguage)
SiteTreeNode
getLabel in interface SiteTreeNodexmlLanguage - the language for which the label is requested.
Label if there is one for the given language,
null otherwise.SiteTreeNode.getLabel(java.lang.String)public void addLabel(Label label)
SiteTreeNode
addLabel in interface SiteTreeNodelabel - the label to be added.SiteTreeNode.addLabel(org.apache.lenya.cms.publication.Label)public void removeLabel(Label label)
SiteTreeNode
removeLabel in interface SiteTreeNodelabel - the label to be removed.SiteTreeNode.removeLabel(org.apache.lenya.cms.publication.Label)public boolean visibleInNav()
SiteTreeNode
visibleInNav in interface SiteTreeNodeSiteTreeNode.hasLink()public java.lang.String getHref()
SiteTreeNode
getHref in interface SiteTreeNodeSiteTreeNode.getHref()public java.lang.String getSuffix()
SiteTreeNode
getSuffix in interface SiteTreeNodeSiteTreeNode.getSuffix()public boolean hasLink()
SiteTreeNode
hasLink in interface SiteTreeNodeSiteTreeNode.hasLink()public SiteTreeNode[] getChildren()
SiteTreeNode
getChildren in interface SiteTreeNodeSiteTreeNode.getChildren()public SiteTreeNode[] removeChildren()
SiteTreeNode
removeChildren in interface SiteTreeNodeSiteTreeNode.removeChildren()public void deleteChildren()
SiteTreeNode
deleteChildren in interface SiteTreeNodepublic SiteTreeNode[] getNextSiblings()
SiteTreeNode
getNextSiblings in interface SiteTreeNodeSiteTreeNode.getChildren()public java.lang.String getNextSiblingDocumentId()
getNextSiblingDocumentId in interface SiteTreeNodeSiteTreeNode.getNextSiblingDocumentId()
public void accept(SiteTreeNodeVisitor visitor)
throws DocumentException
SiteTreeNode
accept in interface SiteTreeNodevisitor - The visitor.
DocumentException - if an error occursSiteTreeNode.accept(org.apache.lenya.cms.publication.SiteTreeNodeVisitor)
public void acceptSubtree(SiteTreeNodeVisitor visitor)
throws DocumentException
acceptSubtree in interface SiteTreeNodevisitor - The visitor.
DocumentException - if an error occursSiteTreeNode.acceptSubtree(org.apache.lenya.cms.publication.SiteTreeNodeVisitor)
public void acceptReverseSubtree(SiteTreeNodeVisitor visitor)
throws DocumentException
SiteTreeNode
acceptReverseSubtree in interface SiteTreeNodevisitor - The visitor.
DocumentException - if an error occursSiteTreeNode.acceptSubtree(org.apache.lenya.cms.publication.SiteTreeNodeVisitor)public java.util.List postOrder()
SiteTreeNode
postOrder in interface SiteTreeNodeSiteTreeNode.postOrder()public void setLabel(Label label)
SiteTreeNode
setLabel in interface SiteTreeNodelabel - the label to addSiteTreeNode.setLabel(org.apache.lenya.cms.publication.Label)
public void setNodeAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
SiteTreeNode
setNodeAttribute in interface SiteTreeNodeattributeName - name of the attributeattributeValue - the value of the respective attributeSiteTreeNode.setLabel(org.apache.lenya.cms.publication.Label)public SiteTreeNode[] getChildren(java.lang.String language)
SiteTreeNode
getChildren in interface SiteTreeNodelanguage - A language string.
SiteTreeNode.getChildren(java.lang.String)public SiteTreeNode getParent()
SiteTreeNode
getParent in interface SiteTreeNodeSiteTreeNode.getParent()protected NamespaceHelper getNamespaceHelper()
public SiteTreeNode getParent(java.lang.String language)
SiteTreeNode
getParent in interface SiteTreeNodelanguage - A language string.
SiteTreeNode.getParent(java.lang.String)public java.util.List preOrder()
SiteTreeNode
preOrder in interface SiteTreeNodeSiteTreeNode.preOrder()protected DefaultSiteTree getDefaultSiteTree()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||