Class Architecture

  • All Implemented Interfaces:
    HasText, java.io.Serializable

    public class Architecture
    extends Invocation
    implements HasText
    This class is transient for XML parsing. The data value will be incorporated into the job classes.
    Version:
    $Revision$
    Author:
    Jens-S. Vöckler, Yong Zhao
    See Also:
    StatCall, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String m_archmode
      Describes the architecture runtime mode.
      private java.lang.String m_domainname
      Contains the optional domain name on the network.
      private java.lang.String m_machine
      Contains the machine's hardware description.
      private java.lang.String m_nodename
      Describes the machine's network node hostname.
      private java.lang.String m_release
      Contains the operating system's version string.
      private java.lang.String m_sysname
      Describes the operating system name.
      private java.lang.StringBuffer m_value
      This is the data contained between the tags.
    • Constructor Summary

      Constructors 
      Constructor Description
      Architecture()
      Default c'tor: Construct a hollow shell and allow further information to be added later.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendValue​(java.lang.String fragment)
      Appends a piece of text to the existing text.
      java.lang.String getArchMode()
      Accessor
      java.lang.String getDomainName()
      Accessor
      java.lang.String getMachine()
      Accessor
      java.lang.String getNodeName()
      Accessor
      java.lang.String getRelease()
      Accessor
      java.lang.String getSystemName()
      Accessor
      java.lang.String getValue()
      Accessor
      private java.lang.String myquote​(java.lang.String s)
      Quotes an input string for XML attributes while converting nulls.
      void normalize()
      Normalizes a misconfigured nodename that contains a domainname.
      void setArchMode​(java.lang.String archmode)
      Accessor.
      void setDomainName​(java.lang.String domainname)
      Accessor.
      void setMachine​(java.lang.String machine)
      Accessor.
      void setNodeName​(java.lang.String nodename)
      Accessor.
      void setRelease​(java.lang.String release)
      Accessor.
      void setSystemName​(java.lang.String sysname)
      Accessor.
      void setValue​(java.lang.String value)
      Accessor.
      void toString​(java.io.Writer stream)
      Converts the active state into something meant for human consumption.
      void toXML​(java.io.Writer stream, java.lang.String indent, java.lang.String namespace)
      Dump the state of the current element as XML output.
      • Methods inherited from class org.griphyn.vdl.Chimera

        escape, quote, toString, toXML, toXML, writeAttribute
      • Methods inherited from class java.lang.Object

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

      • m_value

        private java.lang.StringBuffer m_value
        This is the data contained between the tags. A null value is not valid.
      • m_archmode

        private java.lang.String m_archmode
        Describes the architecture runtime mode. For instance, on a SPARC can run in ILP32 or LP64 mode, an IA64 may have a backward-compatible 32bit mode (IA32), etc.
      • m_sysname

        private java.lang.String m_sysname
        Describes the operating system name. For instance: linux, sunos, ...
      • m_nodename

        private java.lang.String m_nodename
        Describes the machine's network node hostname. Note that incorrect host setup may include the domainname into this.
      • m_release

        private java.lang.String m_release
        Contains the operating system's version string.
      • m_machine

        private java.lang.String m_machine
        Contains the machine's hardware description. For instance: i686, sun4u, ...
      • m_domainname

        private java.lang.String m_domainname
        Contains the optional domain name on the network. Note that incorrect setup of the host name may contain the domain portion there.
    • Constructor Detail

      • Architecture

        public Architecture()
        Default c'tor: Construct a hollow shell and allow further information to be added later.
    • Method Detail

      • appendValue

        public void appendValue​(java.lang.String fragment)
        Appends a piece of text to the existing text.
        Specified by:
        appendValue in interface HasText
        Parameters:
        fragment - is a piece of text to append to existing text. Appending null is a noop.
      • setArchMode

        public void setArchMode​(java.lang.String archmode)
        Accessor.
        Parameters:
        archmode -
        See Also:
        getArchMode()
      • setValue

        public void setValue​(java.lang.String value)
        Accessor.
        Specified by:
        setValue in interface HasText
        Parameters:
        value - is the new value to set.
        See Also:
        getValue()
      • setSystemName

        public void setSystemName​(java.lang.String sysname)
        Accessor.
        Parameters:
        sysname -
        See Also:
        getSystemName()
      • setNodeName

        public void setNodeName​(java.lang.String nodename)
        Accessor.
        Parameters:
        nodename -
        See Also:
        getNodeName()
      • setRelease

        public void setRelease​(java.lang.String release)
        Accessor.
        Parameters:
        release -
        See Also:
        getRelease()
      • setDomainName

        public void setDomainName​(java.lang.String domainname)
        Accessor.
        Parameters:
        domainname -
        See Also:
        getDomainName()
      • setMachine

        public void setMachine​(java.lang.String machine)
        Accessor.
        Parameters:
        machine -
        See Also:
        getMachine()
      • normalize

        public void normalize()
        Normalizes a misconfigured nodename that contains a domainname.
      • toString

        public void toString​(java.io.Writer stream)
                      throws java.io.IOException
        Converts the active state into something meant for human consumption. The method will be called when recursively traversing the instance tree.
        Specified by:
        toString in class org.griphyn.vdl.Chimera
        Parameters:
        stream - is a stream opened and ready for writing. This can also be a string stream for efficient output.
        Throws:
        java.io.IOException - if something fishy happens to the stream.
      • myquote

        private java.lang.String myquote​(java.lang.String s)
        Quotes an input string for XML attributes while converting nulls.
        Parameters:
        s - is the attribute string, may be null
        Returns:
        the XML-quoted string, or an empty-but-not-null string.
      • toXML

        public void toXML​(java.io.Writer stream,
                          java.lang.String indent,
                          java.lang.String namespace)
                   throws java.io.IOException
        Dump the state of the current element as XML output. This function traverses all sibling classes as necessary, and converts the data into pretty-printed XML output. The stream interface should be able to handle large output efficiently.
        Specified by:
        toXML in class org.griphyn.vdl.Chimera
        Parameters:
        stream - is a stream opened and ready for writing. This can also be a string stream for efficient output.
        indent - is a String of spaces used for pretty printing. The initial amount of spaces should be an empty string. The parameter is used internally for the recursive traversal. If a null value is specified, no indentation nor linefeeds will be generated.
        namespace - is the XML schema namespace prefix. If neither empty nor null, each element will be prefixed with this prefix, and the root element will map the XML namespace.
        Throws:
        java.io.IOException - if something fishy happens to the stream.
        See Also:
        BufferedWriter