001: /*
002: * This file or a portion of this file is licensed under the terms of
003: * the Globus Toolkit Public License, found in file GTPL, or at
004: * http://www.globus.org/toolkit/download/license.html. This notice must
005: * appear in redistributions of this file, with or without modification.
006: *
007: * Redistributions of this Software, with or without modification, must
008: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
009: * some other similar material which is provided with the Software (if
010: * any).
011: *
012: * Copyright 1999-2004 University of Chicago and The University of
013: * Southern California. All rights reserved.
014: */
015: package org.griphyn.vdl.invocation;
016:
017: import java.util.*;
018: import java.io.Writer;
019: import java.io.IOException;
020:
021: /**
022: * This class is transient for XML parsing. It does not store
023: * anything, just goes through the motions to satisfy the API.
024: *
025: * @author Jens-S. Vöckler
026: * @author Yong Zhao
027: * @version $Revision: 50 $
028: * @see StatCall
029: */
030: public class Ignore extends Invocation implements HasText {
031: /**
032: * Default c'tor.
033: */
034: public Ignore() {
035: // empty
036: }
037:
038: /**
039: * Constructs a piece of data.
040: * @param value is the data to remember. The string may be empty,
041: * but it must not be <code>null</code>.
042: * @exception NullPointerException if the argument was null.
043: */
044: public Ignore(String value) {
045: // ignore
046: }
047:
048: /**
049: * Appends a piece of text to the existing text.
050: * @param fragment is a piece of text to append to existing text.
051: * Appending <code>null</code> is a noop.
052: */
053: public void appendValue(String fragment) {
054: // ignore
055: }
056:
057: /**
058: * Accessor
059: *
060: * @see #setValue(String)
061: */
062: public String getValue() {
063: return "";
064: }
065:
066: /**
067: * Accessor.
068: *
069: * @param value is the new value to set.
070: * @see #getValue()
071: */
072: public void setValue(String value) {
073: // ignore
074: }
075:
076: /**
077: * Converts the active state into something meant for human consumption.
078: * The method will be called when recursively traversing the instance
079: * tree.
080: *
081: * @param stream is a stream opened and ready for writing. This can also
082: * be a string stream for efficient output.
083: */
084: public void toString(Writer stream) throws IOException {
085: throw new IOException(
086: "method not implemented, please contact vds-support@griphyn.org");
087: }
088:
089: /**
090: * Dump the state of the current element as XML output. This function
091: * traverses all sibling classes as necessary, and converts the data
092: * into pretty-printed XML output. The stream interface should be able
093: * to handle large output efficiently.
094: *
095: * @param stream is a stream opened and ready for writing. This can also
096: * be a string stream for efficient output.
097: * @param indent is a <code>String</code> of spaces used for pretty
098: * printing. The initial amount of spaces should be an empty string.
099: * The parameter is used internally for the recursive traversal.
100: * If a <code>null</code> value is specified, no indentation nor
101: * linefeeds will be generated.
102: * @param namespace is the XML schema namespace prefix. If neither
103: * empty nor null, each element will be prefixed with this prefix,
104: * and the root element will map the XML namespace.
105: * @exception IOException if something fishy happens to the stream.
106: */
107: public void toXML(Writer stream, String indent, String namespace)
108: throws IOException {
109: throw new IOException(
110: "method not implemented, please contact vds-support@griphyn.org");
111: }
112: }
|