com.silverpeas.pdc.web
Class PdcValueEntity

java.lang.Object
  extended by com.silverpeas.pdc.web.PdcValueEntity
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PdcAxisValueEntity, PdcPositionValueEntity

public abstract class PdcValueEntity
extends Object
implements Serializable

A value in the classification plan (named PdC). It is the base class of the different representations of a value in the PdC according to its use (a value in a position of a resource on the PdC, a value of a PdC axis, ...).

See Also:
Serialized Form

Constructor Summary
protected PdcValueEntity()
           
protected PdcValueEntity(String id, int axisId)
           
 
Method Summary
 boolean belongToATree()
          Is this value is a node in an hierachical semantic tree?
 boolean equals(Object obj)
           
 int getAxisId()
          Gets the unique identifier of the PdC's axis related by this value.
 String getId()
          Gets the identifier of this value.
 List<String> getSynonyms()
          Gets the synonyms of this value according to a given thesaurus.
 String getTermId()
          Gets the unique identifier of the term of this value.
 String getTreeId()
          Gets the unique identifier of the tree to which this value belongs.
 int hashCode()
           
protected  void setSynonyms(Collection<String> synonyms)
           
protected  void setTreeId(String treeId)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdcValueEntity

protected PdcValueEntity()

PdcValueEntity

protected PdcValueEntity(String id,
                         int axisId)
Method Detail

getId

public String getId()
Gets the identifier of this value. The identifier is expressed in the form of an absolute path relative to its axis, so it starts with the slash character. If the value is a single term of the axis, the identifier does then contains only one node that is the identifier of the term. If it belongs to an hierarchic semantic tree, then the identifier is the path of term identifiers in that tree.

Returns:
the value identifier.

getTermId

public String getTermId()
Gets the unique identifier of the term of this value. If the term belongs to a semantic tree (not a single term), it is the one of the last term of the path in the tree.

Returns:
the term identifier.

getAxisId

public int getAxisId()
Gets the unique identifier of the PdC's axis related by this value.

Returns:
the PdC's axis identifier.

getTreeId

public String getTreeId()
Gets the unique identifier of the tree to which this value belongs.

Returns:
the tree identifier or an empty identifier if the value is a single term (and then doesn't belong to an hierachical tree of terms)

belongToATree

public boolean belongToATree()
Is this value is a node in an hierachical semantic tree? The value belong to a tree when it defines a more exactness meaning for a given position value.

Returns:
true if the value is a node in an hierarchical semantic tree, false otherwise.

getSynonyms

public List<String> getSynonyms()
Gets the synonyms of this value according to a given thesaurus.

Returns:
an unmodifiable list of synonyms to this value.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setTreeId

protected void setTreeId(String treeId)

setSynonyms

protected void setSynonyms(Collection<String> synonyms)


Copyright © 2016 Silverpeas. All Rights Reserved.