ISSUE-53: DataParser Interface and Arguments Upgrades

DataParser interfaces

DataParser Interface and Arguments Upgrades

State:
CLOSED
Product:
RDFa 1.1 API
Raised by:
Nathan Rixham
Opened on:
2010-10-28
Description:
In line with the proposals in ISSUE-51, this issue primarily allows parsers to keep a light memory footprint, which often needed, especially on mobile devices.

Web IDL:

[NoInterfaceObject]
[Constructor, Constructor(in DataContext context)]
interface DataParser {
boolean parse (in any toparse, ParserCallback callback, in optional RDFTripleCallback filter, in optional ??? x);
boolean process (in any toparse, in DataProcessor processor, in optional RDFTripleCallback filter);
};

[NoInterfaceObject Callback]
interface DataProcessor {
void process (RDFTriple triple);
};

[Callback]
interface ParserCallback {
void run(in ??? x);
};

The poorly defined "??? x" param on DataParser and ParserCallback will be either DataStore or RDFGraph

Changes:

DataParser.parse gains an optional filter which allows only triples matching a given filter to be added to the store.

DataParser.parse has it's argument swapped around to align with process and to promote async usage.

Setting the second param to a ParserCallback (below) ensures the API is async by default, if no graph is passed in (as fourth param) then a new graph/store is created, if "x" is provided and callback is null then API flips in to sync mode (after parsing the completed graph/store is populated with triples from default graph).

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.

DataParser gains a constructor parameter which accepts a DataContext, as parsers require access to TypedLiteral conversion functions, and to the create*** methods.

A new DataProcessor Callback interface is added with only one parameter, triple (to keep things light).

A new ParserCallback (name tbd) Callback interface is added with only one parameter, which will be RDFGraph or DataStore.
Related Actions Items:
No related actions
Related emails:
  1. PROPOSAL to close ISSUE-53: DataParser Interface (from msporny@digitalbazaar.com on 2011-01-02)
  2. Closing RDFa API issues (from msporny@digitalbazaar.com on 2011-01-01)
  3. Re: Telecon Agenda - December 2nd 2010, 1400 UTC (from benjamin.adrian@dfki.de on 2010-12-02)
  4. Telecon Agenda - December 2nd 2010, 1400 UTC (from msporny@digitalbazaar.com on 2010-11-30)
  5. Re: Telecon Agenda - November 25th 2010, 1400 UTC (from benjamin.adrian@dfki.de on 2010-11-25)
  6. Re: Telecon Agenda - November 25th 2010, 1400 UTC (from knud.moeller@deri.org on 2010-11-25)
  7. Telecon Agenda - November 25th 2010, 1400 UTC (from msporny@digitalbazaar.com on 2010-11-23)
  8. RDFa WG telecon minutes for 2010-11-18 (from msporny@digitalbazaar.com on 2010-11-18)
  9. Telecon Agenda - November 18th 2010, 1400 UTC (from msporny@digitalbazaar.com on 2010-11-16)
  10. Re: Telecon Agenda - November 11th 2010, 1400 UTC (from benjamin.adrian@dfki.de on 2010-11-11)
  11. Re: Telecon Agenda - November 11th 2010, 1400 UTC (from Steven.Pemberton@cwi.nl on 2010-11-11)
  12. Telecon Agenda - November 11th 2010, 1400 UTC (from msporny@digitalbazaar.com on 2010-11-07)
  13. Re: Telecon Agenda - November 4th 2010, 1400 UTC (from knud.moeller@deri.org on 2010-11-04)
  14. Re: Telecon Agenda - November 4th 2010, 1400 UTC (from knud.moeller@deri.org on 2010-11-04)
  15. Re: Telecon Agenda - November 4th 2010, 1400 UTC (from mark.birbeck@webbackplane.com on 2010-11-04)
  16. Re: Telecon Agenda - November 4th 2010, 1400 UTC (from nathan@webr3.org on 2010-11-01)
  17. Telecon Agenda - November 4th 2010, 1400 UTC (from msporny@digitalbazaar.com on 2010-11-01)
  18. RDFa API new Issues - summary (from nathan@webr3.org on 2010-10-28)
  19. ISSUE-53: DataParser Upgrades [RDFa 1.1 API] (from sysbot+tracker@w3.org on 2010-10-28)

Related notes:

proposed definition updated on 16:00 01/11/2010 (minor change)

Nathan Rixham, 1 Nov 2010, 16:08:03

[NoInterfaceObject]
[Constructor, Constructor(in DataContext context)]
interface DataParser
{
boolean parse (in any toparse, ParserCallback callback, in optional RDFTripleCallback filter, in optional RDFGraph graph);
boolean process (in any chunk, in DataProcessor processor, in optional RDFTripleCallback filter);
};

[NoInterfaceObject Callback]
interface DataProcessor
{
void process (RDFTriple triple);
};

[Callback]
interface ParserCallback {
void run(in RDFGraph graph);
};

Manu Sporny, 18 Nov 2010, 14:52:30

[Callback]
interface ParserCallback {
void run(in RDFGraph defaultGraph, in optional RDFGraph processorGraph);
};

Manu Sporny, 18 Nov 2010, 14:54:32

[Steven]: DataParser Upgrades http://www.w3.org/2010/02/rdfa/track/issues/53

18 Nov 2010, 15:08:11

Closing the issue after no objections to the latest PROPOSAL to close the issue.

Manu Sporny, 13 Jan 2011, 01:20:55

Display change log ATOM feed


Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 53.html,v 1.1 2015/03/27 14:12:24 vivien Exp $