|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxml.DOMEnlarge
public class DOMEnlarge
This class enlarges an input-dom by inserting or deleting attributes, elements, comments, or text nodes. It does that in several layers.
TYPES.
| Nested Class Summary | |
|---|---|
static class |
DOMEnlarge.AddAbort
A class to add an abort section to the exception element. |
static class |
DOMEnlarge.AddAbstract
A class to add the abstract section |
static class |
DOMEnlarge.AddEmail
A class to add a e-mail section to all targets. |
static class |
DOMEnlarge.AddExposure
A class to add a exposure setup to all targets. |
static class |
DOMEnlarge.AddExposureBuffer
A class to add a buffer to the exposure time. |
static class |
DOMEnlarge.AddFile
A class to add the file name to the dom. |
static class |
DOMEnlarge.AddFitsHeader
A class to add fits-header information to the target files. |
static class |
DOMEnlarge.AddFitsName
A class to add fits file names to the targets. |
static class |
DOMEnlarge.AddFocus
A class to add a focus setup to all targets. |
static class |
DOMEnlarge.AddGeometry
A class to add a geometry setup to all targets. |
static class |
DOMEnlarge.AddMinimumHeight
A class to add a minimum height to all targets. |
static class |
DOMEnlarge.AddSolConstraint
A class to add fits file names to the targets. |
static class |
DOMEnlarge.AddTwoExposures
A class to add a double exposure setup to all targets. |
| Field Summary | |
|---|---|
private static Document |
dom
The dom that should be expanded. |
static String[] |
TYPES
The allowed types of nodes that are created. |
| Constructor Summary | |
|---|---|
protected |
DOMEnlarge()
Constructs a new dom-enlarge object. |
| Method Summary | |
|---|---|
static Node |
createNode(String type,
String data)
Creates one of the node allowed. |
static Node |
fillNode(Node target,
String value)
Fills the node with the specified value. |
static Document |
fromFile(File xml)
For convenience, a method for loading and parsing an xml-file to a DOM is given. |
static Document |
getDom()
Returns the static dom. |
static Object |
hasSimilar(Element root,
Node check)
Checks if the given element has a node linked to it that is similar to the argument node. |
static Node |
insertNode(Node root,
Node what,
Node before)
Inserts the target node to the given node, before the stated next child. |
static Element |
scanForElement(Element root,
String tag,
Object index)
Scans for elements of the given tag name. |
static void |
setDom(Document source)
Sets the source dom. |
static void |
toFile(Document source,
File target)
For convenience, writes the dom to an xml-file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String[] TYPES
private static Document dom
| Constructor Detail |
|---|
protected DOMEnlarge()
setDom(org.w3c.dom.Document).
| Method Detail |
|---|
public static void setDom(Document source)
public static Node createNode(String type,
String data)
TYPES gives a list of names
understood by this method. All created nodes are loaded with the data
transferred. For element nodes this is the tag-name, for attributes
it is the name of the attribute, otherwise it is the
value of the node itself.
public static Node fillNode(Node target,
String value)
public static Element scanForElement(Element root,
String tag,
Object index)
public static Object hasSimilar(Element root,
Node check)
public static Node insertNode(Node root,
Node what,
Node before)
what - If attribute, set as attribute to rootbefore - If null, append to children list of root.
public static Document getDom()
public static Document fromFile(File xml)
public static void toFile(Document source,
File target)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||