RE: [Sparql4j-devel] Integration of external RDF APIs via Factory
Status: Pre-Alpha
Brought to you by:
jsaarela
From: Seaborne, A. <and...@hp...> - 2006-01-03 13:49:47
|
Hi Timo, -------- Original Message -------- > From: Timo Westkamper <> > Date: 22 December 2005 15:00 >=20 > Hello. >=20 > Concerning SELECT results access it would be possible to plug RDF apis > into the driver via a factory interface.=20 >=20 > We could provide a neutral SPARQL4J dependent minimal RDF API and in > addition to this the possibility to plug external APIs into the driver.=20 Sounds like a good idea. Overall the interface looks OK - a few minor comments. >=20 > RDF nodes (or any other objects returned by the factory) could be > accessed via the umtyped accessors of the JDBC result set.=20 >=20 > e.g. >=20 > interface NodeFactory{ >=20 > public Object createLiteral(String lex, String lang, String datatype); Minor: as lang and datatype can't both be set: createTypedLiteral(String lex, String datatype); createPlainLiteral(String lex, String lang); is possible. As an internal factory API, it isn't significant - you're one-call version is fine. >=20 > public Object createResource(String uri); >=20 > public Object createResource(String ns, String local); Not sure about this one. Namespaces are purely syntactic in RDF and the XML Result format does not provide them. Did you have a specific usage in mind? Wouldn't only an RDF/XML format results need this and then it is a matter of a ful RDF parser anyway? >=20 > public Object createBlankNode(String internalID); >=20 > } One observation - RDF resources covers all graph labels (URI, blank nodes and literals). There isn't an official term for a URI labeled node or arc so your naming is probably as good as it gets. Andy >=20 > The name of the implementation class could be given to the Driver via > the property map.=20 >=20 > Br, > Timo. >=20 |