test
Class DocumentSummary

java.lang.Object
  extended bytest.DocumentSummary

public class DocumentSummary
extends java.lang.Object

Document summary information. This includes several count values characteristic of a document, allowing simple consistency checks across different representations of the document.

Version:
1.1
Author:
Dennis M. Sosnoski

Constructor Summary
DocumentSummary()
           
 
Method Summary
 void addAttribute(int length)
          Count attribute.
 void addComment(int length)
          Count comment text characters.
 void addContent(int length)
          Count content text segment.
 void addElements(int count)
          Add to element count.
 boolean dataEquals(java.lang.Object obj)
          Check if data and structure is equal to this one.
 boolean equals(java.lang.Object obj)
          Check if object is equal to this one.
 int getAttrCharCount()
          Get attribute value character count.
 int getAttributeCount()
          Get attribute count.
 int getCommentCharCount()
          Get comment text character count.
 int getContentCount()
          Get content segment count.
 int getElementCount()
          Get element count.
 int getTextCharCount()
          Get text content character count.
 void reset()
          Reset count values.
 boolean structureEquals(java.lang.Object obj)
          Check if object structure is equal to this one.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentSummary

public DocumentSummary()
Method Detail

reset

public void reset()
Reset count values.


getElementCount

public int getElementCount()
Get element count.

Returns:
number of elements

getContentCount

public int getContentCount()
Get content segment count.

Returns:
number of content segments

getAttributeCount

public int getAttributeCount()
Get attribute count.

Returns:
number of attributes

getTextCharCount

public int getTextCharCount()
Get text content character count.

Returns:
number of text characters

getAttrCharCount

public int getAttrCharCount()
Get attribute value character count.

Returns:
number of attribute value characters

getCommentCharCount

public int getCommentCharCount()
Get comment text character count.

Returns:
number of comment text characters

addElements

public void addElements(int count)
Add to element count.

Parameters:
count - value to be added to element count

addAttribute

public void addAttribute(int length)
Count attribute. Increments the attribute count by one and adds the supplied character count to the attribute data length.

Parameters:
length - attribute value text length

addContent

public void addContent(int length)
Count content text segment. Increments the content segment count by one and adds the supplied character count to the content text length.

Parameters:
length - attribute value text length

addComment

public void addComment(int length)
Count comment text characters. Just adds the character count to the total accumulation.

Parameters:
length - comment text length

equals

public boolean equals(java.lang.Object obj)
Check if object is equal to this one.

Parameters:
obj - object to be compared
Returns:
true if the values match, false if not

dataEquals

public boolean dataEquals(java.lang.Object obj)
Check if data and structure is equal to this one. This comparison ignores the text content segment count, since that can be changed by output formatting.

Parameters:
obj - object to be compared
Returns:
true if the values match, false if not

structureEquals

public boolean structureEquals(java.lang.Object obj)
Check if object structure is equal to this one. This comparison ignores the text content segment count and total character length, since that can be changed by output formatting.

Parameters:
obj - object to be compared
Returns:
true if the values match, false if not


Company Web Site

XML Binary Information Set Home