AdlStructure

public class AdlStructure

The Class AdlStructure contains a JSON structure representing a whole or a part of an OpenEHR Archetype.

Constructors

AdlStructure

public AdlStructure(Object item)

Instantiates a new adl structure.

Parameters:
  • item – the structure. It can be a JSONObject (a single structure or datatype) or a JSONArray (a list of structures and/or datatypes).

Methods

count

public int count()

Get the amount of instances of this structure.

Returns:the int

getCardinality

public StructureCardinality getCardinality()

Gets the cardinality of this ADL structure

Returns:the cardinality

getOriginalObject

public Object getOriginalObject()

Gets the original item provided for building this ADL structure.

Returns:the original object

See also: .AdlStructure(Object)

getStructure

public JSONObject getStructure(int index)

Get the index-th occurrence of this ADL structure.

Parameters:
  • index – the index
Throws:
  • JSONException – the JSON exception
Returns:

the adl structure

toString

public String toString()