|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.axiom.document.ref.DefaultDocumentSchema
A concrete, base implementation of a document schema.
Inner Class Summary | |
static class |
DefaultDocumentSchema.PropertyInfo
Helper data structure. |
Field Summary | |
protected java.lang.String |
description
The schema description. |
protected java.lang.String |
name
The schema name. |
protected java.util.Map |
properties
The map of property name to property info. |
Fields inherited from interface com.beasys.commerce.axiom.document.spi.DocumentSchemaDef |
BOOLEAN,
DATETIME,
FLOAT,
INTEGER,
TEXT,
USER_DEFINED |
Constructor Summary | |
DefaultDocumentSchema(java.lang.String name)
Constructor. |
Method Summary | |
java.lang.Object |
getAttributeDefaultValue(java.lang.String name)
Get the default value for the attribute. |
java.lang.String |
getAttributeDescription(java.lang.String name)
Get the description for the named attribute. |
java.util.Collection |
getAttributeNames()
Get the list of valid property names. |
java.util.List |
getAttributePossibleValues(java.lang.String name)
Get the possible values for the attribute. |
int |
getAttributeType(java.lang.String name)
Get the attribute type. |
java.lang.String |
getDescription()
Get the schema description. |
java.lang.String |
getName()
Get the schema name. |
DefaultDocumentSchema.PropertyInfo |
getPropertyInfo(java.lang.String name)
Get the info for the named property. |
boolean |
isAttributeMultiValued(java.lang.String name)
Determine if the attribute is multi-valued. |
void |
setDescription(java.lang.String d)
Set the schema description. |
void |
setName(java.lang.String name)
Set the schema name. |
void |
setProperty(java.lang.String name,
int type,
java.lang.Object defValue,
boolean isMultiValued,
java.util.List possibleValues,
java.lang.String description)
Set the info the named property. |
void |
setPropertyInfo(java.lang.String name,
DefaultDocumentSchema.PropertyInfo info)
Set the info for the named property. |
static boolean |
validateAttribute(DefaultDocumentSchema.PropertyInfo info,
java.lang.Object value)
Validate the attribute value against the given property info. |
static boolean |
validateAttribute(int type,
java.lang.Object value)
Validate the attribute value against the specified type. |
boolean |
validateAttribute(java.lang.String name,
java.lang.Object value)
Validate the specified attribute against the given value. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.lang.String name
protected java.lang.String description
protected java.util.Map properties
Constructor Detail |
public DefaultDocumentSchema(java.lang.String name)
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getDescription()
public void setDescription(java.lang.String d)
public void setPropertyInfo(java.lang.String name, DefaultDocumentSchema.PropertyInfo info)
name
- the property name.info
- the property info (null to remove).public void setProperty(java.lang.String name, int type, java.lang.Object defValue, boolean isMultiValued, java.util.List possibleValues, java.lang.String description)
public DefaultDocumentSchema.PropertyInfo getPropertyInfo(java.lang.String name) throws DocumentException
name
- the property name.public java.util.Collection getAttributeNames()
public int getAttributeType(java.lang.String name) throws DocumentException
attributeName
- the name of the attribute.DocumentSchemaDef.TEXT
,
DocumentSchemaDef.INTEGER
,
DocumentSchemaDef.FLOAT
,
DocumentSchemaDef.BOOLEAN
,
DocumentSchemaDef.DATETIME
,
DocumentSchemaDef.USER_DEFINED
public java.lang.Object getAttributeDefaultValue(java.lang.String name) throws DocumentException
attributeName
- the name of the attribute.public java.lang.String getAttributeDescription(java.lang.String name) throws DocumentException
attributeName
- the name of the attribute.public boolean isAttributeMultiValued(java.lang.String name) throws DocumentException
attributeName
- the name of the attribute.public java.util.List getAttributePossibleValues(java.lang.String name) throws DocumentException
attributeName
- the name of the attribute.public boolean validateAttribute(java.lang.String name, java.lang.Object value) throws DocumentException
attributeName
- the name of the attribute.attributeValue
- the suggested value for the attribute.public static boolean validateAttribute(DefaultDocumentSchema.PropertyInfo info, java.lang.Object value)
public static boolean validateAttribute(int type, java.lang.Object value)
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |