Package org.qdl_lang.expressions.module
Class QDLModule
- java.lang.Object
- 
- org.qdl_lang.expressions.module.Module
- 
- org.qdl_lang.expressions.module.QDLModule
 
 
- 
- All Implemented Interfaces:
- Serializable,- Cloneable,- XThing
 
 public class QDLModule extends Module Created by Jeff Gaynor 
 on 4/1/20 at 11:30 AM- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.qdl_lang.expressions.module.ModuleFDOC_CONVERT
 
- 
 - 
Constructor SummaryConstructors Constructor Description QDLModule()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>createDefaultDocs()voiddeserializeFromJSON(net.sf.json.JSONObject json, SerializationState serializationState)Deserializes a JSON object into the current module.List<String>getDocumentation()StringgetFilePath()List<String>getListByTag()Documentation resides in the module definition, so it is loaded here at parse time.ModuleStatementgetModuleStatement()List<String>getSource()ModulenewInstance(State state)Modules are effectively templates.voidreadExtraXMLElements(XMLEvent xe, XMLEventReader xer)This passes in the current start event so you can add your own event loop and cases.net.sf.json.JSONObjectserializeToJSON(SerializationState serializationState)The result of this is a json objectvoidsetDocumentation(List<String> documentation)voidsetFilePath(String filePath)voidsetModuleStatement(ModuleStatement moduleStatement)voidwriteExtraXMLElements(XMLStreamWriter xsw)Write extra elements.- 
Methods inherited from class org.qdl_lang.expressions.module.ModulefromJSON, fromXML, fromXML, getAlias, getDescription, getId, getInheritMode, getKey, getListByTag, getMTKey, getName, getNamespace, getParentInstanceAlias, getParentInstanceID, getParentTemplateID, getState, isExternal, isTemplate, isUsed, readExtraXMLAttributes, setAlias, setDescription, setId, setInheritanceMode, setNamespace, setParentInstanceAlias, setParentInstanceID, setParentTemplateID, setState, setTemplate, setupModule, setUsed, toJSON, toString, toXML, toXML, toXML2, writeExtraXMLAttributes
 
- 
 
- 
- 
- 
Method Detail- 
getFilePathpublic String getFilePath() 
 - 
setFilePathpublic void setFilePath(String filePath) 
 - 
getModuleStatementpublic ModuleStatement getModuleStatement() 
 - 
setModuleStatementpublic void setModuleStatement(ModuleStatement moduleStatement) 
 - 
newInstancepublic Module newInstance(State state) Description copied from class:ModuleModules are effectively templates. This passes in the state of the parser at the point a new module is required and the contract is to create a new instance of this module with the state. Note that the state passed in may have nothing to do with the state here. You are creating a new module for the given state using this as a template.
 All implementations should gracefully handle a null state with the assumption that the full state will be set later. This is because of bootstrapping networks of modules during deserialization.- Specified by:
- newInstancein class- Module
- Returns:
 
 - 
writeExtraXMLElementspublic void writeExtraXMLElements(XMLStreamWriter xsw) throws XMLStreamException Description copied from class:ModuleWrite extra elements. You must control for the opening and closing tags. These are inserted right after the state element.- Overrides:
- writeExtraXMLElementsin class- Module
- Throws:
- XMLStreamException
 
 - 
serializeToJSONpublic net.sf.json.JSONObject serializeToJSON(SerializationState serializationState) throws Throwable Description copied from class:ModuleThe result of this is a json object- Overrides:
- serializeToJSONin class- Module
- Returns:
- Throws:
- Throwable
 
 - 
deserializeFromJSONpublic void deserializeFromJSON(net.sf.json.JSONObject json, SerializationState serializationState) throws ThrowableDescription copied from class:ModuleDeserializes a JSON object into the current module. You must check the type in the json object o know which class (e.g.,JavaModuleto instantiate first.- Overrides:
- deserializeFromJSONin class- Module
- Throws:
- Throwable
 
 - 
readExtraXMLElementspublic void readExtraXMLElements(XMLEvent xe, XMLEventReader xer) throws XMLStreamException Description copied from class:ModuleThis passes in the current start event so you can add your own event loop and cases. Note you need have only a switch on the tag names you want.- Overrides:
- readExtraXMLElementsin class- Module
- Throws:
- XMLStreamException
 
 - 
getListByTagpublic List<String> getListByTag() Documentation resides in the module definition, so it is loaded here at parse time.- Specified by:
- getListByTagin class- Module
- Returns:
 
 - 
setDocumentationpublic void setDocumentation(List<String> documentation) - Specified by:
- setDocumentationin class- Module
 
 - 
getDocumentationpublic List<String> getDocumentation() - Specified by:
- getDocumentationin class- Module
 
 - 
createDefaultDocspublic List<String> createDefaultDocs() - Specified by:
- createDefaultDocsin class- Module
 
 
- 
 
-