|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Subject
A Subject represents an entity, such as a person, group, or organization. This class provides common characteristics and behaviors across these entities. Note, implementations of this interface shouldnt hold onto sources, since they arent serializable, they should lookup with AllSources Implementors should probably subclass SubjectImpl instead of implement this directly. Also, implementors should implement toString, equals and hashcode like Subject (based on sourceId and subjectId). There are static methods in subjectImpl which can be used as helper methods
Method Summary | |
---|---|
Map<String,Set<String>> |
getAttributes()
Gets a map attribute names and values. |
String |
getAttributeValue(String attributeName)
Returns the value of a single-valued attribute. |
String |
getAttributeValueOrCommaSeparated(String attributeName)
Returns the attribute value if single-valued, or if multi-valued, returns the values comma separated (with a space too). |
Set<String> |
getAttributeValues(String attributeName)
Returns the values of a multi-valued attribute, or a set of size one for a single valued attribute. |
String |
getAttributeValueSingleValued(String attributeName)
Returns the attribute value if single-valued, or if multi-valued, throws an exception. |
String |
getDescription()
Gets this Subject's description. |
String |
getId()
Gets this Subject's ID. |
String |
getName()
Gets this Subject's name. |
Source |
getSource()
Returns the Source of this Subject. |
String |
getSourceId()
get the source id of a subject |
SubjectType |
getType()
Gets this Subject's type. |
String |
getTypeName()
get the type name |
Method Detail |
---|
String getId()
SubjectType getType()
String getTypeName()
String getSourceId()
String getName()
String getDescription()
String getAttributeValue(String attributeName)
attributeName
-
Set<String> getAttributeValues(String attributeName)
attributeName
-
String getAttributeValueSingleValued(String attributeName)
attributeName
-
String getAttributeValueOrCommaSeparated(String attributeName)
Returns the attribute value if single-valued, or if multi-valued, returns the values comma separated (with a space too). So if the values are: a b c; this would return the string: "a, b, c" Implementors can use the static helper in SubjectImpl
attributeName
-
Map<String,Set<String>> getAttributes()
Source getSource()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |