public class Property extends AbstractSdxObject
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.
SdxObject.ConfigurationNode
Modifier and Type | Field and Description |
---|---|
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.
|
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized
DEFAULT_ENCODING
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResources
public static final java.lang.String CLASS_NAME_SUFFIX
protected java.lang.String name
protected java.util.ArrayList values
protected java.lang.String firstValue
public Property()
public Property(java.lang.String name, java.lang.String value)
name
- The name for the propertyvalue
- Its valueAbstractSdxObject.enableLogging(org.apache.avalon.framework.logger.Logger)
public void setName(java.lang.String name)
name
- The property's name.public void setValues(java.lang.String[] values)
values
- The array containing the values.public java.lang.String getName()
public java.lang.String[] getValues()
public java.lang.String getValue()
public void deleteValue(java.lang.String value)
value
- The value to deletepublic void addValue(java.lang.String value)
protected void attemptToSetFirstValue(java.lang.String value)
protected void resetValues()
public boolean containsValue(java.lang.String value)
protected java.lang.String getClassNameSuffix()
AbstractSdxObject
getClassNameSuffix
in class AbstractSdxObject
protected boolean initToSax()
AbstractSdxObject
initToSax
in class AbstractSdxObject
protected void initVolatileObjectsToSax()
initVolatileObjectsToSax
in class AbstractSdxObject
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.