|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.any23.filter.IgnoreAccidentalRDFa
public class IgnoreAccidentalRDFa
A TripleHandler that suppresses output of the RDFa
parser if the document only contains "accidental" RDFa,
like stylesheet links and other non-RDFa uses of HTML's
| Constructor Summary | |
|---|---|
IgnoreAccidentalRDFa(TripleHandler wrapped)
|
|
IgnoreAccidentalRDFa(TripleHandler wrapped,
boolean alwaysSuppressCSSTriples)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Will be called last and exactly once. |
void |
closeContext(ExtractionContext context)
Informs the handler that no more triples will come from a previously opened context. |
void |
endDocument(org.openrdf.model.URI documentURI)
Informs the handler that the end of the document has been reached. |
void |
openContext(ExtractionContext context)
Informs the handler that a new context has been established. |
void |
receiveNamespace(String prefix,
String uri,
ExtractionContext context)
Invoked with a currently open context, notifies the detection of a namespace. |
void |
receiveTriple(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.URI g,
ExtractionContext context)
Invoked with a currently open context, notifies the detection of a triple. |
void |
setContentLength(long contentLength)
Sets the length of the content to be processed. |
void |
startDocument(org.openrdf.model.URI documentURI)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IgnoreAccidentalRDFa(TripleHandler wrapped,
boolean alwaysSuppressCSSTriples)
wrapped - the decorated triple handler.alwaysSuppressCSSTriples - if true the CSS triples will be
always suppressed even if the document is not empty.
If false then the CSS triples will be suppressed only if
document is empty.public IgnoreAccidentalRDFa(TripleHandler wrapped)
| Method Detail |
|---|
public void startDocument(org.openrdf.model.URI documentURI)
throws TripleHandlerException
startDocument in interface TripleHandlerTripleHandlerException
public void openContext(ExtractionContext context)
throws TripleHandlerException
TripleHandler
openContext in interface TripleHandlerTripleHandlerException
public void receiveTriple(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.URI g,
ExtractionContext context)
throws TripleHandlerException
TripleHandler
receiveTriple in interface TripleHandlers - triple subject, cannot be null.p - triple predicate, cannot be null.o - triple object, cannot be null.g - triple graph, can be null.context - extraction context.
TripleHandlerException
public void receiveNamespace(String prefix,
String uri,
ExtractionContext context)
throws TripleHandlerException
TripleHandler
receiveNamespace in interface TripleHandlerprefix - namespace prefix.uri - namespace URI.context - namespace context.
TripleHandlerExceptionpublic void closeContext(ExtractionContext context)
TripleHandler
closeContext in interface TripleHandlercontext - the context to be closed.
public void close()
throws TripleHandlerException
TripleHandler
close in interface TripleHandlerTripleHandlerException
public void endDocument(org.openrdf.model.URI documentURI)
throws TripleHandlerException
TripleHandler
endDocument in interface TripleHandlerdocumentURI - document URI.
TripleHandlerExceptionpublic void setContentLength(long contentLength)
TripleHandler
setContentLength in interface TripleHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||