se.kmr.scam.editor.util
Class PredefinedObject

java.lang.Object
  extended byse.kmr.scam.editor.util.PredefinedObject
All Implemented Interfaces:
Comparable

public class PredefinedObject
extends Object
implements Comparable

Wrapper for a fact in a value model.

Version:
$Revision: 1.12 $
Author:
Jöran
Created:
den 2 augusti 2002

Constructor Summary
PredefinedObject()
           
PredefinedObject(RDFNode node, boolean literalValue)
          Constructor for the ValueObject object Objects from this constructor should only be used for static values, this since the RDFNode can not be updated.
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
          To be consistent with how standard compare work with the result from toString to sort PredefinedObjects.
 RDFNode getDescription()
          Gets the description attribute of the ValueObject object
 String getLabel()
           
 String getLabel(String lang)
          Gets the value attribute in a given language of the PredefinedObject object
 Map getLabels()
           
 RDFNode getNode()
           
 String getValue()
          Gets the value attribute of the PredefinedObject object
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PredefinedObject

public PredefinedObject()

PredefinedObject

public PredefinedObject(RDFNode node,
                        boolean literalValue)
Constructor for the ValueObject object Objects from this constructor should only be used for static values, this since the RDFNode can not be updated. For objects that may be updated use ValueObjct(Statement statement).

Parameters:
node - the node that represents the fact.
literalValue - true if a literal value is requested.
Method Detail

getNode

public RDFNode getNode()

getValue

public String getValue()
Gets the value attribute of the PredefinedObject object

Returns:
The value value

getLabel

public String getLabel()

getLabel

public String getLabel(String lang)
Gets the value attribute in a given language of the PredefinedObject object

Parameters:
lang - get value in this language
Returns:
The value value

getLabels

public Map getLabels()

getDescription

public RDFNode getDescription()
Gets the description attribute of the ValueObject object

Returns:
The description value

toString

public String toString()
Returns a string representation of the object.

Returns:
a string representation of the object

equals

public boolean equals(Object o)
To be consistent with how standard compare work with the result from toString to sort PredefinedObjects.

See Also:
Object.equals(Object)

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable


Copyright © 2003 SCAM. All Rights Reserved.