public class Header extends Object implements Serializable, Cloneable, Documentable
Constructor and Description |
---|
Header()
Create a new, blank header.
|
Header(Node node)
Create a header from a DOM node.
|
Header(String name)
Create a header.
|
Header(String name,
String type,
String unit)
Create a fully specified header.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
static List |
createHeaders(Node root)
Create a list of headers from an XML document.
|
boolean |
equals(Object rhs) |
String |
getName()
Get the name.
|
String |
getType()
Get the type of this result.
|
String |
getUnit()
Get the unit.
|
int |
hashCode() |
void |
setName(String name)
Set the name.
|
void |
setType(String type)
Set the type of this result.
|
void |
setUnit(String unit)
Set the unit.
|
String |
toString() |
Node |
toXML(Document doc)
Document (aka serialize) this object into an XML DOM node.
|
public Header()
public Header(String name)
name
- Name of this header.public Header(String name, String type, String unit)
name
- Name of this header.type
- Data type.unit
- Units.public Header(Node node)
node
- The DOM node, which must be a <headerElement> element.public static List createHeaders(Node root)
root
- A <resultHeader> element.Header
s.public String getName()
public String getType()
public String getUnit()
public void setName(String name)
name
- The name of the header, suitable for printing in a column heading.public void setType(String type)
type
- The type, as in data type.public void setUnit(String unit)
unit
- The units in which the header is presented.public Node toXML(Document doc) throws DOMException
Documentable
toXML
in interface Documentable
doc
- What document will own the node.DOMException
- If an error occurs while creating the DOM structure.Copyright © 1999–2017 Apache OODT. All rights reserved.