Package pl.edu.icm.unity.types.basic
Class Attribute
- java.lang.Object
-
- pl.edu.icm.unity.types.basic.Attribute
-
- All Implemented Interfaces:
NamedObject
- Direct Known Subclasses:
AttributeExt
public class Attribute extends Object implements NamedObject
Represents an attribute instance. Attribute has a group where it is valid (or valid and defined depending on context) and list of values. Values type of this class are of String class. While for String attributes this is a natural encoding for some other the string is an effect of some sort of serialization as Base64. Values can be (de)serialized using proper value syntax object. The value syntax name is stored with an attribute for convenience, although it duplicates an information stored inAttributeType
of this attribute.- Author:
- K. Benedyczak
-
-
Constructor Summary
Constructors Constructor Description Attribute(com.fasterxml.jackson.databind.node.ObjectNode src)
Full deserialization from JSONAttribute(String name, String valueSyntax, String groupPath, com.fasterxml.jackson.databind.node.ObjectNode src)
Partial deserialization from JSONAttribute(String name, String valueSyntax, String groupPath, List<String> values)
Attribute(String name, String valueSyntax, String groupPath, List<String> values, String remoteIdp, String translationProfile)
Full constructorAttribute(Attribute toClone)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attribute
clone()
boolean
equals(Object obj)
protected void
fromJson(com.fasterxml.jackson.databind.node.ObjectNode main)
protected void
fromJsonBase(com.fasterxml.jackson.databind.node.ObjectNode main)
String
getGroupPath()
String
getName()
String
getRemoteIdp()
String
getTranslationProfile()
List<String>
getValues()
String
getValueSyntax()
int
hashCode()
void
setGroupPath(String groupPath)
void
setName(String name)
void
setRemoteIdp(String remoteIdp)
void
setTranslationProfile(String translationProfile)
void
setValues(String... values)
void
setValues(List<String> values)
void
setValueSyntax(String valueSyntax)
com.fasterxml.jackson.databind.node.ObjectNode
toJson()
protected com.fasterxml.jackson.databind.node.ObjectNode
toJsonBase()
String
toString()
-
-
-
Constructor Detail
-
Attribute
public Attribute(String name, String valueSyntax, String groupPath, List<String> values, String remoteIdp, String translationProfile)
Full constructor
-
Attribute
public Attribute(Attribute toClone)
-
Attribute
public Attribute(com.fasterxml.jackson.databind.node.ObjectNode src)
Full deserialization from JSON
-
-
Method Detail
-
getGroupPath
public String getGroupPath()
-
getName
public String getName()
- Specified by:
getName
in interfaceNamedObject
- Returns:
- human readable name of the object. Must be unique for the object class.
-
getTranslationProfile
public String getTranslationProfile()
-
getRemoteIdp
public String getRemoteIdp()
-
getValueSyntax
public String getValueSyntax()
-
setName
public void setName(String name)
-
setValueSyntax
public void setValueSyntax(String valueSyntax)
-
setGroupPath
public void setGroupPath(String groupPath)
-
setValues
public void setValues(String... values)
-
setTranslationProfile
public void setTranslationProfile(String translationProfile)
-
setRemoteIdp
public void setRemoteIdp(String remoteIdp)
-
toJson
public com.fasterxml.jackson.databind.node.ObjectNode toJson()
-
fromJson
protected final void fromJson(com.fasterxml.jackson.databind.node.ObjectNode main)
-
fromJsonBase
protected final void fromJsonBase(com.fasterxml.jackson.databind.node.ObjectNode main)
-
toJsonBase
protected com.fasterxml.jackson.databind.node.ObjectNode toJsonBase()
-
-