|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.xnode.XNodeRevisionImpl
public class XNodeRevisionImpl
Provides an implementation of the XNodeRevision API as a struct
representation of an XNode revision. The XNode supplied the
constructor is used to copy the DOM Elements into their respective
nodes in the underlying DOM Document, hence there are no setters
for these Elements. The constructors for this class are protected,
as XNodeRevisions are meant to be created by the
XNodeRevisionManagerImpl.
The XNode Implementation (the package org.ceryle.xnode.*, both its source code and documentation), are released under the Apache 2.0 License. For more details, check the LICENSE file contained with the distribution, or see The Ceryle Project for more information. It is distributed with no warranty.
And in case this seems a bit confusing, revisions are objects specified by a version number.
| Constructor Summary | |
|---|---|
protected |
XNodeRevisionImpl(XNode xnode,
Element revision,
int version)
Constructor for an XNodeRevision, supplied with the parent XNode. |
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Compares this object with the specified object for order. |
Element |
getBodyElement()
Return this revision's <xnode:Body> Element. |
Date |
getCreated()
Return the creation date of this revision. |
String |
getCreatorOf()
Returns the value of the XNodeRevision's creator property. |
Date |
getDateOf()
Returns the revision date of the XNodeRevision as a Date. |
Element |
getHeaderElement()
Return this revision's <xnode:Header> Element. |
Date |
getModified()
Return the modification date of this revision. |
Set |
getProperties()
Returns a Set containing the named properties of this XNodeRevision (as Strings), null if none have been set. |
Object |
getProperty(String name)
Return a named property, or null if this revision does not contain it. |
Element |
getRevisionElement()
Return this revision's embedded <Revision> Element. |
Boolean |
getSelected()
Returns true if this revision is selected in a UI. |
int |
getSizeOf()
Returns the value of the XNodeRevision's size property. |
int |
getVersionOf()
Returns the value of the XNodeRevision's version number. |
XNode |
getXNode()
Return this revision's parent XNode. |
protected void |
setBodyElement(Element body)
Set this revision's <xnode:Body> Element. |
protected void |
setCreated(Date created)
Set this XNodeRevision's creation date. |
void |
setCreatorOf(String creator)
Sets the value of the XNodeRevision's creator property. |
protected void |
setHeaderElement(Element header)
Set this revision's <xnode:Header> Element. |
protected void |
setModified(Date modified)
Set this revision's modification date. |
void |
setProperty(String name,
Object value)
Set a name-value pair for a revision property with the String name and Object value. |
void |
setSelected(Boolean isSelected)
Set the selected state of this revision (as used in a UI). |
void |
setSizeOf(int size)
Sets the value of the XNodeRevision's size property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected XNodeRevisionImpl(XNode xnode,
Element revision,
int version)
throws XNodeException
XNodeException| Method Detail |
|---|
public XNode getXNode()
getXNode in interface XNodeRevisionpublic Element getRevisionElement()
getRevisionElement in interface XNodeRevisionprotected void setHeaderElement(Element header)
public Element getHeaderElement()
getHeaderElement in interface XNodeRevisionprotected void setBodyElement(Element body)
public Element getBodyElement()
getBodyElement in interface XNodeRevisionpublic Date getDateOf()
XNodeRevisionManager.getDisplayableRevisionDateOf(org.purl.xnode.XNodeRevision).
getDateOf in interface XNodeRevisionprotected void setCreated(Date created)
This is not an XNodeRevision API method.
public Date getCreated()
This is not an XNodeRevision API method.
getCreated in interface XNodeRevisionprotected void setModified(Date modified)
This is not an XNodeRevision API method.
public Date getModified()
This is not an XNodeRevision API method.
getModified in interface XNodeRevisionpublic void setSelected(Boolean isSelected)
setSelected in interface XNodeRevisionpublic Boolean getSelected()
getSelected in interface XNodeRevisionpublic void setCreatorOf(String creator)
public String getCreatorOf()
getCreatorOf in interface XNodeRevisionpublic int getVersionOf()
getVersionOf in interface XNodeRevisionpublic void setSizeOf(int size)
setSizeOf in interface XNodeRevisionpublic int getSizeOf()
getSizeOf in interface XNodeRevisionpublic Set getProperties()
getProperties in interface XNodeRevision
public void setProperty(String name,
Object value)
throws NullPointerException
setProperty in interface XNodeRevisionNullPointerExceptionpublic Object getProperty(String name)
getProperty in interface XNodeRevisionpublic int compareTo(Object o)
compareTo in interface Comparable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||