|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.infoengine.schema.Type
com.infoengine.schema.SimpleType
public class SimpleType
Represents simple object schema. A SimpleType contains information relative to an object or attribute's base data type and constraint or enumeration information.
A SimpleType, if based on a numeric type, may be constrained by 0 or more ranges. A SimpleType may define a finite set of EnumeratedValues associated with it. A SimpleType may contain a set of Ranges, a set of EnumeratedValues or neither, but never both.
| Constructor Summary | |
|---|---|
SimpleType()
|
|
| Method Summary | |
|---|---|
void |
addRange(Range r)
Add Range r to the end of the Ranges array. |
void |
addValue(EnumeratedValue ev)
Add EnumeratedValue ev to the end of the Values array. |
java.lang.String |
getBaseType()
Get the base data type of this type |
EnumeratedValue |
getDefaultEnumeratedValue()
Get the default enumerated value. |
java.lang.String |
getDefaultValue()
Get the default value |
EnumeratedValue |
getEnumeratedValueByValue(java.lang.String value)
Get an EnumeratedValue instance by its value. |
java.lang.String |
getEnumerationTask()
Get the enumerationTask property value |
int |
getMaxStringLength()
Get the maximum string length This property should be ignored for data types that aren't string based. |
Range[] |
getRanges()
Get the entire array of Ranges. |
Range |
getRanges(int index)
Get a Range by index from the contained array of Ranges. |
EnumeratedValue[] |
getValues()
Get the entire list of EnumeratedValues |
EnumeratedValue |
getValues(int index)
Get an EnumeratedValue by index from the array of contained EnumeratedValue. |
boolean |
isConstrained()
Determine if this SimpleType contains constraints (Ranges). |
boolean |
isEnumerated()
Determine if this SimpleType contains EnumeratedValues. |
void |
setBaseType(java.lang.String s)
Set the base data type of this type |
void |
setDefaultValue(java.lang.String s)
Set the default value |
void |
setEnumerationTask(java.lang.String t)
Set the enumerationTask property value |
void |
setMaxStringLength(int l)
Set the maximum string length This property should be ignored for data types that aren't string based. |
void |
setRanges(int index,
Range r)
Set the value of a Range at an index in the contained array of Ranges. |
void |
setRanges(Range[] vals)
Set the array of Ranges. |
void |
setValues(EnumeratedValue[] vals)
Set the entire array of EnumeratedValues. |
void |
setValues(int index,
EnumeratedValue ev)
Set the value of the EnumeratedValue at index in the array of contained EnumeratedValues. |
| Methods inherited from class com.infoengine.schema.Type |
|---|
addSuperType, getResourceBundle, getSuperType, getSuperTypes, getSuperTypes, getTypeId, setResourceBundle, setSuperTypes, setSuperTypes, setTypeId |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleType()
| Method Detail |
|---|
public void setBaseType(java.lang.String s)
s - the new base data typepublic java.lang.String getBaseType()
public void setDefaultValue(java.lang.String s)
s - the new default valuepublic java.lang.String getDefaultValue()
public void setMaxStringLength(int l)
A negative value is assumed to mean no restriction is placed on length.
l - the new maximum string lengthpublic int getMaxStringLength()
A negative value is assumed to mean no restriction is placed on length.
public EnumeratedValue getDefaultEnumeratedValue()
public void setEnumerationTask(java.lang.String t)
This property value is used to support "dynamic enumeration" of a SimpleType. It's value is only used by Info*Engine tools and the Query-Schema webject to populate enumerated values dynamically when schema is retrieved from its source.
This property can be ignored by clients.
t - the new property valuepublic java.lang.String getEnumerationTask()
This property value is used to support "dynamic enumeration" of a SimpleType. It's value is only used by Info*Engine tools and the Query-Schema webject to populate enumerated values dynamically when schema is retrieved from its source.
This property can be ignored by clients.
public void setValues(int index,
EnumeratedValue ev)
index - the index to set
ev the EnumeratedValue to storepublic EnumeratedValue getValues(int index)
index - the index to retrieve
public void setValues(EnumeratedValue[] vals)
values - the new list of EnumeratedValuespublic EnumeratedValue[] getValues()
public void setRanges(int index,
Range r)
index - the index to set
r the Range object to setpublic Range getRanges(int index)
public void setRanges(Range[] vals)
vals - the new array of Rangespublic Range[] getRanges()
public void addRange(Range r)
r - the Range to appendpublic void addValue(EnumeratedValue ev)
ev - the EnumeratedValue to appendpublic EnumeratedValue getEnumeratedValueByValue(java.lang.String value)
value - the value to search for
public boolean isConstrained()
public boolean isEnumerated()
true - if enumerated
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||