edu.mit.jverbnet.parse
Class FrameHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by edu.mit.jverbnet.util.parse.MappedHandler<Frame.FrameBuilder>
          extended by edu.mit.jverbnet.parse.FrameHandler
All Implemented Interfaces:
IHasParserHandler, ITaggedBlockTaskHandler, ITaggedHandler<Frame.FrameBuilder>, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class FrameHandler
extends MappedHandler<Frame.FrameBuilder>

Handles Verbnet XML blocks tagged with "FRAME".

Since:
JVerbnet 1.0.0
Version:
1.2.0
Author:
Mark A. Finlayson

Field Summary
static java.lang.String XML_TAG_DESCRIPTION
           
static java.lang.String XML_TAG_EXAMPLE
           
static java.lang.String XML_TAG_EXAMPLES
           
static java.lang.String XML_TAG_FRAME
           
static java.lang.String XML_TAG_FRAMES
           
 
Fields inherited from class edu.mit.jverbnet.util.parse.MappedHandler
messageIgnoringElementBlockExternal, messageMatcherIgnoreExternal, messageMatcherIgnoreInternal, messageParserNotSet, messageUnmappedElementBlockInternal, tagStack
 
Constructor Summary
FrameHandler()
          Creates a new FrameHandler with no parent or parser.
FrameHandler(IHasParserHandler parent)
          Creates a new FrameHandler with the specified parent.
FrameHandler(org.xml.sax.XMLReader parser)
          Creates a new FrameHandler with the specified parser.
FrameHandler(org.xml.sax.XMLReader parser, org.xml.sax.ContentHandler parent)
          Creates a new FrameHandler with the specified parser and parent.
 
Method Summary
protected  void clearLocal()
          Subclasses may override this method to add code to be invoked when MappedHandler.clear() is called.
 Frame.FrameBuilder doGetElement()
          If subclasses intend to use the MappedHandler.getElement() method, they should override this method to provide the code that constructs the object corresponding to the tagged block.
protected  void initHandlerMap(java.util.Map<java.lang.String,org.xml.sax.ContentHandler> map)
          Adds handlers to the element map.
 
Methods inherited from class edu.mit.jverbnet.util.parse.MappedHandler
checkParserSet, clear, endElement, endTaggedBlock, getDocumentLocator, getElement, getHandlerMappings, getParent, getParser, getTag, getTaggedBlockTasks, handleUnmappedEndElement, handleUnmappedStartElement, isInsideTaggedBlock, reportWarning, reportWarnings, setDocumentLocator, setParent, setParser, setReportWarnings, startElement, startTaggedBlock
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity, startDocument, startPrefixMapping
 

Field Detail

XML_TAG_FRAMES

public static final java.lang.String XML_TAG_FRAMES
See Also:
Constant Field Values

XML_TAG_FRAME

public static final java.lang.String XML_TAG_FRAME
See Also:
Constant Field Values

XML_TAG_DESCRIPTION

public static final java.lang.String XML_TAG_DESCRIPTION
See Also:
Constant Field Values

XML_TAG_EXAMPLES

public static final java.lang.String XML_TAG_EXAMPLES
See Also:
Constant Field Values

XML_TAG_EXAMPLE

public static final java.lang.String XML_TAG_EXAMPLE
See Also:
Constant Field Values
Constructor Detail

FrameHandler

public FrameHandler()
Creates a new FrameHandler with no parent or parser.

Since:
JVerbnet 1.0.0

FrameHandler

public FrameHandler(IHasParserHandler parent)
Creates a new FrameHandler with the specified parent.

Parameters:
parent - the parent of the handler; may be null
Since:
JVerbnet 1.0.0

FrameHandler

public FrameHandler(org.xml.sax.XMLReader parser)
Creates a new FrameHandler with the specified parser.

Parameters:
parser - the parser of the handler; may be null
Since:
JVerbnet 1.0.0

FrameHandler

public FrameHandler(org.xml.sax.XMLReader parser,
                    org.xml.sax.ContentHandler parent)
Creates a new FrameHandler with the specified parser and parent.

Parameters:
parser - the parent of the handler; may be null
parent - the parser of the handler; may be null
Since:
JVerbnet 1.0.0
Method Detail

initHandlerMap

protected void initHandlerMap(java.util.Map<java.lang.String,org.xml.sax.ContentHandler> map)
Description copied from class: MappedHandler
Adds handlers to the element map. Subclasses may override this to provide handlers for different tags.

Overrides:
initHandlerMap in class MappedHandler<Frame.FrameBuilder>
Parameters:
map - the map to which handlers should be added

clearLocal

protected void clearLocal()
Description copied from class: MappedHandler
Subclasses may override this method to add code to be invoked when MappedHandler.clear() is called.

Overrides:
clearLocal in class MappedHandler<Frame.FrameBuilder>

doGetElement

public Frame.FrameBuilder doGetElement()
Description copied from class: MappedHandler
If subclasses intend to use the MappedHandler.getElement() method, they should override this method to provide the code that constructs the object corresponding to the tagged block.

Overrides:
doGetElement in class MappedHandler<Frame.FrameBuilder>
Returns:
the object corresponding to the tagged block


Copyright © 2012 ${project.organization.name}. All Rights Reserved.