Class PdcPositionEntity

  • All Implemented Interfaces:
    Serializable, WebEntity

    public class PdcPositionEntity
    extends Object
    implements WebEntity
    The Web representation of the position of a Silverpeas's resource in the classification plan (PdC). As such, it publishes only some of the business classification's position attributes. A position of a resource on the PdC defines an atomic semantic information about its content. As such, it can be a single or a set of values in the different PdC's axis. An axis value can be a single semantic term or a hierarchical tree of semantic terms carrying a deeper exactness about the concept's value. For example, in a geographic axis, the value France can be a tree in which it is splited into regions, departments, towns, and so on, each of theses terms giving a more accuracy about a geographic position (that is the semantic concept of the geographic axis).
    See Also:
    Serialized Form
    • Method Detail

      • fromClassifyPosition

        public static PdcPositionEntity fromClassifyPosition​(ClassifyPosition position,
                                                             String inLanguage,
                                                             URI inClassificationByURI)
        Creates a Web entity representing a position on the PdC from the specified business classification position. It is expressed in the specified language and it is located in the PdC classification identified by the specified URI.
        Parameters:
        position - the ClassifyPosition instance the web entity should represent.
        inLanguage - the language in which the position should expressed.
        inClassificationByURI - the URI identifying the PdC classification to which the position belongs.
        Returns:
        a PdcPositionEntity instance.
      • fromPdcPosition

        public static PdcPositionEntity fromPdcPosition​(PdcPosition position,
                                                        String inLanguage,
                                                        URI inClassificationByURI)
        Creates a Web entity representing a position on the PdC from the specified business classification position. It is expressed in the specified language and it is located in the PdC classification identified by the specified URI.
        Parameters:
        position - the position on the PdC the web entity should represent.
        inLanguage - the language in which the position should expressed.
        inClassificationByURI - the URI identifying the PdC classification to which the position belongs.
        Returns:
        a PdcPositionEntity instance.
      • createNewPositionWith

        public static PdcPositionEntity createNewPositionWith​(List<PdcPositionValueEntity> values)
        Creates a web entity representing a new position on the Pdc and that is valued with the specified PdC axis values.
        Parameters:
        values - a list of representations of PdC axis values.
        Returns:
        a PdcPositionEntity instance.
      • toClassifyPosition

        public ClassifyPosition toClassifyPosition()
        Gets the business classification position this web entity represents.
        Returns:
        a ClassifyPosition instance represented by this web entity.
      • getURI

        public URI getURI()
        Description copied from interface: WebEntity
        Gets the URI at which this web entity is published and can be accessed.
        Specified by:
        getURI in interface WebEntity
        Returns:
        the web entity URI.
      • getId

        public String getId()
      • getPositionValues

        public List<PdcPositionValueEntity> getPositionValues()
        Gets the values of this position.
        Returns:
        an unmodifiable list of PdC position values.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • setSynonymsFrom

        protected void setSynonymsFrom​(UserThesaurusHolder userThesaurus)
                                throws ThesaurusException
        Sets the synonyms for each value of this position from the specified thesaurus.
        Parameters:
        userThesaurus - a user thesaurus from which synonyms can be get.
        Throws:
        ThesaurusException - if an error occurs while getting the synonyms of this position's values.