Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.gouv.culture.sdx.utils.database
Class Property

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.utils.database.Property

All Implemented Interfaces:
  org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, Describable, Encodable, Identifiable, Localizable, org.apache.avalon.framework.logger.LogEnabled, SdxObject, org.apache.avalon.framework.service.Serviceable, org.apache.excalibur.xml.sax.XMLizable

Direct Known Subclasses:
  IndexableFieldProperty, LuceneDataField

public class Property
extends AbstractSdxObject

An entity's property in SDX simple database abstraction.

An SDX simplified database can contain entities. These entities contain properties, which are name=value pairs, all strings. This class represents a property.

A property can have multiple values, but in an entity all properties have different names.

Nested Class Summary

Nested classes inherited from class fr.gouv.culture.sdx.utils.SdxObject
`SdxObject.ConfigurationNode`

Field Summary
`static java.lang.String` | `CLASS_NAME_SUFFIX`
`protected java.lang.String` | `firstValue`
`protected java.lang.String` | `name` Property's name.
`protected java.util.ArrayList` | `values` Property's values.

Fields inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
`_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized`

Fields inherited from interface fr.gouv.culture.sdx.utils.Encodable
`DEFAULT_ENCODING`

Constructor Summary
`Property()` Builds a property object The super.getLog() should be set after building this object.
`Property(java.lang.String name, java.lang.String value)` Builds a property from a name=value pair.

Method Summary
`void` | `addValue(java.lang.String value)`
`protected void` | `attemptToSetFirstValue(java.lang.String value)`
`boolean` | `containsValue(java.lang.String value)`
`void` | `deleteValue(java.lang.String value)` Deletes the value from the list
`protected java.lang.String` | `getClassNameSuffix()` Sub classes should element this method to return their class name suffix for SAX output
`java.lang.String` | `getName()` Returns the property's name.
`java.lang.String` | `getValue()` Returns the first value.
`java.lang.String[]` | `getValues()` Returns the values as an array.
`protected boolean` | `initToSax()` Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML
`protected void` | `initVolatileObjectsToSax()` Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML Some objects need to be refresh each time a toSAX is called
`protected void` | `resetValues()`
`void` | `setName(java.lang.String name)` Sets the property's name.
`void` | `setValues(java.lang.String[] values)` Sets the values from an array.

Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
`configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResources`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CLASS_NAME_SUFFIX

    public static final java.lang.String CLASS_NAME_SUFFIX

See Also:
  Constant Field Values

### name

    protected java.lang.String name

  Property's name.

### values

    protected java.util.ArrayList values

  Property's values.

### firstValue

    protected java.lang.String firstValue

Constructor Detail

### Property

    public Property()

  Builds a property object The super.getLog() should be set after building this object. Then there are methods to set the name of this property and its values.

See Also:
  `AbstractSdxObject.enableLogging(org.apache.avalon.framework.logger.Logger)`, `setName(java.lang.String)`, `setValues(java.lang.String[])`

### Property

    public Property(java.lang.String name,
                    java.lang.String value)

  Builds a property from a name=value pair. The super.getLog() should be set after building this object.

Parameters:
  `name` - The name for the property
  `value` - Its value
See Also:
  `AbstractSdxObject.enableLogging(org.apache.avalon.framework.logger.Logger)`

Method Detail

### setName

    public void setName(java.lang.String name)

  Sets the property's name.

  Parameters:
    `name` - The property's name.

### setValues

    public void setValues(java.lang.String[] values)

  Sets the values from an array.

  Parameters:
    `values` - The array containing the values.

### getName

    public java.lang.String getName()

  Returns the property's name.

### getValues

    public java.lang.String[] getValues()

  Returns the values as an array.

### getValue

    public java.lang.String getValue()

  Returns the first value.

### deleteValue

    public void deleteValue(java.lang.String value)

  Deletes the value from the list

  Parameters:
    `value` - The value to delete

### addValue

    public void addValue(java.lang.String value)

### attemptToSetFirstValue

    protected void attemptToSetFirstValue(java.lang.String value)

### resetValues

    protected void resetValues()

### containsValue

    public boolean containsValue(java.lang.String value)

### getClassNameSuffix

    protected java.lang.String getClassNameSuffix()

  Description copied from class: `AbstractSdxObject`
  Sub classes should element this method to return their class name suffix for SAX output

  Specified by:
    `getClassNameSuffix` in class `AbstractSdxObject`

### initToSax

    protected boolean initToSax()

  Description copied from class: `AbstractSdxObject`
  Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML

  Specified by:
    `initToSax` in class `AbstractSdxObject`

### initVolatileObjectsToSax

    protected void initVolatileObjectsToSax()

  Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML Some objects need to be refresh each time a toSAX is called

  Specified by:
    `initVolatileObjectsToSax` in class `AbstractSdxObject`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.