Class TsmlElement

    • Field Summary

      Fields 
      Modifier and Type Field Description
      int lineNumber  
      java.lang.String tag
      The PNML tag for this element.
    • Constructor Summary

      Constructors 
      Constructor Description
      TsmlElement​(java.lang.String tag)
      Creates a fresh PNML element.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkValidity​(Tsml tsml)
      Default check for validity: No action.
      protected java.lang.String exportAttribute​(java.lang.String tag, java.lang.String value, Tsml tsml)
      Default way to export some attribute.
      protected java.lang.String exportAttributes​(Tsml tsml)
      Exports all standard attributes: None.
      java.lang.String exportElement​(Tsml tsml)
      Exports the element.
      protected java.lang.String exportElements​(Tsml tsml)
      Exports all standard elements: None.
      protected void importAttributes​(org.xmlpull.v1.XmlPullParser xpp, Tsml tsml)
      Imports all standard attributes: None.
      void importElement​(org.xmlpull.v1.XmlPullParser xpp, Tsml tsml)
      Imports the given element.
      protected boolean importElements​(org.xmlpull.v1.XmlPullParser xpp, Tsml tsml)
      Imports all standard child elements: None.
      protected void importText​(java.lang.String text, Tsml tsml)
      Imports standard text: No action.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • tag

        public java.lang.String tag
        The PNML tag for this element.
      • lineNumber

        public int lineNumber
    • Constructor Detail

      • TsmlElement

        public TsmlElement​(java.lang.String tag)
        Creates a fresh PNML element.
        Parameters:
        tag -
    • Method Detail

      • importElement

        public void importElement​(org.xmlpull.v1.XmlPullParser xpp,
                                  Tsml tsml)
        Imports the given element.
        Parameters:
        xpp -
        tsml -
      • exportElement

        public java.lang.String exportElement​(Tsml tsml)
        Exports the element.
        Returns:
      • importAttributes

        protected void importAttributes​(org.xmlpull.v1.XmlPullParser xpp,
                                        Tsml tsml)
        Imports all standard attributes: None. If some subclass has attributes, this method needs to be overruled by it.
        Parameters:
        xpp -
        tsml -
      • exportAttributes

        protected java.lang.String exportAttributes​(Tsml tsml)
        Exports all standard attributes: None. If some subclass has attributes, this method needs to be overruled by it.
        Returns:
      • importElements

        protected boolean importElements​(org.xmlpull.v1.XmlPullParser xpp,
                                         Tsml tsml)
        Imports all standard child elements: None. If some subclass has child elements, this method needs to be overruled by it.
        Parameters:
        xpp -
        tsml -
        Returns:
      • exportElements

        protected java.lang.String exportElements​(Tsml tsml)
        Exports all standard elements: None. If some subclass has child elements, this method needs to be overruled by it.
        Returns:
      • importText

        protected void importText​(java.lang.String text,
                                  Tsml tsml)
        Imports standard text: No action. If some subclass needs to import text, this method needs to be overruled by it.
        Parameters:
        text -
        tsml -
      • exportAttribute

        protected java.lang.String exportAttribute​(java.lang.String tag,
                                                   java.lang.String value,
                                                   Tsml tsml)
        Default way to export some attribute.
        Parameters:
        tag - The attribute tag.
        value - The attribute value.
        Returns:
      • checkValidity

        protected void checkValidity​(Tsml tsml)
        Default check for validity: No action. If some subclass needs to check validity, this method needs to be overruled by it.
        Parameters:
        tsml -