Class Module

    • Field Detail

      • FDOC_CONVERT

        public boolean FDOC_CONVERT
    • Constructor Detail

      • Module

        public Module()
      • Module

        public Module​(URI namespace,
                      String alias,
                      State state)
    • Method Detail

      • getMTKey

        public MTKey getMTKey()
      • isExternal

        public boolean isExternal()
        This returns true only if the module is from another language than a QDL module.
        Returns:
      • isTemplate

        public boolean isTemplate()
        The system will mark loaded modules as template.
        Returns:
      • setTemplate

        public void setTemplate​(boolean template)
      • getState

        public State getState()
      • setState

        public void setState​(State state)
      • getAlias

        public String getAlias()
      • setAlias

        public void setAlias​(String alias)
      • getNamespace

        public URI getNamespace()
      • setNamespace

        public void setNamespace​(URI namespace)
      • toJSON

        public net.sf.json.JSONArray toJSON()
      • fromJSON

        public void fromJSON​(net.sf.json.JSONArray array)
      • newInstance

        public abstract Module newInstance​(State state)
        Modules 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.
        Parameters:
        state -
        Returns:
      • setupModule

        protected void setupModule​(Module module)
        Called in newInstance(State) to finish setting up the module for things like serialization. When you write newInstance(State) the very last thing you should do is invoke this on your new module.
        Parameters:
        module -
      • serializeToJSON

        public net.sf.json.JSONObject serializeToJSON​(SerializationState serializationState)
                                               throws Throwable
        The result of this is a json object
        Parameters:
        serializationState -
        Returns:
        Throws:
        Throwable
      • writeExtraXMLElements

        public void writeExtraXMLElements​(XMLStreamWriter xsw)
                                   throws XMLStreamException
        Write extra elements. You must control for the opening and closing tags. These are inserted right after the state element.
        Parameters:
        xsw -
        Throws:
        XMLStreamException
      • readExtraXMLAttributes

        public void readExtraXMLAttributes​(XMLEvent xe)
                                    throws XMLStreamException
        This is passed the current event and should only have calls to read the attributes.
        Parameters:
        xe -
        Throws:
        XMLStreamException
      • readExtraXMLElements

        public void readExtraXMLElements​(XMLEvent xe,
                                         XMLEventReader xer)
                                  throws XMLStreamException
        This 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.
        Parameters:
        xe -
        xer -
        Throws:
        XMLStreamException
      • getListByTag

        public abstract List<String> getListByTag()
      • setDocumentation

        public abstract void setDocumentation​(List<String> documentation)
      • getDocumentation

        public abstract List<String> getDocumentation()
      • getParentTemplateID

        public UUID getParentTemplateID()
      • setParentTemplateID

        public void setParentTemplateID​(UUID parentTemplateID)
      • getParentInstanceID

        public UUID getParentInstanceID()
      • setParentInstanceID

        public void setParentInstanceID​(UUID parentInstanceID)
      • getParentInstanceAlias

        public String getParentInstanceAlias()
      • setParentInstanceAlias

        public void setParentInstanceAlias​(String parentInstanceAlias)
      • getId

        public UUID getId()
      • setId

        public void setId​(UUID id)
      • getInheritMode

        public int getInheritMode()
      • setInheritanceMode

        public void setInheritanceMode​(int inheritMode)