|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
simulations.xml.DocumentTracer
public class DocumentTracer
Provides a complete trace of SAX2 events for files parsed. This is useful for making sure that a SAX parser implementation faithfully communicates all information in the document to the SAX handlers.
Field Summary | |
---|---|
protected static boolean |
DEFAULT_NAMESPACES
Default namespaces support (true). |
protected static java.lang.String |
DEFAULT_PARSER_NAME
Default parser name. |
protected static boolean |
DEFAULT_SCHEMA_FULL_CHECKING
Default Schema full checking support (false). |
protected static boolean |
DEFAULT_SCHEMA_VALIDATION
Default Schema validation support (false). |
protected static boolean |
DEFAULT_VALIDATION
Default validation support (false). |
protected int |
fIndent
Indent level. |
protected java.io.PrintWriter |
fOut
Print writer. |
protected static java.lang.String |
LEXICAL_HANDLER_PROPERTY_ID
Lexical handler property id (http://xml.org/sax/properties/lexical-handler). |
protected static java.lang.String |
NAMESPACES_FEATURE_ID
Namespaces feature id (http://xml.org/sax/features/namespaces). |
protected static java.lang.String |
SCHEMA_FULL_CHECKING_FEATURE_ID
Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). |
protected static java.lang.String |
SCHEMA_VALIDATION_FEATURE_ID
Schema validation feature id (http://apache.org/xml/features/validation/schema). |
protected static java.lang.String |
VALIDATION_FEATURE_ID
Validation feature id (http://xml.org/sax/features/validation). |
Constructor Summary | |
---|---|
DocumentTracer(java.lang.String file)
Default constructor. |
Method Summary | |
---|---|
void |
attributeDecl(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String type,
java.lang.String valueDefault,
java.lang.String value)
Attribute declaration. |
void |
characters(char[] ch,
int offset,
int length)
Characters. |
void |
comment(char[] ch,
int offset,
int length)
Comment. |
void |
elementDecl(java.lang.String name,
java.lang.String contentModel)
Element declaration. |
void |
endCDATA()
End CDATA section. |
void |
endDocument()
End document. |
void |
endDTD()
End DTD. |
void |
endElement(java.lang.String name)
End element. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname)
End element. |
void |
endEntity(java.lang.String name)
End entity. |
void |
endPrefixMapping(java.lang.String prefix)
End prefix mapping. |
void |
error(org.xml.sax.SAXParseException ex)
Error. |
void |
externalEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
External entity declaration. |
void |
fatalError(org.xml.sax.SAXParseException ex)
Fatal error. |
int |
getCoalitionDefinition()
Getter for property coalitionDefinition. |
float |
getCoalitionPoints()
Getter for property coalitionPoints. |
java.io.File |
getGraphFile()
Getter for property graphFile. |
java.io.File |
getHistoryFile()
Getter for property historyFile. |
int |
getLoosingPoints()
Getter for property loosingPoints. |
java.util.ArrayList |
getPlayerList()
Getter for property playerList. |
int |
getSeed()
Getter for property seed. |
int |
getTraceLevel()
Getter for property trace_level. |
float |
getWinnerPoints()
Getter for property winnerPoints. |
void |
ignorableWhitespace(char[] ch,
int offset,
int length)
Ignorable whitespace. |
void |
init()
Main. |
void |
internalEntityDecl(java.lang.String name,
java.lang.String text)
Internal entity declaration. |
boolean |
isProportional()
Getter for property proportional. |
protected char |
normalizeAndPrint(char c)
Normalize and print. |
void |
notationDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Notation declaration. |
protected void |
printError(java.lang.String type,
org.xml.sax.SAXParseException ex)
Prints the error message. |
protected void |
printIndent()
Prints the indent. |
protected void |
printQuotedString(char[] ch,
int offset,
int length)
Print quoted string. |
protected java.lang.String |
printQuotedString(java.lang.String s)
Print quoted string. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Processing instruction. |
void |
setCoalitionDefinition(int coalitionDefinition)
Setter for property coalitionDefinition. |
void |
setCoalitionPoints(float coalitionPoints)
Setter for property coalitionPoints. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Set document locator. |
void |
setGraphFile(java.io.File graphFile)
Setter for property graphFile. |
void |
setHistoryFile(java.io.File historyFile)
Setter for property historyFile. |
void |
setLoosingPoints(int loosingPoints)
Setter for property loosingPoints. |
void |
setOutput(java.io.OutputStream stream,
java.lang.String encoding)
Sets the output stream for printing. |
void |
setOutput(java.io.Writer writer)
Sets the output writer. |
void |
setPlayerList(java.util.ArrayList playerList)
Setter for property playerList. |
void |
setProportional(boolean proportional)
Setter for property proportional. |
void |
setSeed(int seed)
Setter for property seed. |
void |
setTraceLevel(int traceLevel)
Setter for property trace_level. |
void |
setWinnerPoints(float winnerPoints)
Setter for property winnerPoints. |
void |
skippedEntity(java.lang.String name)
Skipped entity. |
void |
startCDATA()
Start CDATA section. |
void |
startDocument()
Start document. |
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Start DTD. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qname,
org.xml.sax.Attributes attributes)
Start element. |
void |
startEntity(java.lang.String name)
Start entity. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Start prefix mapping. |
void |
unparsedEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String notationName)
Unparsed entity declaration. |
void |
warning(org.xml.sax.SAXParseException ex)
Warning. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
resolveEntity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String NAMESPACES_FEATURE_ID
protected static final java.lang.String VALIDATION_FEATURE_ID
protected static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID
protected static final java.lang.String SCHEMA_FULL_CHECKING_FEATURE_ID
protected static final java.lang.String LEXICAL_HANDLER_PROPERTY_ID
protected static final java.lang.String DEFAULT_PARSER_NAME
protected static final boolean DEFAULT_NAMESPACES
protected static final boolean DEFAULT_VALIDATION
protected static final boolean DEFAULT_SCHEMA_VALIDATION
protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING
protected java.io.PrintWriter fOut
protected int fIndent
Constructor Detail |
---|
public DocumentTracer(java.lang.String file)
file
- The XML FileMethod Detail |
---|
public void setOutput(java.io.OutputStream stream, java.lang.String encoding) throws java.io.UnsupportedEncodingException
stream
- The streamencoding
- The encoding
java.io.UnsupportedEncodingException
- throws if the encoding isn't supportedpublic void setOutput(java.io.Writer writer)
writer
- The writerpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
setDocumentLocator
in class org.xml.sax.helpers.DefaultHandler
locator
- The locatorpublic void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
- throws SAXException in case of problempublic void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in class org.xml.sax.helpers.DefaultHandler
target
- The targetdata
- The data
org.xml.sax.SAXException
- throws SAXException in case of problempublic void characters(char[] ch, int offset, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
ch
- the charsoffset
- the offsetlength
- the length
org.xml.sax.SAXException
- throws SAXException in case of problempublic void ignorableWhitespace(char[] ch, int offset, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
ch
- The charsoffset
- the offsetlength
- the length
org.xml.sax.SAXException
- Exception returns in case of problempublic void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
- throws SAXException in case of problempublic void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
startPrefixMapping
in class org.xml.sax.helpers.DefaultHandler
prefix
- the prefixuri
- the URi
org.xml.sax.SAXException
- throws SAXException in case of problempublic void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qname, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
uri
- The URilocalName
- The local nameqname
- the qnameattributes
- The attributes
org.xml.sax.SAXException
- throws SAXException in case of problempublic void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qname) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
uri
- The URIlocalName
- the local nameqname
- The qname
org.xml.sax.SAXException
- throws SAXException in case of problempublic void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
endPrefixMapping
in interface org.xml.sax.ContentHandler
endPrefixMapping
in class org.xml.sax.helpers.DefaultHandler
prefix
- The prefix
org.xml.sax.SAXException
- throws SAXException in case of problempublic void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
skippedEntity
in class org.xml.sax.helpers.DefaultHandler
name
- The name
org.xml.sax.SAXException
- throws SAXException in case of problempublic void endElement(java.lang.String name) throws org.xml.sax.SAXException
name
- The name
org.xml.sax.SAXException
- throws SAXException in case of problempublic void notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
notationDecl
in interface org.xml.sax.DTDHandler
notationDecl
in class org.xml.sax.helpers.DefaultHandler
name
- The namepublicId
- The public IdsystemId
- The system Id
org.xml.sax.SAXException
- throws SAXException in case of problempublic void unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName) throws org.xml.sax.SAXException
unparsedEntityDecl
in interface org.xml.sax.DTDHandler
unparsedEntityDecl
in class org.xml.sax.helpers.DefaultHandler
name
- The namepublicId
- The public IDsystemId
- The system IDnotationName
- The notation name
org.xml.sax.SAXException
- throws SAXException in case of problempublic void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
startDTD
in interface org.xml.sax.ext.LexicalHandler
name
- The namepublicId
- The public IDsystemId
- The System ID
org.xml.sax.SAXException
- throws SAXException in case of problempublic void startEntity(java.lang.String name) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
name
- The name
org.xml.sax.SAXException
- throws SAXException in case of problempublic void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
- throws SAXException in case of problempublic void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
- throws SAXException in case of problempublic void comment(char[] ch, int offset, int length) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
ch
- The charsoffset
- The offsetlength
- The length
org.xml.sax.SAXException
- throws SAXException in case of problempublic void endEntity(java.lang.String name) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
name
- The name
org.xml.sax.SAXException
- throws SAXException in case of problempublic void endDTD() throws org.xml.sax.SAXException
endDTD
in interface org.xml.sax.ext.LexicalHandler
org.xml.sax.SAXException
- throws SAXException in case of problempublic void elementDecl(java.lang.String name, java.lang.String contentModel) throws org.xml.sax.SAXException
elementDecl
in interface org.xml.sax.ext.DeclHandler
name
- The namecontentModel
- The content model
org.xml.sax.SAXException
- throws SAXException in case of problempublic void attributeDecl(java.lang.String elementName, java.lang.String attributeName, java.lang.String type, java.lang.String valueDefault, java.lang.String value) throws org.xml.sax.SAXException
attributeDecl
in interface org.xml.sax.ext.DeclHandler
elementName
- The element nameattributeName
- The attribute nametype
- The typevalueDefault
- The default valuevalue
- the value
org.xml.sax.SAXException
- throws SAXException in case of problempublic void internalEntityDecl(java.lang.String name, java.lang.String text) throws org.xml.sax.SAXException
internalEntityDecl
in interface org.xml.sax.ext.DeclHandler
name
- The nametext
- The text
org.xml.sax.SAXException
- throws SAXException in case of problempublic void externalEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
externalEntityDecl
in interface org.xml.sax.ext.DeclHandler
name
- The namepublicId
- The public IDsystemId
- The system ID
org.xml.sax.SAXException
- throws SAXException in case of problempublic void warning(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
warning
in class org.xml.sax.helpers.DefaultHandler
ex
- The exception
org.xml.sax.SAXException
- throws SAXException in case of problempublic void error(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
ex
- The exception
org.xml.sax.SAXException
- throws SAXException in case of problempublic void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
fatalError
in class org.xml.sax.helpers.DefaultHandler
ex
- The exception
org.xml.sax.SAXException
- throws SAXException in case of problemprotected java.lang.String printQuotedString(java.lang.String s)
s
- The string
protected void printQuotedString(char[] ch, int offset, int length)
ch
- The charsoffset
- The offsetlength
- The lengthprotected char normalizeAndPrint(char c)
c
- The char
protected void printError(java.lang.String type, org.xml.sax.SAXParseException ex)
type
- The typeex
- The exceptionprotected void printIndent()
public void init() throws java.lang.Exception
java.lang.Exception
- throws Exception in case of problempublic int getSeed()
public void setSeed(int seed)
seed
- New value of property seed.public java.util.ArrayList getPlayerList()
public void setPlayerList(java.util.ArrayList playerList)
playerList
- New value of property playerList.public float getWinnerPoints()
public void setWinnerPoints(float winnerPoints)
winnerPoints
- New value of property winnerPoints.public boolean isProportional()
public void setProportional(boolean proportional)
proportional
- New value of property proportional.public int getLoosingPoints()
public void setLoosingPoints(int loosingPoints)
loosingPoints
- New value of property loosingPoints.public float getCoalitionPoints()
public void setCoalitionPoints(float coalitionPoints)
coalitionPoints
- New value of property coalitionPoints.public int getTraceLevel()
public void setTraceLevel(int traceLevel)
traceLevel
- The trace levelpublic java.io.File getHistoryFile()
public void setHistoryFile(java.io.File historyFile)
historyFile
- New value of property historyFile.public int getCoalitionDefinition()
public void setCoalitionDefinition(int coalitionDefinition)
coalitionDefinition
- New value of property coalitionDefinition.public java.io.File getGraphFile()
public void setGraphFile(java.io.File graphFile)
graphFile
- New value of property graphFile.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |