org.purl.xnode
Interface XNodeRevision

All Known Implementing Classes:
XNodeRevisionImpl

public interface XNodeRevision

XNodeRevision is an interface for an XNode 1.2 revision.

The XNode API (the package org.purl.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.

Since:
XNode 1.2
Version:
$Id: XNodeRevision.java,v 3.4 2007-06-15 12:10:37 altheim Exp $
Author:
Murray Altheim
See Also:
XNodeRevisionManager

Method Summary
 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 this revision 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), an empty Set (not 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 <xnode: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 XNodeRevision's version number.
 XNode getXNode()
          Return this revision's parent XNode.
 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.
 

Method Detail

getXNode

XNode getXNode()
Return this revision's parent XNode.


getHeaderElement

Element getHeaderElement()
Return this revision's <xnode:Header> element. This is this XNodeRevision's copy of the parent XNode's <xnode:Header> Element.


getBodyElement

Element getBodyElement()
Return this revision's <xnode:Body> element. This is this XNodeRevision's copy of the parent XNode's <xnode:Body> Element.


getRevisionElement

Element getRevisionElement()
Return this revision's <xnode:Revision> element. This is the DOM container for the revision within its parent XNode.


getCreated

Date getCreated()
Return the creation date of this revision. This should match the creation date of the XNode itself.


getModified

Date getModified()
Return the modification date of this revision. This is the modification date of the XNode when the revision was created.


getSelected

Boolean getSelected()
Returns true if this revision is selected in a UI. This is part of the API since the main purpose of the revision objects is to make them accessible to users.


setSelected

void setSelected(Boolean isSelected)
Set the selected state of this revision (as used in a UI). This is part of the API since the main purpose of the revision objects is to make them accessible to users.


getCreatorOf

String getCreatorOf()
Returns the value of the XNodeRevision's creator property.


getVersionOf

int getVersionOf()
Returns the XNodeRevision's version number. Returns -1 on failure.


setSizeOf

void setSizeOf(int size)
Sets the value of the XNodeRevision's size property.


getSizeOf

int getSizeOf()
Returns the value of the XNodeRevision's size property.


getDateOf

Date getDateOf()
Returns the revision date of this revision as a Date. This uses the creation date if the modified date is not set.


getProperties

Set getProperties()
Returns a Set containing the named properties of this XNodeRevision (as Strings), an empty Set (not null) if none have been set.


setProperty

void setProperty(String name,
                 Object value)
                 throws NullPointerException
Set a name-value pair for a revision property with the String name and Object value. Because revision properties are immutable, this method should only be called during revision creation or recreation. If either parameter is null, a NullPointerException is thrown.

Throws:
NullPointerException

getProperty

Object getProperty(String name)
                   throws XNodeException
Return a named property, or null if this revision does not contain it.

Throws:
XNodeException


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.