com.silverpeas.pdc.web
Class PdcPositionValueEntity

java.lang.Object
  extended by com.silverpeas.pdc.web.PdcValueEntity
      extended by com.silverpeas.pdc.web.PdcPositionValueEntity
All Implemented Interfaces:
Serializable

public class PdcPositionValueEntity
extends PdcValueEntity

A PdC position value is a value of a position of a resource content on a given axis of the PdC. A PdC axis can be compound either of terms or of hierarchical semantic trees. An example of a such trees in a geographic axis can be a division of each country into different administrative geographic area; for example France can be a tree splitted into regions -> departments -> towns. So, a PdC position value can be then a single term or a path of terms in a such semantic tree. For example, in a geographic axis, a position value can be a path such as France/Isère/Grenoble. In an international context, the terms require to be translated according to the language of the user that requested the position's value. So, the values in an axis are actually represented by an identifier that is used as a key to get the correct translated term. Thus, in an hierarchical semantic tree, the branch modeled by a value is in fact represented by a path of the term identifiers from which a path of the translated terms can be easily retrieved.

See Also:
Serialized Form

Constructor Summary
protected PdcPositionValueEntity()
           
 
Method Summary
static PdcPositionValueEntity aPositionValue(int axisId, String valueId)
          Gets a value of a position in the PdC by specifying both the axis to which the value belongs and its identifier.
 boolean equals(Object obj)
           
static PdcPositionValueEntity fromClassifiyValue(ClassifyValue value, String inLanguage)
          Creates a new PdC position value fom the specified PdC classification value.
 String getMeaning()
          Gets the meaning vehiculed by this value.
 int hashCode()
           
 ClassifyValue toClassifyValue()
          Gets the business classification position's value that is represented by this PdC position value.
 PdcAxisValue toPdcAxisValue()
          Gets the business value of a PdC's axis this entity represents.
 String toString()
           
 
Methods inherited from class com.silverpeas.pdc.web.PdcValueEntity
belongToATree, getAxisId, getId, getSynonyms, getTermId, getTreeId, setSynonyms, setTreeId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PdcPositionValueEntity

protected PdcPositionValueEntity()
Method Detail

fromClassifiyValue

public static PdcPositionValueEntity fromClassifiyValue(ClassifyValue value,
                                                        String inLanguage)
Creates a new PdC position value fom the specified PdC classification value.

Parameters:
value - a value of a PdC classification position.
inLanguage - the language in which the terms of the value should be translated.
Returns:
a representation of the PdC position value.

aPositionValue

public static PdcPositionValueEntity aPositionValue(int axisId,
                                                    String valueId)
Gets a value of a position in the PdC by specifying both the axis to which the value belongs and its identifier.

Parameters:
axisId - the identifier of the axis to which the value belongs.
valueId - the identifier of the value itself.
Returns:
a PdC position value.

toClassifyValue

public ClassifyValue toClassifyValue()
Gets the business classification position's value that is represented by this PdC position value.

Returns:
a ClassifyValue instance.

toPdcAxisValue

public PdcAxisValue toPdcAxisValue()
Gets the business value of a PdC's axis this entity represents.

Returns:
a PdcAxisValue instance.

getMeaning

public String getMeaning()
Gets the meaning vehiculed by this value. If the value is a single term, then the meaning is just that translated term. In the case the value is a branch in an hierarchical semantic tree, then the meaning is made up of the path of the translated terms in the branch; then each term in the branch is separated by a slash character.

Returns:
the meaning vehiculed by this value.

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class PdcValueEntity

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2016 Silverpeas. All Rights Reserved.