nbi.xmlsec.biocase.protocol.filter
Class SearchOperationTypeFilter

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

public class SearchOperationTypeFilter
extends OperationTypeFilter

This class parses a ScanOperationType of a BioCASE request from a SAX stream.

All SAX events are forwarded to the defined ContentHandler. The parsed SearchOperationTypemay be retrieved via getOperationType().

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

Field Summary
static String LN_COUNT
          Local name of the element count
static String LN_FILTER
          Local name of the element filter
static String LN_RESPONSEFORMAT
          Local name of the element responseFormat
static String LN_RESPONSEFORMAT_LIMIT
          Local name of the attribute limit of the element reponseFormat
static String LN_RESPONSEFORMAT_START
          Local name of the attribute start of the element reponseFormat
static String LN_RESPONSEFORMAT_TRANSFORMATION
          Local name of the attribute transformation of the element reponseFormat
static String LN_ROOT
          Local name of the root element search
(package private)  OperatorFilter opFilter
          The current subfilter for the search operation type filter
(package private) static int trackMode
          Track mode for the filter stack
 
Fields inherited from class nbi.xmlsec.biocase.protocol.filter.OperationTypeFilter
LN_REQUESTFORMAT, operationType
 
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
SearchOperationTypeFilter(String protocolURI, int filterMode)
          Inits the filter instance.
SearchOperationTypeFilter(XMLReader parent, String protocolURI, int filterMode)
          Inits the filter instance with specified parent.
 
Method Summary
 SearchOperationType getOperationType()
          Gets the OperationType
protected  void initSubFilter()
          Registers subfilters for subelements.
protected  nbi.xml.sax.SAXElement parseElement(nbi.xml.sax.SAXElement element)
          Parses subelements and build up the ScanOperationType.
protected  nbi.xml.sax.SAXElement parseInit(nbi.xml.sax.SAXElement element)
          Initialises the SearchOperationType.
 
Methods inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter
characters, checkFilterParameter, endElement, filterCharacters, filterElement, getFilterMode, getFilterParameter, getProtocolURI, isParsingComplete, parseComplete, 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

LN_ROOT

public static final String LN_ROOT
Local name of the root element search

See Also:
Constant Field Values

LN_COUNT

public static final String LN_COUNT
Local name of the element count

See Also:
Constant Field Values

LN_FILTER

public static final String LN_FILTER
Local name of the element filter

See Also:
Constant Field Values

LN_RESPONSEFORMAT

public static final String LN_RESPONSEFORMAT
Local name of the element responseFormat

See Also:
Constant Field Values

LN_RESPONSEFORMAT_TRANSFORMATION

public static final String LN_RESPONSEFORMAT_TRANSFORMATION
Local name of the attribute transformation of the element reponseFormat

See Also:
Constant Field Values

LN_RESPONSEFORMAT_LIMIT

public static final String LN_RESPONSEFORMAT_LIMIT
Local name of the attribute limit of the element reponseFormat

See Also:
Constant Field Values

LN_RESPONSEFORMAT_START

public static final String LN_RESPONSEFORMAT_START
Local name of the attribute start of the element reponseFormat

See Also:
Constant Field Values

trackMode

static final int trackMode
Track mode for the filter stack

See Also:
Constant Field Values

opFilter

OperatorFilter opFilter
The current subfilter for the search operation type filter

Constructor Detail

SearchOperationTypeFilter

public SearchOperationTypeFilter(XMLReader parent,
                                 String protocolURI,
                                 int filterMode)
Inits the filter instance with specified parent.

Parameters:
parent - parent reader.
protocolURI - protocol version URI of this filter.
filterMode - filterMode of this filter ProtocolFilter.filterMode.

SearchOperationTypeFilter

public SearchOperationTypeFilter(String protocolURI,
                                 int filterMode)
Inits the filter instance.

Parameters:
protocolURI - protocol version URI of this filter.
filterMode - filterMode of this filter ProtocolFilter.filterMode.
Method Detail

initSubFilter

protected void initSubFilter()
Registers subfilters for subelements.

Overrides:
initSubFilter in class OperationTypeFilter

parseInit

protected nbi.xml.sax.SAXElement parseInit(nbi.xml.sax.SAXElement element)
                                    throws SAXException
Initialises the SearchOperationType.

Overrides:
parseInit in class ProtocolFilter
Parameters:
element - The element of the startElement event (contains no value).
Returns:
The (modified) element or null when the event shall be removed.
Throws:
SAXException - If any parsing error occurs.
See Also:
ProtocolFilter.parseInit(SAXElement)

parseElement

protected nbi.xml.sax.SAXElement parseElement(nbi.xml.sax.SAXElement element)
                                       throws SAXException
Parses subelements and build up the ScanOperationType.

Overrides:
parseElement in class OperationTypeFilter
Throws:
SAXException
See Also:
ProtocolFilter.parseElement(SAXElement)

getOperationType

public SearchOperationType getOperationType()
Gets the OperationType

Returns:
Returns the operation type.


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