org.griphyn.vdl.invocation
Class Architecture

java.lang.Object
  extended by org.griphyn.vdl.Chimera
      extended by org.griphyn.vdl.invocation.Invocation
          extended by org.griphyn.vdl.invocation.Architecture
All Implemented Interfaces:
Serializable, HasText

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: 50 $
Author:
Jens-S. V??ckler, Yong Zhao
See Also:
StatCall, Serialized Form

Field Summary
private  String m_archmode
          Describes the architecture runtime mode.
private  String m_domainname
          Contains the optional domain name on the network.
private  String m_machine
          Contains the machine's hardware description.
private  String m_nodename
          Describes the machine's network node hostname.
private  String m_release
          Contains the operating system's version string.
private  String m_sysname
          Describes the operating system name.
private  StringBuffer m_value
          This is the data contained between the tags.
 
Constructor Summary
Architecture()
          Default c'tor: Construct a hollow shell and allow further information to be added later.
 
Method Summary
 void appendValue(String fragment)
          Appends a piece of text to the existing text.
 String getArchMode()
          Accessor
 String getDomainName()
          Accessor
 String getMachine()
          Accessor
 String getNodeName()
          Accessor
 String getRelease()
          Accessor
 String getSystemName()
          Accessor
 String getValue()
          Accessor
private  String myquote(String s)
          Quotes an input string for XML attributes while converting nulls.
 void normalize()
          Normalizes a misconfigured nodename that contains a domainname.
 void setArchMode(String archmode)
          Accessor.
 void setDomainName(String domainname)
          Accessor.
 void setMachine(String machine)
          Accessor.
 void setNodeName(String nodename)
          Accessor.
 void setRelease(String release)
          Accessor.
 void setSystemName(String sysname)
          Accessor.
 void setValue(String value)
          Accessor.
 void toString(Writer stream)
          Converts the active state into something meant for human consumption.
 void toXML(Writer stream, String indent, 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 StringBuffer m_value
This is the data contained between the tags. A null value is not valid.


m_archmode

private 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 String m_sysname
Describes the operating system name. For instance: linux, sunos, ...


m_nodename

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


m_release

private String m_release
Contains the operating system's version string.


m_machine

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


m_domainname

private 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(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.

getArchMode

public String getArchMode()
Accessor

See Also:
setArchMode(String)

setArchMode

public void setArchMode(String archmode)
Accessor.

Parameters:
archmode -
See Also:
getArchMode()

getValue

public String getValue()
Accessor

Specified by:
getValue in interface HasText
See Also:
setValue(String)

setValue

public void setValue(String value)
Accessor.

Specified by:
setValue in interface HasText
Parameters:
value - is the new value to set.
See Also:
getValue()

getSystemName

public String getSystemName()
Accessor

See Also:
setSystemName(String)

setSystemName

public void setSystemName(String sysname)
Accessor.

Parameters:
sysname -
See Also:
getSystemName()

getNodeName

public String getNodeName()
Accessor

See Also:
setNodeName(String)

setNodeName

public void setNodeName(String nodename)
Accessor.

Parameters:
nodename -
See Also:
getNodeName()

getRelease

public String getRelease()
Accessor

See Also:
setRelease(String)

setRelease

public void setRelease(String release)
Accessor.

Parameters:
release -
See Also:
getRelease()

getDomainName

public String getDomainName()
Accessor

See Also:
setDomainName(String)

setDomainName

public void setDomainName(String domainname)
Accessor.

Parameters:
domainname -
See Also:
getDomainName()

getMachine

public String getMachine()
Accessor

See Also:
setMachine(String)

setMachine

public void setMachine(String machine)
Accessor.

Parameters:
machine -
See Also:
getMachine()

normalize

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


toString

public void toString(Writer stream)
              throws 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 Chimera
Parameters:
stream - is a stream opened and ready for writing. This can also be a string stream for efficient output.
Throws:
IOException - if something fishy happens to the stream.

myquote

private String myquote(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(Writer stream,
                  String indent,
                  String namespace)
           throws 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 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:
IOException - if something fishy happens to the stream.
See Also:
BufferedWriter


Copyright © 2007 The University of Southern California. All Rights Reserved.