Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

### description

    protected String description

  Deprecated.
  The schema description.

### name

    protected String name

  Deprecated.
  The schema name.

### properties

    protected Map properties

  Deprecated.
  The map of property name to property info.

Constructor Detail

### DefaultDocumentSchema

    public DefaultDocumentSchema(String name)

  Deprecated.
  Constructor.

Method Detail

### 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.

### 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.

### 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.

### 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`

### getDescription

    public String getDescription()

  Deprecated.
  Get the schema description.

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

### getName

    public String getName()

  Deprecated.
  Get the schema name.

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

### 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.

### 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.

### setDescription

    public void setDescription(String d)

  Deprecated.
  Set the schema description.

### setName

    public void setName(String name)

  Deprecated.
  Set the schema name.

### setProperty

    public void setProperty(String name,
                            int type,
                            Object defValue,
                            boolean isMultiValued,
                            List possibleValues,
                            String description)

  Deprecated.
  Set the info the named property.

### 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).

### 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.

### 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved