EhrDatatype¶
-
public abstract class
EhrDatatype
¶ This is the base class for all data types included in a generic Archetype, as defined by the OpenEHR ADL structure
Fields¶
datatypeChangeListener¶
-
protected EhrDatatypeChangeListener
datatypeChangeListener
¶ The datatype change listener.
Methods¶
fromJSON¶
-
public abstract void
fromJSON
(JSONObject data)¶ Load the new content of this datatype from a json schema.
Parameters: - data – the json structure representing this datatype
Throws: - InvalidDatatypeException – the invalid datatype exception
- JSONException – if a malformed json structure was provided
isCluster¶
-
public boolean
isCluster
()¶ Returns: True
if this datatype is a container for other datatypes,False
otherwise
isInnerArchetype¶
-
public boolean
isInnerArchetype
()¶ Returns: True
if this datatype is an archetype itselfFalse
otherwise
setAttributes¶
-
protected abstract void
setAttributes
(JSONObject attributes)¶ Sets the attributes for this datatype. Generally, different datatypes have different attributes.
Parameters: - attributes – the json structure containing all the attributes of this datatype.
Throws: - JSONException – if a malformed json structure was provided
setDatatypeChangeListener¶
-
public void
setDatatypeChangeListener
(EhrDatatypeChangeListener datatypeChangeListener)¶ Sets the Event listener interface for ‘change’ events.
Parameters: - datatypeChangeListener – the Listener where to notify any content modification of this datatype