se.js.jesdob
Interface IDob

All Known Implementing Classes:
Dob

public interface IDob

A IDob is a dynamic object, containing various kinds of data.

It is possible to add attributes to a dob, and to assign values to these attributes. It is possible to read back the values for a specific attrbitutes.

IDobs can be exported to text as json-format, xml-format or dob-format. They can then be saved to files and read as dynamic objects when they are needed.


Method Summary
 java.lang.String attr(java.lang.String attribute)
          Returns the value of a specific attribute.
 IDob attr(java.lang.String attribute, boolean value)
          Sets a specific attribute to a specific boolean value.
 IDob attr(java.lang.String attribute, float value)
          Sets a specific attribute to a specific float value.
 IDob attr(java.lang.String attribute, int value)
          Sets a specific attribute to a specific int value.
 IDob attr(java.lang.String attribute, java.lang.String value)
          Sets a specific attribute to a specific String value.
 boolean hasAttr(java.lang.String attribute)
          Checks if the Dob object contains a specific attribute or not.
 boolean is(java.lang.String attribute)
          Checks if a specific boolean attribute is true of false.
 IDob removeAttr(java.lang.String attribute)
          Removes a specific attribute from the Dob.
 java.lang.String toDob()
          Exports the Dob object data in dob-format.
 java.lang.String toJson()
          Exports the Dob object data in json-format.
 java.lang.String toXml()
          Exports the Dob object data in xml-format.
 

Method Detail

attr

java.lang.String attr(java.lang.String attribute)
Returns the value of a specific attribute.

Parameters:
attribute - The specific attribute.
Returns:
The value of the attribute.

attr

IDob attr(java.lang.String attribute,
          java.lang.String value)
Sets a specific attribute to a specific String value.

Parameters:
attribute - The specific attribute.
value - The specific String value.
Returns:
The dob object, to enable method chaining.

attr

IDob attr(java.lang.String attribute,
          boolean value)
Sets a specific attribute to a specific boolean value.

Parameters:
attribute - The specific attribute.
value - The specific boolean value.
Returns:
The dob object, to enable method chaining.

attr

IDob attr(java.lang.String attribute,
          int value)
Sets a specific attribute to a specific int value.

Parameters:
attribute - The specific attribute.
value - The specific int value.
Returns:
The dob object, to enable method chaining.

attr

IDob attr(java.lang.String attribute,
          float value)
Sets a specific attribute to a specific float value.

Parameters:
attribute - The specific attribute.
value - The specific float value.
Returns:
The dob object, to enable method chaining.

is

boolean is(java.lang.String attribute)
Checks if a specific boolean attribute is true of false.

Parameters:
attribute - The specific attribute.
Returns:
If the attribute is true or false.

hasAttr

boolean hasAttr(java.lang.String attribute)
Checks if the Dob object contains a specific attribute or not.

Parameters:
attribute - The specific attribute
Returns:
True or false, depending on if the attribute exists or not.

removeAttr

IDob removeAttr(java.lang.String attribute)
Removes a specific attribute from the Dob.

Parameters:
attribute - The specific attribute.
Returns:
The dob object, to enable method chaining.

toJson

java.lang.String toJson()
Exports the Dob object data in json-format.

Returns:
The Dob object data in json-format.

toXml

java.lang.String toXml()
Exports the Dob object data in xml-format.

Returns:
The Dob object data in xml-format.

toDob

java.lang.String toDob()
Exports the Dob object data in dob-format.

Returns:
The Dob object data in dob-format.