Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.robrohan.treebeard
Class JTreeContentTemplateHandler  view JTreeContentTemplateHandler download JTreeContentTemplateHandler.java

java.lang.Object
  extended bycom.robrohan.treebeard.JTreeContentTemplateHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler

public class JTreeContentTemplateHandler
extends java.lang.Object
implements org.xml.sax.ContentHandler

this shows only template nodes and their parameters


Field Summary
private  javax.swing.tree.DefaultMutableTreeNode current
           
private  org.xml.sax.Locator locator
           
private  java.util.Map namespaceMappings
           
private  javax.swing.tree.DefaultTreeModel treeModel
           
 
Constructor Summary
JTreeContentTemplateHandler(javax.swing.tree.DefaultTreeModel tm, javax.swing.tree.DefaultMutableTreeNode dmtn)
          creates a new Content Handler
 
Method Summary
 void characters(char[] values, int param, int param2)
          process characters
 void endDocument()
          Receive notification of the end of a document.
 void endElement(java.lang.String str, java.lang.String str1, java.lang.String str2)
          process an end element
 void endPrefixMapping(java.lang.String str)
          process the end prefix
 void ignorableWhitespace(char[] values, int param, int param2)
          Receive notification of ignorable whitespace in element content.
 void processingInstruction(java.lang.String str, java.lang.String str1)
          Receive notification of a processing instruction.
 void setDocumentLocator(org.xml.sax.Locator locator)
          sets the documnet locator
 void skippedEntity(java.lang.String str)
          Receive notification of a skipped entity.
 void startDocument()
          Receive notification of the beginning of a document.
 void startElement(java.lang.String namespace, java.lang.String localName, java.lang.String str2, org.xml.sax.Attributes attributes)
          process a start element
 void startPrefixMapping(java.lang.String str, java.lang.String str1)
          process the start prefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

treeModel

private javax.swing.tree.DefaultTreeModel treeModel

current

private javax.swing.tree.DefaultMutableTreeNode current

locator

private org.xml.sax.Locator locator

namespaceMappings

private java.util.Map namespaceMappings
Constructor Detail

JTreeContentTemplateHandler

public JTreeContentTemplateHandler(javax.swing.tree.DefaultTreeModel tm,
                                   javax.swing.tree.DefaultMutableTreeNode dmtn)
creates a new Content Handler

Method Detail

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
sets the documnet locator

Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler

startElement

public void startElement(java.lang.String namespace,
                         java.lang.String localName,
                         java.lang.String str2,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
process a start element

Specified by:
startElement in interface org.xml.sax.ContentHandler

endElement

public void endElement(java.lang.String str,
                       java.lang.String str1,
                       java.lang.String str2)
                throws org.xml.sax.SAXException
process an end element

Specified by:
endElement in interface org.xml.sax.ContentHandler

startPrefixMapping

public void startPrefixMapping(java.lang.String str,
                               java.lang.String str1)
                        throws org.xml.sax.SAXException
process the start prefix

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler

endPrefixMapping

public void endPrefixMapping(java.lang.String str)
                      throws org.xml.sax.SAXException
process the end prefix

Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler

characters

public void characters(char[] values,
                       int param,
                       int param2)
                throws org.xml.sax.SAXException
process characters

Specified by:
characters in interface org.xml.sax.ContentHandler

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Description copied from interface: org.xml.sax.ContentHandler
Receive notification of the end of a document.

There is an apparent contradiction between the documentation for this method and the documentation for ErrorHandler.fatalError(org.xml.sax.SAXParseException)>ErrorHandler.fatalError(org.xml.sax.SAXParseException) 55 . Until this ambiguity is resolved in a future major release, clients should make no assumptions about whether endDocument() will or will not be invoked when the parser has reported a fatalError() or thrown an exception.

The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

Specified by:
endDocument in interface org.xml.sax.ContentHandler

ignorableWhitespace

public void ignorableWhitespace(char[] values,
                                int param,
                                int param2)
                         throws org.xml.sax.SAXException
Description copied from interface: org.xml.sax.ContentHandler
Receive notification of ignorable whitespace in element content.

Validating Parsers must use this method to report each chunk of whitespace in element content (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models.

SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler

processingInstruction

public void processingInstruction(java.lang.String str,
                                  java.lang.String str1)
                           throws org.xml.sax.SAXException
Description copied from interface: org.xml.sax.ContentHandler
Receive notification of a processing instruction.

The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.

A SAX parser must never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.

Like characters() 55 , processing instruction data may have characters that need more than one char value.

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler

skippedEntity

public void skippedEntity(java.lang.String str)
                   throws org.xml.sax.SAXException
Description copied from interface: org.xml.sax.ContentHandler
Receive notification of a skipped entity. This is not called for entity references within markup constructs such as element start tags or markup declarations. (The XML recommendation requires reporting skipped external entities. SAX also reports internal entity expansion/non-expansion, except within markup constructs.)

The Parser will invoke this method each time the entity is skipped. Non-validating processors may skip entities if they have not seen the declarations (because, for example, the entity was declared in an external DTD subset). All processors may skip external entities, depending on the values of the http://xml.org/sax/features/external-general-entities and the http://xml.org/sax/features/external-parameter-entities properties.

Specified by:
skippedEntity in interface org.xml.sax.ContentHandler

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Description copied from interface: org.xml.sax.ContentHandler
Receive notification of the beginning of a document.

The SAX parser will invoke this method only once, before any other event callbacks (except for setDocumentLocator 55 ).

Specified by:
startDocument in interface org.xml.sax.ContentHandler