Class 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 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.