|
||||||||||
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.ContentFilter
The class ContentFilter parses the content of a BioCASE response from a SAX stream.
All SAX events are forwarded to the defined ContentHandler or to the
RBACFilter
subfilter configured during the filter
initialisation in parseInit(SAXElement)
respectively. The RBACFilter
provides filtering of the
incorporated content document and gets control over the SAX filtering
process, until the document processing has finished. The parsed
Content
may be retrieved with
getContent()
.
Field Summary | |
private Content |
content
To store the content attributes |
(package private) ProtocolFilter |
contentFilter
The currently configured content filter |
static String |
LN_CAPABILITIES
Local name of the subelement capabilities |
static String |
LN_CONTENT_RECORDCOUNT
Local name of the root element attribute recordCount |
static String |
LN_CONTENT_RECORDDROPPED
Local name of the root element attribute recordDropped |
static String |
LN_CONTENT_RECORDSTART
Local name of the root element attribute recordStart |
static String |
LN_CONTENT_TOTALSEARCHHITS
Local name of the root element attribute totalSearchHits |
static String |
LN_ROOT
Local name of the root element content |
static String |
LN_SCAN
Local name of the subelement scan |
static String |
LN_SEARCH
Local name of the subelement search |
(package private) static Logger |
logger
|
(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, PROT_URI_13, PROT_URI_20 |
Fields inherited from class org.xml.sax.helpers.XMLFilterImpl |
|
Constructor Summary | |
ContentFilter(String protocolURI,
int filterMode)
Inits the filter instance. |
|
ContentFilter(XMLReader parent,
String protocolURI,
int filterMode)
Inits the filter instance with specified parent. |
Method Summary | |
Content |
getContent()
Gets the content |
String |
getContentNamespaceURI()
Gets the namespace URI of the content. |
protected ContentFilterParameter |
getParameter()
Gets the parameter of this filter. |
Set |
getSignElements()
Gets the set of element paths evaluated for signing. |
protected nbi.xml.sax.SAXElement |
parseComplete(nbi.xml.sax.SAXElement element)
This method is called when the endElement event of root element was received, before it is forwarded to the content handler |
protected nbi.xml.sax.SAXElement |
parseInit(nbi.xml.sax.SAXElement element)
Configures the content filter ((@link RBACFilter RBACFilter}) based on the content filter parameters request, response header, RBACPDP and role set. |
Methods inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter |
characters, checkFilterParameter, endElement, filterCharacters, filterElement, getFilterMode, getFilterParameter, getProtocolURI, isParsingComplete, parseElement, 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 |
static Logger logger
public static final String LN_ROOT
content
public static final String LN_CONTENT_TOTALSEARCHHITS
totalSearchHits
public static final String LN_CONTENT_RECORDDROPPED
recordDropped
public static final String LN_CONTENT_RECORDCOUNT
recordCount
public static final String LN_CONTENT_RECORDSTART
recordStart
public static final String LN_CAPABILITIES
capabilities
public static final String LN_SCAN
scan
public static final String LN_SEARCH
search
ProtocolFilter contentFilter
static final int trackMode
private Content content
Constructor Detail |
public ContentFilter(String protocolURI, int filterMode)
protocolURI
- protocol version URI of this filter.filterMode
- filterMode of this filter
ProtocolFilter.filterMode
.public ContentFilter(XMLReader parent, String protocolURI, int filterMode)
parent
- parent reader.protocolURI
- protocol version URI of this filter.filterMode
- filterMode of this filter
ProtocolFilter.filterMode
.Method Detail |
protected nbi.xml.sax.SAXElement parseInit(nbi.xml.sax.SAXElement element) throws SAXException
The configuration must processed here, because the filter parameter
response header may be unknown when creating the content subfilter in the
parent filter (ResponseFilter
). In case of a
search response, the root element name of the (@link RBACFilter
RBACFilter} subfilter is set to null, which means unknown. Then, the
element of the next startElement event will define the root element of
the subfilter (see
ProtocolFilter#startElement(String, String, String, Attributes)
).
The root element names for the response types capabilities
and scan
are defined by the BioCASE protocol and were
deduced from the response header and must be set as filter parameter
before.
When the filter mode is ProtocolFilter.FILTERMODE_PARSER
then a ContentObjectFilter
is configured, parsing the content document.
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 parseComplete(nbi.xml.sax.SAXElement element) throws SAXException
ProtocolFilter
parseComplete
in class ProtocolFilter
element
- The complete root element (including the value).
SAXException
- If any parsing error occurs.protected ContentFilterParameter getParameter()
public Content getContent()
public Set getSignElements()
public String getContentNamespaceURI()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |