public class Attribute extends Object implements Serializable
getIsoCode() will be define locale iso code. If attribute is
sub attribute it should point to it's parent getParent() and should be defined in parent's
getSubAttributes()| Constructor and Description |
|---|
Attribute(Attribute toCopy)
Creates copy of an attribute.
|
Attribute(Attribute parent,
String isoCode)
Creates sub attribute of given parent.
|
Attribute(String qualifier,
String displayName,
boolean mandatory)
Creates an attribute
|
Attribute(String qualifier,
String displayName,
String isoCode,
boolean mandatory)
Creates an attribute
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSubAttribute(Attribute attribute)
Adds sub attribute of this attribute and sets attribute's parent to this.
|
boolean |
equals(Object o) |
List<Attribute> |
getAllParents()
Lists parents to first attribute which does not have parent.
|
String |
getDisplayName() |
String |
getIsoCode() |
Attribute |
getParent() |
String |
getQualifier() |
Set<Attribute> |
getSubAttributes() |
int |
hashCode() |
boolean |
hasSubAttributes() |
boolean |
isMandatory() |
void |
setDisplayName(String displayName) |
void |
setIsoCode(String isoCode) |
void |
setMandatory(boolean mandatory) |
void |
setParent(Attribute newParent)
Sets new parent and adds this attribute to parent's sub attributes.
|
void |
setQualifier(String qualifier) |
void |
setSubAttributes(Set<Attribute> subAttributes) |
public Attribute(String qualifier, String displayName, boolean mandatory)
qualifier - qualifier of the attributedisplayName - display name of the attributemandatory - tells if attribute is mandatory - cannot be moved.public Attribute(String qualifier, String displayName, String isoCode, boolean mandatory)
qualifier - qualifier of the attributedisplayName - display name of the attributeisoCode - iso code e.g. localemandatory - tells if attribute is mandatory - cannot be moved.public Attribute(Attribute parent, String isoCode)
parent - parent.isoCode - iso code e.g. localepublic Attribute(Attribute toCopy)
toCopy - attribute to copy.public String getDisplayName()
public void setDisplayName(String displayName)
public String getQualifier()
public void setQualifier(String qualifier)
public boolean isMandatory()
public void setMandatory(boolean mandatory)
public String getIsoCode()
public void setIsoCode(String isoCode)
public boolean hasSubAttributes()
public Attribute getParent()
public void setParent(Attribute newParent)
newParent - new parent of the attribute.public void addSubAttribute(Attribute attribute)
attribute - sub attribute.Copyright © 2018. All rights reserved.