|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nees.repo.chef.DisplayRelation
Represents a Relation for the purpose of displaying and manipulating it in a user interface. The value(s) of the relation are represented with DisplayRelationValue objects. Other information about the Relation, such as its id, its type, and cardinality are also managed by this class.
Typical Usage:
Contained in a DisplayMetadataObject passed to a velocity template, which interrogates the DisplayRelation for information and values.
Life Cycle:
Created by DisplayMetadataObject. Kept in its read-only displayRelations property.
DisplayMetadataObject,
DisplayRelationValue| Constructor Summary | |
DisplayRelation()
|
|
DisplayRelation(java.lang.String title,
int type,
int min,
int max,
Identifier relID,
boolean cardUnbounded)
|
|
| Method Summary | |
void |
addValue(DisplayRelationValue drv)
Add a value. |
java.util.Date[] |
getAllowedDates()
Get allowed classes for reference type relations. |
double[] |
getAllowedDoubles()
Get allowed values for Double type relations. |
int[] |
getAllowedInts()
Get allowed values for Int type relations. |
long[] |
getAllowedLongs()
Get allowed values for Long type relations. |
Identifier[] |
getAllowedReferences()
Get allowed classes for reference type relations. |
java.lang.String[] |
getAllowedStrings()
Get allowed values for String type relations. |
java.lang.String[] |
getAllowedValuesAsStrings()
return an array of allowed values as strings. |
boolean |
getCardUnbounded()
|
java.lang.String |
getIsDate()
|
boolean |
getIsUnitQuant()
Get if the relation allows a unitQuant Reference; |
Identifier |
getRelationId()
Get the Relation Identifier. |
java.lang.String |
getRelationIdSerialized()
/** Get the Relation ID as a String. |
int |
getRelationMax()
Get the Relation cardinality minimum (the maximum number of values permitted) |
int |
getRelationMin()
Get the Relation cardinality minimum (the minimum number of values permitted) |
int |
getRelationType()
|
java.lang.String |
getTitle()
Get the human-readable title for this DisplayRelation. |
DisplayRelationValue |
getValue()
Get the first value. |
int |
getValueCount()
Get the number of values this relation has. |
java.util.ArrayList |
getValues()
Get the values. |
boolean |
hasConstrainedValues()
Convenience method for determining if values are constrained. |
void |
setAllowedDates(java.util.Date[] values)
Set allowed Dates for Date type relations. |
void |
setAllowedDoubles(double[] values)
Set allowed values for Double type relations. |
void |
setAllowedInts(int[] values)
Set allowed values for Int type relations. |
void |
setAllowedLongs(long[] values)
Set allowed values for Long type relations. |
void |
setAllowedReferences(Identifier[] values)
Set allowed classes for reference type relations. |
void |
setAllowedStrings(java.lang.String[] values)
Set allowed values for String type relations. |
void |
setIsUnitQuant(boolean is)
Set the isUnitQuant. |
void |
setValue(DisplayRelationValue drv)
Set the value. |
void |
testing()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DisplayRelation()
public DisplayRelation(java.lang.String title,
int type,
int min,
int max,
Identifier relID,
boolean cardUnbounded)
| Method Detail |
public boolean getCardUnbounded()
public java.lang.String getIsDate()
public void setAllowedStrings(java.lang.String[] values)
public java.lang.String[] getAllowedStrings()
public void setAllowedLongs(long[] values)
public long[] getAllowedLongs()
public void setAllowedDoubles(double[] values)
public double[] getAllowedDoubles()
public void setAllowedInts(int[] values)
public int[] getAllowedInts()
public void setAllowedReferences(Identifier[] values)
public Identifier[] getAllowedReferences()
public void setAllowedDates(java.util.Date[] values)
public java.util.Date[] getAllowedDates()
public boolean hasConstrainedValues()
public java.lang.String[] getAllowedValuesAsStrings()
public int getRelationMin()
public int getRelationMax()
public Identifier getRelationId()
public java.lang.String getRelationIdSerialized()
public boolean getIsUnitQuant()
public void setIsUnitQuant(boolean is)
public java.lang.String getTitle()
public int getRelationType()
public void setValue(DisplayRelationValue drv)
drv - a DisplayRelationValue representing the valuepublic void addValue(DisplayRelationValue drv)
drv - a DisplayRelationValue representing the valuepublic int getValueCount()
public java.util.ArrayList getValues()
public DisplayRelationValue getValue()
public void testing()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||