nbi.xmlsec.biocase.protocol.filter
Class OperationTypeFilter

java.lang.Object
  extended byorg.xml.sax.helpers.XMLFilterImpl
      extended bynbi.xmlsec.biocase.protocol.filter.ProtocolFilter
          extended bynbi.xmlsec.biocase.protocol.filter.OperationTypeFilter
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, XMLFilter, XMLReader
Direct Known Subclasses:
ScanOperationTypeFilter, SearchOperationTypeFilter

public class OperationTypeFilter
extends ProtocolFilter

The class OperationTypeFilter parses the request format element of an search or scan operation type of a BioCASE search or scan request from a SAX stream.

All SAX events are forwarded to the defined ContentHandler. The parsed operation type may be retrieved with the method getOperationType()of the classes ScanOperationTypeor SearchOperationTyperespectively.

Since:
Version:
$Revision: 1.6 $
Author:
Lutz Suhrbier

Field Summary
static String LN_REQUESTFORMAT
          Local name of the element requestFormat
protected  OperationType operationType
          For the parsed operation type
 
Fields inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter
elementStack, filterMode, FILTERMODE_FILTER, FILTERMODE_NONE, FILTERMODE_PARSER, filterRoot, logger, PROT_URI_13, PROT_URI_20
 
Fields inherited from class org.xml.sax.helpers.XMLFilterImpl
 
Constructor Summary
OperationTypeFilter(String protocolURI, String filterRoot, int trackMode, int filterMode)
          Inits this filter.
OperationTypeFilter(XMLReader parent, String protocolURI, String filterRoot, int trackMode, int filterMode)
          Inits this filter with the specified parent.
 
Method Summary
protected  void initSubFilter()
          Registers subfilters for subelements.
protected  nbi.xml.sax.SAXElement parseElement(nbi.xml.sax.SAXElement element)
          Parses subelements and sets the request format of the operation type.
 
Methods inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter
characters, checkFilterParameter, endElement, filterCharacters, filterElement, getFilterMode, getFilterParameter, getProtocolURI, isParsingComplete, parseComplete, parseInit, registerSubFilter, setFilterParameter, setProtocolURI, startElement, unregisterSubFilter
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operationType

protected OperationType operationType
For the parsed operation type


LN_REQUESTFORMAT

public static final String LN_REQUESTFORMAT
Local name of the element requestFormat

See Also:
Constant Field Values
Constructor Detail

OperationTypeFilter

public OperationTypeFilter(XMLReader parent,
                           String protocolURI,
                           String filterRoot,
                           int trackMode,
                           int filterMode)
Inits this filter with the specified parent.

Parameters:
parent - Parent reader.
protocolURI - URI of the protocol version.
filterRoot - Local name of the root element.
trackMode - Define track mode for the internal FilterStack.
filterMode - filterMode of this filter ProtocolFilter.filterMode.

OperationTypeFilter

public OperationTypeFilter(String protocolURI,
                           String filterRoot,
                           int trackMode,
                           int filterMode)
Inits this filter.

Parameters:
protocolURI - URI of the protocol version.
filterRoot - Local name of the root element.
trackMode - Define track mode for the internal FilterStack.
filterMode - filterMode of this filter ProtocolFilter.filterMode.
Method Detail

initSubFilter

protected void initSubFilter()
Registers subfilters for subelements.


parseElement

protected nbi.xml.sax.SAXElement parseElement(nbi.xml.sax.SAXElement element)
                                       throws SAXException
Parses subelements and sets the request format of the operation type.

Overrides:
parseElement in class ProtocolFilter
Parameters:
element - The element corresponding to the endElement event.
Returns:
The (modified) element or null when element shall be removed.
Throws:
SAXException - If any parsing error occurs.
See Also:
ProtocolFilter.parseElement(SAXElement)


Copyright © 2006 Lutz Suhrbier, Freie Universität Berlin. All Rights Reserved.