- From: Nathan <nathan@webr3.org>
- Date: Mon, 20 Sep 2010 00:47:05 +0100
- To: nathan@webr3.org
- CC: Manu Sporny <msporny@digitalbazaar.com>, RDFA Working Group <public-rdfa-wg@w3.org>
Nathan wrote:
> [NoInterfaceObject Callback]
> interface DataParser {
> boolean parse (in any toparse, in DataStore store);
> };
After discussing the above with Manu, he's talked me through the issues
with mobile processors and keeping a light footprint, thus after some
discussions the following is proposed:
[NoInterfaceObject]
interface DataParser {
boolean parse (in any toparse, in DataStore store, in optional
RDFTripleCallback filter);
boolean process (in any toparse, in DataProcessor processor, in
optional RDFTripleCallback filter);
};
[NoInterfaceObject Callback]
interface DataProcessor {
void process (RDFTriple triple);
};
interface DocumentData {
...
boolean parse(in any toParse, in optional DataStore store, in
optional RDFTripleCallback filter, in optional DataParser parser);
boolean process(in any toParse, in DataProcessor processor,
in optional RDFTripleCallback filter, in optional DataParser parser);
};
Changes:
DataParser looses the Callback extended attribute
DataParser.parse gains an optional filter which allows only triples
matching a given filter to be added to the store.
DataParser.process is added which rather than adding triples to a store,
executes a given callback on each triple, thus allowing say all
telephone numbers in a document to be highlighted without storing any
data / increasing memory usage, this method also has the optional
`filter` property functioning the same as that on DataParser.parse.
A new DataProcessor Callback interface is added with only one parameter,
triple (to keep things light).
DocumentData.parse gains an optional `filter` parameter
added DocumentData.process method
Best,
Nathan
Received on Sunday, 19 September 2010 23:47:49 UTC