Package org.qdl_lang.variables
Class VTable<K extends XKey,V extends VThing>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- org.qdl_lang.state.XTable<K,V>
-
- org.qdl_lang.variables.VTable<K,V>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,V>
public class VTable<K extends XKey,V extends VThing> extends XTable<K,V>
Created by Jeff Gaynor
on 2/20/22 at 6:12 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description VTable()
-
Method Summary
-
Methods inherited from class org.qdl_lang.state.XTable
convertFDOC, fromXML, getID, getModuleUtils, put, serializeToJSON, toString
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
-
-
-
Field Detail
-
KEY_KEY
public static final String KEY_KEY
- See Also:
- Constant Field Values
-
VALUE_KEY
public static final String VALUE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
toXML2
public void toXML2(XMLStreamWriter xsw, SerializationState serializationState) throws XMLStreamException
- Throws:
XMLStreamException
-
toXMLEntry
protected void toXMLEntry(V vThing, XMLStreamWriter xsw, SerializationState serializationState) throws XMLStreamException
New format (version 2.1+) for non-modules is<e type="qdl"> <v>base64_encoded_QDL</v> </e>
and for modules it is<e type="module"> <v>base64_encoded_QDL</v> <state inheritanceMode="...">serialized_module_state</state> </e>
- Parameters:
vThing
-xsw
-serializationState
-- Throws:
XMLStreamException
-
serializeToJSON
public net.sf.json.JSONObject serializeToJSON(V xThing, SerializationState serializationState) throws Throwable
This serializes an entry. The contract is that these are knitted into an array.
-
deserializeFromJSON
public void deserializeFromJSON(net.sf.json.JSONObject json, QDLInterpreter qi, SerializationState serializationState) throws Throwable
-
fromXMLEntry
protected void fromXMLEntry(XMLEventReader xer, QDLInterpreter qi) throws XMLStreamException
- Throws:
XMLStreamException
-
toXML
public void toXML(XMLStreamWriter xsw, SerializationState SerializationState) throws XMLStreamException
-
fromXML
public void fromXML(XMLEventReader xer, QDLInterpreter qi) throws XMLStreamException
-
getXMLTableTag
public String getXMLTableTag()
-
getXMLElementTag
public String getXMLElementTag()
-
deserializeElement
public V deserializeElement(XMLEventReader xer, SerializationState SerializationState, QDLInterpreter qi) throws XMLStreamException
- Specified by:
deserializeElement
in classXTable<K extends XKey,V extends VThing>
- Returns:
- Throws:
XMLStreamException
-
toJSONEntry
public String toJSONEntry(V xThing, SerializationState serializationState)
-
fromJSONEntry
public String fromJSONEntry(String x, SerializationState serializationState)
-
-