|
||||||||||
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.COPFilter
The class COPFilter parses the content of a COP operator of BioCASE search request from a SAX stream.
All SAX events are forwarded to the defined ContentHandler. The parsed
COP
may be retrieved with getOperator()
.
Field Summary | |
protected COP |
cop
Stores the parsed COP |
static String |
LN_COP_PATH
Local name of the attribute path of any COP element |
static String |
LN_EQUALS
Local name of the Simple COP equals |
static String |
LN_GREATERTHAN
Local name of the Simple COP greaterThan |
static String |
LN_GREATERTHANOREQUALS
Local name of the Simple COP greaterThanEquals |
static String |
LN_IN
Local name of the Multi COP in |
static String |
LN_ISNOTNULL
Local name of the Unary COP isNotNull |
static String |
LN_ISNULL
Local name of the Unary COP isNull |
static String |
LN_LESSTHAN
Local name of the Simple COP lessThan |
static String |
LN_LESSTHANOREQUALS
Local name of the Simple COP lessThanEquals |
static String |
LN_LIKE
Local name of the Simple COP like |
static String |
LN_NOTEQUALS
Local name of the Simple COP notEquals |
static String |
LN_VALUE
Local name of the element value fo the Multi COP
in |
(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 | |
COPFilter(String protocolURI,
String filterRoot,
int trackMode,
int filterMode)
Inits the COP filter. |
|
COPFilter(XMLReader parent,
String protocolURI,
String filterRoot,
int trackMode,
int filterMode)
Inits the COP filter with the specified parent. |
Method Summary | |
COP |
getOperator()
Gets the cop |
private void |
initSubFilter()
Initialises subfilters of this filter |
static boolean |
isMulti(String operator)
Checks if the given operator is a MultiCOP operator. |
static boolean |
isOperator(String operator)
Checks if the given operator is a COP operator. |
static boolean |
isSimple(String operator)
Checks if the given operator is a SimpleCOP operator. |
static boolean |
isUnary(String operator)
Checks if the given operator is a UnaryCOP operator. |
protected nbi.xml.sax.SAXElement |
parseComplete(nbi.xml.sax.SAXElement element)
If parsing complete, keeps Unary unchanged, add the value of the root element for a simple operator. |
protected nbi.xml.sax.SAXElement |
parseElement(nbi.xml.sax.SAXElement element)
Adds a parsed value subelement to the cop. |
protected nbi.xml.sax.SAXElement |
parseInit(nbi.xml.sax.SAXElement element)
Initialises the COP setting its parsed type and path(Unary). |
Methods inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter |
characters, checkFilterParameter, endElement, filterCharacters, filterElement, getFilterMode, getFilterParameter, getProtocolURI, isParsingComplete, 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 |
public static String LN_COP_PATH
path
of any COP element
public static String LN_ISNULL
isNull
public static String LN_ISNOTNULL
isNotNull
public static String LN_EQUALS
equals
public static String LN_GREATERTHAN
greaterThan
public static String LN_GREATERTHANOREQUALS
greaterThanEquals
public static String LN_LESSTHAN
lessThan
public static String LN_LESSTHANOREQUALS
lessThanEquals
public static String LN_LIKE
like
public static String LN_NOTEQUALS
notEquals
public static String LN_IN
in
public static String LN_VALUE
value
fo the Multi COP
in
static final int trackMode
protected COP cop
Constructor Detail |
public COPFilter(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 COPFilter(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 parseElement(nbi.xml.sax.SAXElement element) throws SAXException
value
element is finished.
parseElement
in class ProtocolFilter
element
- The element corresponding to the endElement event.
SAXException
- If any parsing error occurs.ProtocolFilter.parseInit(SAXElement)
protected nbi.xml.sax.SAXElement parseComplete(nbi.xml.sax.SAXElement element) throws SAXException
parseComplete
in class ProtocolFilter
element
- The complete root element (including the value).
SAXException
- If any parsing error occurs.ProtocolFilter.parseComplete(SAXElement)
public static boolean isUnary(String operator)
operator
- operator to check
true
if operator is unary, false
otherwise.public static boolean isSimple(String operator)
operator
- operator to check
true
if operator is simple, false
otherwise.public static boolean isMulti(String operator)
operator
- operator to check
true
if operator is multi, false
otherwise.public static boolean isOperator(String operator)
operator
- operator to check
true
if operator is COP, false
otherwise.public COP getOperator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |