de.fu_berlin.ties.xml
Class OtherConstituent

java.lang.Object
  extended byde.fu_berlin.ties.util.ListEntry
      extended byde.fu_berlin.ties.xml.XMLConstituent
          extended byde.fu_berlin.ties.xml.OtherConstituent

public class OtherConstituent
extends XMLConstituent

A constituent in an XML document that is not a tag. An instance of this class represents a document or markup declaration, XML prolog, processing instruction, comment, CDATA section, textual content or outer whitespace.

Version:
$Revision: 1.1 $, $Date: 2004/02/02 18:50:16 $, $Author: siefkes $
Author:
Christian Siefkes

Field Summary
static short CDATA_SECTION
          Type constant: a CDATA section.
static short COMMENT
          Type constant: a comment.
static short DOCTYPE
          Type constant: a document type declaration.
static short OUTER_WHITESPACE
          Type constant: Whitespace between elements.
static short PI
          Type constant: a processing instruction.
static short TEXT
          Type constant: textual content.
static short XML_PROLOG
          Type constant: the XML prolog.
 
Constructor Summary
OtherConstituent(short constType, String rep)
          Creates a new instance, without setting a reference to a next constituent.
OtherConstituent(short constType, String rep, XMLConstituent prevEntry, XMLConstituent nextEntry)
          Creates a new instance.
 
Method Summary
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class de.fu_berlin.ties.xml.XMLConstituent
getRepresentantion, getType, nextConstituent, previousConstituent, setRepresentantion
 
Methods inherited from class de.fu_berlin.ties.util.ListEntry
hasNext, hasPrevious, insertAfter, insertBefore, next, previous, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DOCTYPE

public static final short DOCTYPE
Type constant: a document type declaration.

See Also:
Constant Field Values

XML_PROLOG

public static final short XML_PROLOG
Type constant: the XML prolog.

See Also:
Constant Field Values

PI

public static final short PI
Type constant: a processing instruction.

See Also:
Constant Field Values

COMMENT

public static final short COMMENT
Type constant: a comment.

See Also:
Constant Field Values

CDATA_SECTION

public static final short CDATA_SECTION
Type constant: a CDATA section.

See Also:
Constant Field Values

TEXT

public static final short TEXT
Type constant: textual content. Textual content is trimmed, preceding and trailing whitespace are stored as OUTER_WHITESPACE constituents.

See Also:
Constant Field Values

OUTER_WHITESPACE

public static final short OUTER_WHITESPACE
Type constant: Whitespace between elements.

See Also:
Constant Field Values
Constructor Detail

OtherConstituent

public OtherConstituent(short constType,
                        String rep)
                 throws IllegalArgumentException
Creates a new instance, without setting a reference to a next constituent.

Parameters:
constType - the typ of this constituent (must be one of the static type constants defined in this class)
rep - the representation of this constituent within the XML document, i.e. the string fragment from the document representing this constituent
Throws:
IllegalArgumentException - if constType differs from the static type constants defined in this class

OtherConstituent

public OtherConstituent(short constType,
                        String rep,
                        XMLConstituent prevEntry,
                        XMLConstituent nextEntry)
                 throws IllegalArgumentException
Creates a new instance.

Parameters:
constType - the typ of this constituent (must be one of the static type constants defined in this class)
rep - the representation of this constituent within the XML document, i.e. the string fragment from the document representing this constituent
prevEntry - a reference to the next constituent
nextEntry - a reference to the next constituent
Throws:
IllegalArgumentException - if constType differs from the static type constants defined in this class
Method Detail

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class XMLConstituent
Returns:
a textual representation


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.