de.fu_berlin.ties.xml
Class UnprocessedTags

java.lang.Object
  extended by de.fu_berlin.ties.xml.TagContainer
      extended by de.fu_berlin.ties.xml.UnprocessedTags

public class UnprocessedTags
extends TagContainer

A container that keeps track of unprocessed start and end tags during XML adjustment.

Version:
$Revision: 1.2 $, $Date: 2004/05/03 09:21:38 $, $Author: siefkes $
Author:
Christian Siefkes

Constructor Summary
UnprocessedTags()
          Creates a new instance.
 
Method Summary
 int endTagCount(String tagName)
          Returns the number of end tags with the specified name contained in this container.
 void push(TagConstituent tag, boolean appendAtEnd)
          Inserts an appearance of a tag into the container.
 boolean remove(TagConstituent tag)
          Removes a single appearance of a tag from the container.
 int startTagCount(String tagName)
          Returns the number of start tags with the specified name contained in this container.
 
Methods inherited from class de.fu_berlin.ties.xml.TagContainer
contains, findFirst, findInSeries, forceRemove, getTagMap, isEmpty, push, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnprocessedTags

public UnprocessedTags()
Creates a new instance.

Method Detail

endTagCount

public int endTagCount(String tagName)
Returns the number of end tags with the specified name contained in this container.

Parameters:
tagName - the name of the tags to count
Returns:
the number of matching end tags contained (0 or more)

push

public void push(TagConstituent tag,
                 boolean appendAtEnd)
          throws IllegalArgumentException
Inserts an appearance of a tag into the container. The name of the tag is used as key; the whole constituent is inserted in the list of appearances stored for this tag name. Instances of this class accept only start and end tags.

Overrides:
push in class TagContainer
Parameters:
tag - the tag to insert
appendAtEnd - whether to insert the tag at the end or at the begin of appearances within a series
Throws:
IllegalArgumentException - if the specified tag is not a start or end tag

remove

public boolean remove(TagConstituent tag)
Removes a single appearance of a tag from the container.

Overrides:
remove in class TagContainer
Parameters:
tag - the tag to remove
Returns:
true if the specified TagConstituent was removed successfully; false otherwise (the specified constituent wasn't found in the container)

startTagCount

public int startTagCount(String tagName)
Returns the number of start tags with the specified name contained in this container.

Parameters:
tagName - the name of the tags to count
Returns:
the number of matching start tags contained (0 or more)


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