|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hackystat.sensorbase.resource.sensordatatypes.SdtManager
public class SdtManager
Provides a manager for the SensorDataType resource. As with all of the Resource managers the methods in this class can be grouped into three general categories, of which this Manager uses the following:
See https://jaxb.dev.java.net/guide/Performance_and_thread_safety.html for info on JAXB performance and thread safety.
All public methods of this class are synchronized so that we can maintain the cache along with the underlying persistent store in a thread-safe fashion.
Field Summary | |
---|---|
(package private) DbManager |
dbManager
The DbManager associated with this server. |
static java.lang.String |
sensorDataTypeIndexCloseTag
The SensorDataTypeIndex close tag. |
static java.lang.String |
sensorDataTypeIndexOpenTag
The SensorDataTypeIndex open tag. |
(package private) Server |
server
The Server associated with this SdtManager. |
Constructor Summary | |
---|---|
SdtManager(Server server)
The constructor for SdtManagers. |
Method Summary | |
---|---|
void |
deleteSdt(java.lang.String sdtName)
Ensures that the passed sdtName is no longer present in this Manager. |
java.lang.String |
getSensorDataTypeIndex()
Returns the XML string containing the SensorDataTypeIndex with all defined SDTs. |
java.lang.String |
getSensorDataTypeString(java.lang.String sdtName)
Returns the XML String representation of a SensorDataType, given its name. |
boolean |
hasSdt(java.lang.String sdtName)
Returns true if the passed SDT name is defined. |
java.lang.String |
makeSensorDataType(SensorDataType sdt)
Returns the passed SensorDataType instance as a String encoding of its XML representation. |
SensorDataType |
makeSensorDataType(java.lang.String xmlString)
Takes a String encoding of a SensorDataType in XML format and converts it to an instance. |
SensorDataTypeIndex |
makeSensorDataTypeIndex(java.lang.String xmlString)
Takes a String encoding of a SensorDataTypeIndex in XML format and converts it to an instance. |
SensorDataTypeRef |
makeSensorDataTypeRef(SensorDataType sdt)
Returns a SensorDataTypeRef instance constructed from a SensorDataType instance. |
java.lang.String |
makeSensorDataTypeRefString(SensorDataType sdt)
Returns the passed SensorDataType instance as a String encoding of its XML representation as a SensorDataTypeRef object. |
void |
putSdt(SensorDataType sdt)
Updates the Manager with this SDT. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Server server
DbManager dbManager
public static final java.lang.String sensorDataTypeIndexOpenTag
public static final java.lang.String sensorDataTypeIndexCloseTag
Constructor Detail |
---|
public SdtManager(Server server)
server
- The Server instance associated with this SdtManager.Method Detail |
---|
public java.lang.String getSensorDataTypeIndex()
public java.lang.String getSensorDataTypeString(java.lang.String sdtName)
sdtName
- The name of the SDT.
public void putSdt(SensorDataType sdt)
sdt
- The SensorDataType.public boolean hasSdt(java.lang.String sdtName)
sdtName
- A SensorDataType name
public void deleteSdt(java.lang.String sdtName)
sdtName
- The name of the SDT to remove if currently present.public final SensorDataType makeSensorDataType(java.lang.String xmlString) throws java.lang.Exception
xmlString
- The XML string representing a SensorDataType
java.lang.Exception
- If problems occur during unmarshalling.public final SensorDataTypeIndex makeSensorDataTypeIndex(java.lang.String xmlString) throws java.lang.Exception
xmlString
- The XML string representing a SensorDataTypeIndex.
java.lang.Exception
- If problems occur during unmarshalling.public final java.lang.String makeSensorDataType(SensorDataType sdt) throws java.lang.Exception
sdt
- The SensorDataType instance.
java.lang.Exception
- If problems occur during translation.public final java.lang.String makeSensorDataTypeRefString(SensorDataType sdt) throws java.lang.Exception
sdt
- The SensorDataType instance.
java.lang.Exception
- If problems occur during translation.public SensorDataTypeRef makeSensorDataTypeRef(SensorDataType sdt)
sdt
- The SensorDataType instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |