DocumentSchemaDef Interface
DEPRECATED
- public interface DocumentSchemaDef
An object representing a schema for a set of the documents.
-
All Known Implementing Classes
-
com.bea.p13n.content.document.ref.DefaultDocumentSchema
public static final int |
-
BOOLEAN
- Specifies a boolean attribute (0).
|
public static final int |
-
DATETIME
- Specifies a date/time attribute (4).
|
public static final int |
-
FLOAT
- Specifies a float attribute (2).
|
public static final int |
-
INTEGER
- Specifies an integer attribute (1).
|
public static final int |
-
TEXT
- Specifies a text attribute (3).
|
public static final int |
-
USER_DEFINED
- Specifes a user definined (object) attribute (5).
|
BOOLEAN
public static final int BOOLEAN
- Specifies a boolean attribute (0).
DATETIME
public static final int DATETIME
- Specifies a date/time attribute (4).
FLOAT
public static final int FLOAT
- Specifies a float attribute (2).
INTEGER
public static final int INTEGER
- Specifies an integer attribute (1).
TEXT
public static final int TEXT
- Specifies a text attribute (3).
USER_DEFINED
public static final int USER_DEFINED
- Specifes a user definined (object) attribute (5).
getAttributeDefaultValue(String) Method
public Object
getAttributeDefaultValue(String
attributeName)
throws DocumentException
Get the default value for the named attribute.
Parameters
-
attributeName
- the name of the attribute.
Returns
- the default value, or null for none.
Exceptions
-
DocumentException
- thrown on an error.
getAttributeDescription(String) Method
public String
getAttributeDescription(String
attributeName)
throws DocumentException
Get a text description of the attribute.
Parameters
-
attributeName
- the name of the attribute.
Returns
- the description, or null for none.
Exceptions
-
DocumentException
- thrown on an error.
getAttributeNames() Method
public Collection
getAttributeNames()
throws DocumentException
Returns the list of valid attribute names in this schema.
Returns
- the list of String attribute names.
Exceptions
-
DocumentException
- thrown on an error.
getAttributePossibleValues(String) Method
public List
getAttributePossibleValues(String
attributeName)
throws DocumentException
Return the list of possible values for a multi-vauled attribute.
This returns null for non multi-valued attributes and multi-valued
attributes which are not restricted to a set of possible values.
Parameters
-
attributeName
- the name of the attribute.
Returns
- the list of possible values.
Exceptions
-
DocumentException
- thrown on an error.
getAttributeType(String) Method
public int getAttributeType(String
attributeName)
throws DocumentException
Returns the type of the named attribute.
Parameters
-
attributeName
- the name of the attribute.
Returns
- the int type (one of TEXT, INTEGER, FLOAT, BOOLEAN, DATE, or
USER_DEFINED).
Exceptions
-
DocumentException
- thrown on an error.
Related Topics
DocumentSchemaDef.TEXT
DocumentSchemaDef.INTEGER
DocumentSchemaDef.FLOAT
DocumentSchemaDef.BOOLEAN
DocumentSchemaDef.DATETIME
DocumentSchemaDef.USER_DEFINED
getDescription() Method
public String
getDescription()
throws DocumentException
Returns the schema description.
Returns
- the description of the schema (null for none).
Exceptions
-
DocumentException
- thrown on an error.
getName() Method
public String
getName()
throws DocumentException
Returns the schema name.
Returns
- the String schema name.
Exceptions
-
DocumentException
- thrown on an error.
isAttributeMultiValued(String) Method
public boolean isAttributeMultiValued(String
attributeName)
throws DocumentException
Tell if the named attribute is a multi-valued attribute
(i.e. its value in the DocumentMetadata is really a List).
Parameters
-
attributeName
- the name of the attribute.
Returns
- true if multi-valued, false if not
Exceptions
-
DocumentException
- thrown on an error.
validateAttribute(String, Object) Method
public boolean validateAttribute(String
attributeName,
Object
attributeValue)
throws DocumentException
Validate that a given attribute value is valid based upon the
schema information.
Parameters
-
attributeName
- the name of the attribute.
-
attributeValue
- the suggested value for the attribute.
Returns
- true if the value valid, false if not.
Exceptions
-
DocumentException
- thrown on an error.