|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
edu.mit.jverbnet.util.parse.MappedHandler<java.util.Map.Entry<T,java.lang.Boolean>>
edu.mit.jverbnet.parse.RestrictionHandler<T>
public class RestrictionHandler<T extends IVerbnetType>
Handles Verbnet XML blocks tagged with "SELRESTR" or "SYNRESTR".
Field Summary | |
---|---|
static java.lang.String |
XML_TAG_SELRESTR
|
static java.lang.String |
XML_TAG_SYNRESTR
|
Fields inherited from class edu.mit.jverbnet.util.parse.MappedHandler |
---|
messageIgnoringElementBlockExternal, messageMatcherIgnoreExternal, messageMatcherIgnoreInternal, messageParserNotSet, messageUnmappedElementBlockInternal, tagStack |
Constructor Summary | |
---|---|
RestrictionHandler(boolean isSelRestr,
java.lang.Class<T> verbnetTypeClass)
Creates a new RestrictionHandler with no parent or parser. |
|
RestrictionHandler(IHasParserHandler parent,
boolean isSelRestr,
java.lang.Class<T> verbnetTypeClass)
Creates a new RestrictionHandler with the specified parent. |
|
RestrictionHandler(org.xml.sax.XMLReader parser,
boolean isSelRestr,
java.lang.Class<T> verbnetTypeClass)
Creates a new RestrictionHandler with the specified parser. |
|
RestrictionHandler(org.xml.sax.XMLReader parser,
org.xml.sax.ContentHandler parent,
boolean isSelRestr,
java.lang.Class<T> verbnetTypeClass)
Creates a new RestrictionHandler 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. |
java.util.Map.Entry<T,java.lang.Boolean> |
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. |
void |
startTaggedBlock(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
This method is used to run code when entering a tagged block. |
Methods inherited from class edu.mit.jverbnet.util.parse.MappedHandler |
---|
checkParserSet, clear, endElement, endTaggedBlock, getDocumentLocator, getElement, getHandlerMappings, getParent, getParser, getTag, getTaggedBlockTasks, handleUnmappedEndElement, handleUnmappedStartElement, initHandlerMap, isInsideTaggedBlock, reportWarning, reportWarnings, setDocumentLocator, setParent, setParser, setReportWarnings, startElement |
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 |
---|
public static final java.lang.String XML_TAG_SELRESTR
public static final java.lang.String XML_TAG_SYNRESTR
Constructor Detail |
---|
public RestrictionHandler(boolean isSelRestr, java.lang.Class<T> verbnetTypeClass)
isSelRestr
- whether this is a semantic restriction (true
) or
syntactic restriction (false
).verbnetTypeClass
- the verbnet type used in this restrictionpublic RestrictionHandler(IHasParserHandler parent, boolean isSelRestr, java.lang.Class<T> verbnetTypeClass)
parent
- the parent of the handler; may be null
isSelRestr
- whether this is a semantic restriction (true
) or
syntactic restriction (false
).verbnetTypeClass
- the verbnet type used in this restrictionpublic RestrictionHandler(org.xml.sax.XMLReader parser, boolean isSelRestr, java.lang.Class<T> verbnetTypeClass)
parser
- the parser of the handler; may be null
isSelRestr
- whether this is a semantic restriction (true
) or
syntactic restriction (false
).verbnetTypeClass
- the verbnet type used in this restrictionpublic RestrictionHandler(org.xml.sax.XMLReader parser, org.xml.sax.ContentHandler parent, boolean isSelRestr, java.lang.Class<T> verbnetTypeClass)
parser
- the parent of the handler; may be null
parent
- the parser of the handler; may be null
isSelRestr
- whether this is a semantic restriction (true
) or
syntactic restriction (false
).verbnetTypeClass
- the verbnet type used in this restrictionMethod Detail |
---|
protected void clearLocal()
MappedHandler
MappedHandler.clear()
is called.
clearLocal
in class MappedHandler<java.util.Map.Entry<T extends IVerbnetType,java.lang.Boolean>>
public void startTaggedBlock(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
ITaggedBlockTaskHandler
startTaggedBlock
in interface ITaggedBlockTaskHandler
startTaggedBlock
in class MappedHandler<java.util.Map.Entry<T extends IVerbnetType,java.lang.Boolean>>
uri
- the Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace processing is not being
performedlocalName
- the local name (without prefix), or the empty string if
Namespace processing is not being performedqName
- the qualified name (with prefix), or the empty string if
qualified names are not availableattrs
- the attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object. The value
of this object after startElement returns is undefined
org.xml.sax.SAXException
- any SAX exception, possibly wrapping another exceptionpublic java.util.Map.Entry<T,java.lang.Boolean> doGetElement()
MappedHandler
MappedHandler.getElement()
method, they should
override this method to provide the code that constructs the object
corresponding to the tagged block.
doGetElement
in class MappedHandler<java.util.Map.Entry<T extends IVerbnetType,java.lang.Boolean>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |