|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.gouv.culture.sdx.utils.AbstractSdxObject fr.gouv.culture.sdx.utils.database.Property
public class Property
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/interfaces inherited from interface 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 |
---|
public static final java.lang.String CLASS_NAME_SUFFIX
protected java.lang.String name
protected java.util.ArrayList values
protected java.lang.String firstValue
Constructor Detail |
---|
public Property()
AbstractSdxObject.enableLogging(org.apache.avalon.framework.logger.Logger)
,
setName(java.lang.String)
,
setValues(java.lang.String[])
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)
Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |