© 2003 BEA Systems, Inc.

com.bea.p13n.content.document.ref
Class DefaultDocumentSchema

java.lang.Object
  |
  +--com.bea.p13n.content.document.ref.DefaultDocumentSchema
All Implemented Interfaces:
DocumentSchemaDef

public class DefaultDocumentSchema
extends Object
implements DocumentSchemaDef

A concrete, base implementation of a document schema.


Nested Class Summary
static class DefaultDocumentSchema.PropertyInfo
          Deprecated. Helper data structure.
 
Field Summary
protected  String description
          Deprecated. The schema description.
protected  String name
          Deprecated. The schema name.
protected  Map properties
          Deprecated. The map of property name to property info.
 
Fields inherited from interface com.bea.p13n.content.document.spi.DocumentSchemaDef
BOOLEAN, DATETIME, FLOAT, INTEGER, TEXT, USER_DEFINED
 
Constructor Summary
DefaultDocumentSchema(String name)
          Deprecated. Constructor.
 
Method Summary
 Object getAttributeDefaultValue(String name)
          Deprecated. Get the default value for the attribute.
 String getAttributeDescription(String name)
          Deprecated. Get the description for the named attribute.
 Collection getAttributeNames()
          Deprecated. Get the list of valid property names.
 List getAttributePossibleValues(String name)
          Deprecated. Get the possible values for the attribute.
 int getAttributeType(String name)
          Deprecated. Get the attribute type.
 String getDescription()
          Deprecated. Get the schema description.
 String getName()
          Deprecated. Get the schema name.
 DefaultDocumentSchema.PropertyInfo getPropertyInfo(String name)
          Deprecated. Get the info for the named property.
 boolean isAttributeMultiValued(String name)
          Deprecated. Determine if the attribute is multi-valued.
 void setDescription(String d)
          Deprecated. Set the schema description.
 void setName(String name)
          Deprecated. Set the schema name.
 void setProperty(String name, int type, Object defValue, boolean isMultiValued, List possibleValues, String description)
          Deprecated. Set the info the named property.
 void setPropertyInfo(String name, DefaultDocumentSchema.PropertyInfo info)
          Deprecated. Set the info for the named property.
static boolean validateAttribute(DefaultDocumentSchema.PropertyInfo info, Object value)
          Deprecated. Validate the attribute value against the given property info.
static boolean validateAttribute(int type, Object value)
          Deprecated. Validate the attribute value against the specified type.
 boolean validateAttribute(String name, Object value)
          Deprecated. 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

name

protected String name
Deprecated. 
The schema name.


description

protected String description
Deprecated. 
The schema description.


properties

protected Map properties
Deprecated. 
The map of property name to property info.

Constructor Detail

DefaultDocumentSchema

public DefaultDocumentSchema(String name)
Deprecated. 
Constructor.

Method Detail

getName

public String getName()
Deprecated. 
Get the schema name.

Specified by:
getName in interface DocumentSchemaDef
Returns:
the String schema name.

setName

public void setName(String name)
Deprecated. 
Set the schema name.


getDescription

public String getDescription()
Deprecated. 
Get the schema description.

Specified by:
getDescription in interface DocumentSchemaDef
Returns:
the description of the schema (null for none).

setDescription

public void setDescription(String d)
Deprecated. 
Set the schema description.


setPropertyInfo

public void setPropertyInfo(String name,
                            DefaultDocumentSchema.PropertyInfo info)
Deprecated. 
Set the info for the named property.

Parameters:
name - the property name.
info - the property info (null to remove).

setProperty

public void setProperty(String name,
                        int type,
                        Object defValue,
                        boolean isMultiValued,
                        List possibleValues,
                        String description)
Deprecated. 
Set the info the named property.


getPropertyInfo

public DefaultDocumentSchema.PropertyInfo getPropertyInfo(String name)
                                                   throws DocumentException
Deprecated. 
Get the info for the named property.

Parameters:
name - the property name.
Returns:
the info for the property.
Throws:
DocumentException - thrown if the propert info doesn't exist.

getAttributeNames

public Collection getAttributeNames()
Deprecated. 
Get the list of valid property names.

Specified by:
getAttributeNames in interface DocumentSchemaDef
Returns:
the list of String attribute names.

getAttributeType

public int getAttributeType(String name)
                     throws DocumentException
Deprecated. 
Get the attribute type.

Specified by:
getAttributeType in interface DocumentSchemaDef
Parameters:
name - the name of the attribute.
Returns:
the int type (one of TEXT, INTEGER, FLOAT, BOOLEAN, DATE, or USER_DEFINED).
Throws:
DocumentException - thrown on an error.
See Also:
DocumentSchemaDef.TEXT, DocumentSchemaDef.INTEGER, DocumentSchemaDef.FLOAT, DocumentSchemaDef.BOOLEAN, DocumentSchemaDef.DATETIME, DocumentSchemaDef.USER_DEFINED

getAttributeDefaultValue

public Object getAttributeDefaultValue(String name)
                                throws DocumentException
Deprecated. 
Get the default value for the attribute.

Specified by:
getAttributeDefaultValue in interface DocumentSchemaDef
Parameters:
name - the name of the attribute.
Returns:
the default value, or null for none.
Throws:
DocumentException - thrown on an error.

getAttributeDescription

public String getAttributeDescription(String name)
                               throws DocumentException
Deprecated. 
Get the description for the named attribute.

Specified by:
getAttributeDescription in interface DocumentSchemaDef
Parameters:
name - the name of the attribute.
Returns:
the description, or null for none.
Throws:
DocumentException - thrown on an error.

isAttributeMultiValued

public boolean isAttributeMultiValued(String name)
                               throws DocumentException
Deprecated. 
Determine if the attribute is multi-valued.

Specified by:
isAttributeMultiValued in interface DocumentSchemaDef
Parameters:
name - the name of the attribute.
Returns:
true if multi-valued, false if not
Throws:
DocumentException - thrown on an error.

getAttributePossibleValues

public List getAttributePossibleValues(String name)
                                throws DocumentException
Deprecated. 
Get the possible values for the attribute.

Specified by:
getAttributePossibleValues in interface DocumentSchemaDef
Parameters:
name - the name of the attribute.
Returns:
the list of possible values.
Throws:
DocumentException - thrown on an error.

validateAttribute

public boolean validateAttribute(String name,
                                 Object value)
                          throws DocumentException
Deprecated. 
Validate the specified attribute against the given value.

Specified by:
validateAttribute in interface DocumentSchemaDef
Parameters:
name - the name of the attribute.
value - the suggested value for the attribute.
Returns:
true if the value valid, false if not.
Throws:
DocumentException - thrown on an error.

validateAttribute

public static boolean validateAttribute(DefaultDocumentSchema.PropertyInfo info,
                                        Object value)
Deprecated. 
Validate the attribute value against the given property info.


validateAttribute

public static boolean validateAttribute(int type,
                                        Object value)
Deprecated. 
Validate the attribute value against the specified type.


© 2003 BEA Systems, Inc.

Copyright © 2003 BEA Systems, Inc. All Rights Reserved