|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.pdc.web.PdcClassificationEntity
public class PdcClassificationEntity
The PdC classification entity represents the web entity of the classification of a Silverpeas's resource on the classification plan (PdC). As such, it publishes only some of the business classification attributes. The PdC classificiation is identified in the web by its unique identifier, its URI. The PdC is a semantic referential that is made up of one or more axis, each of them representing a semantic concept. A classification on the PdC is then a set of positions of the resource content on the different axis; each position provides an atomic semantic information about the resource. A position can be a semantic value of an axis as well a set of values on different axis.
Method Summary | |
---|---|
static PdcClassificationEntity |
aPdcClassificationEntity(List<ClassifyPosition> fromPositions,
String inLanguage,
URI atURI)
Creates a web entity from the specified positions on the PdC in the specified language and identified by the specified URI. |
static PdcClassificationEntity |
aPdcClassificationEntity(PdcClassification classification,
String inLanguage,
URI atURI)
Creates a web entity of the specified classification on the PdC in the specified language and identified by the specified URI. |
static URI |
atURI(URI uri)
A convenient method to enhance the readability of creators. |
boolean |
equals(Object obj)
|
static PdcClassificationEntity |
fromJSON(String classification)
Converts the specified JSON representation of a classification on the PdC into an instance of a classification entity. |
static PdcClassification |
fromPdcClassification(PdcClassification classification)
A convenient method to enhance the readability of creators. |
static List<ClassifyPosition> |
fromPositions(List<ClassifyPosition> positions)
A convenient method to enhance the readability of creators. |
List<PdcPositionEntity> |
getClassificationPositions()
Gets all the positions on the PdC axis that defines this resource classification. |
List<PdcPosition> |
getPdcPositions()
Gets all the positions on the PdC axis that defines this resource classification as PdcPosition instances. |
URI |
getURI()
Gets the URI at which this resource is published and can be accessed. |
int |
hashCode()
|
static String |
inLanguage(String language)
A convenient method to enhance the readability of creators. |
boolean |
isModifiable()
Is the PdC classification represented by this web entity can be changed? |
boolean |
isUndefined()
This web entity represents the undefined classification of a resource on the PdC. |
void |
setClassificationPositions(List<PdcPositionEntity> positions)
|
protected void |
setModifiable(boolean modifiable)
|
String |
toJSON()
Converts this entity into its JSON representation. |
String |
toString()
|
static PdcClassificationEntity |
undefinedClassification()
Creates a non-defined PdC classification. |
PdcClassificationEntity |
withSynonymsFrom(UserThesaurusHolder userThesaurus)
Sets this classification entity with the synonyms of each position value that are present in the specified user thesaurus. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static PdcClassificationEntity undefinedClassification()
public static PdcClassificationEntity aPdcClassificationEntity(List<ClassifyPosition> fromPositions, String inLanguage, URI atURI)
classification
- the classification on the PdC for which the web entity should represent.inLanguage
- the language in which the entity should be translated.atURI
- the URI identified the classification in the web.
public static PdcClassificationEntity aPdcClassificationEntity(PdcClassification classification, String inLanguage, URI atURI)
classification
- the classification on the PdC for which the web entity should represent.inLanguage
- the language in which the entity should be translated.atURI
- the URI identified the classification in the web.
public static PdcClassificationEntity fromJSON(String classification) throws JAXBException
classification
- the JSON representation of a classification on the PdC.
JAXBException
- if an error occurs during the conversion.public String toJSON() throws JAXBException
JAXBException
public static String inLanguage(String language)
language
- the language in which the terms in the classification are.
public static URI atURI(URI uri)
uri
- the URI at which the classification is published.
public static List<ClassifyPosition> fromPositions(List<ClassifyPosition> positions)
positions
- a list of classify positions.
public static PdcClassification fromPdcClassification(PdcClassification classification)
a
- PdC classification.
public boolean isUndefined()
public URI getURI()
Exposable
getURI
in interface Exposable
public PdcClassificationEntity withSynonymsFrom(UserThesaurusHolder userThesaurus) throws ThesaurusException
userThesaurus
- a holder of the thesaurus of the user that asked for this PdC
classification.
ThesaurusException
- if an error occurs while getting the synonyms of the values of the
different classification positions.public List<PdcPositionEntity> getClassificationPositions()
public List<PdcPosition> getPdcPositions()
public boolean isModifiable()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public void setClassificationPositions(List<PdcPositionEntity> positions)
protected void setModifiable(boolean modifiable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |