|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.XMLFilterImpl nbi.xmlsec.biocase.protocol.filter.ProtocolFilter nbi.xmlsec.biocase.protocol.filter.LOPFilter
The class LOPFilter parses the content of a LOP operator of BioCASE search request from a SAX stream.
All SAX events are forwarded to the defined ContentHandler. The parsed
LOP
may be retrieved with getOperator()
.
Field Summary | |
static String |
LN_AND
Local name of the Binary LOP and |
protected static String |
LN_LOP_SYNTAX
Local name of the attribute syntax of any COP element |
static String |
LN_NOT
Local name of the Unary LOP not |
static String |
LN_OR
Local name of the Binary LOP or |
protected LOP |
lop
Stores the parsed LOP |
private List |
opFilters
List of parsed suboperators (max 2) |
(package private) static int |
trackMode
Track mode for the filter stack |
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 | |
LOPFilter(String protocolURI,
String filterRoot,
int trackMode,
int filterMode)
Inits the LOP filter. |
|
LOPFilter(XMLReader parent,
String protocolURI,
String filterRoot,
int trackMode,
int filterMode)
Inits the LOP filter with the specified parent. |
Method Summary | |
protected nbi.xml.sax.SAXElement |
filterElement(nbi.xml.sax.SAXElement element)
Sets up the corresponding subfilter depending on the current operator type. |
LOP |
getOperator()
Gets the LOP operator |
private void |
initSubFilter()
|
static boolean |
isBinary(String operator)
Checks if the given operator is a BinaryLOP operator. |
static boolean |
isOperator(String operator)
Checks if the given operator is a LOP operator. |
static boolean |
isUnary(String operator)
Checks if the given operator is a UnaryLOP operator. |
protected nbi.xml.sax.SAXElement |
parseElement(nbi.xml.sax.SAXElement element)
Adds the last parsed operator to the lop. |
protected nbi.xml.sax.SAXElement |
parseInit(nbi.xml.sax.SAXElement element)
Initialises the LOP setting its syntax. |
Methods inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter |
characters, checkFilterParameter, endElement, filterCharacters, 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 |
protected static String LN_LOP_SYNTAX
syntax
of any COP element
public static String LN_NOT
not
public static String LN_AND
and
public static String LN_OR
or
protected LOP lop
static final int trackMode
private List opFilters
Constructor Detail |
public LOPFilter(String protocolURI, String filterRoot, int trackMode, int filterMode)
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
.public LOPFilter(XMLReader parent, String protocolURI, String filterRoot, int trackMode, int filterMode)
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
.Method Detail |
private void initSubFilter()
protected nbi.xml.sax.SAXElement parseInit(nbi.xml.sax.SAXElement element) throws SAXException
parseInit
in class ProtocolFilter
element
- The element of the startElement event (contains no value).
SAXException
- If any parsing error occurs.ProtocolFilter.parseInit(SAXElement)
protected nbi.xml.sax.SAXElement filterElement(nbi.xml.sax.SAXElement element) throws SAXException
filterElement
in class ProtocolFilter
element
- The element corresponding to the startElement event.
SAXException
- If any parsing error occurs.ProtocolFilter.filterElement(SAXElement)
protected nbi.xml.sax.SAXElement parseElement(nbi.xml.sax.SAXElement element) throws SAXException
parseElement
in class ProtocolFilter
element
- The element corresponding to the endElement event.
SAXException
- If any parsing error occurs.ProtocolFilter.parseComplete(SAXElement)
public static boolean isOperator(String operator)
operator
- operator to check
true
if operator is a LOP, false
otherwise.public static boolean isBinary(String operator)
operator
- operator to check
true
if operator is binary, false
otherwise.public static boolean isUnary(String operator)
operator
- operator to check
true
if operator is unary, false
otherwise.public LOP getOperator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |