Talk:RDF2Go/Closed Issues
From semanticweb.org
[edit] Closed Issue: Diffs and ModelSet
ModelSet needs a method to apply a diff
- Solution: added update(Diff d) to ModelSetAddRemove
[edit] Closed Issue: iterator() for ModelSet
- Solution: added
[edit] Closed Issue: ModelSet semantics
We will stick to SPARQL dataset semantics.
[edit] Closed Issue: Node has too many functions of Literal.
Detail: Node has some functions that are only important for a literal or a resource. They should move.
- Solution: moved some methods from Node to Literal.
[edit] Closed Issue: Iterators instead of Iterable
- Max: Java 1.5 supports for (A x : Y) loops, we want to encourage using them
- Leo: Perhaps yes, because the implementation of Iterable does not do what you expect. We experienced, that CloseableIterators ARE NOT CLOSED.
- ** Max: this is maybe more an implementation then API design issue.
- Leo: Also, making try...finally statements is not so easy.
The use of ITerable interfaces for results of many operations is not common practice in any existing RDF API and makes it awkward to program for RDF trained programmers. Also, this is not the best practice to do here, operation results should be iterator, object such as "Model" can be iterable.
While running in the woods, I discovered another issue. Currently a QueryResultSet is merely a compiled query. You can execute it again and again, but there is no need to re-parse the query. If we would drop the QueryResultSet, we should introduce something like
Query q = model.createQuery( String sparqlquery, Syntax s ) throws MalformedQueryException; ClosableIterator<QueryRow> it = model.executeQuery( q ) throws ModelRuntimeException;
What do you think of this approach? Its similar to the Jena API, I think.
Solution: stick to Iterables for all SPARQL methods, change to Iterator for all other query methods
[edit] Closed Issue: Too many declard Exceptions
Every method of rdf2go throws an exception, making it awkward to program. We should switch some of them to RuntimeException subclasses that don'T have to be caught.
- Solution: Changed ModelException to ModelRuntimeExcepptions.
[edit] Closed Issue: Additional ContextModel implementation needed
Solution: dropped, instead made ModelSet better.
[edit] Closed Issue: Support for notifications
- pro: Leo would like to have support for notifcations
- idea: this could be implemented as an RDF2Go layer. Typical actions to listen for would be any triples added or removed as well as specific triples added or removed or even triple patterns matching added or removed triples.
Solution: added to API
[edit] Closed Issue: Valid URIs? Can RDF2Go check valid URIs?
- con: that's adapter dependent - we can not make generals assumptions what is a valid URI
- con: the sesame guys said validating URIs made everything much slower.
Currently each model has a "isValidURI" method, which is supposed to be able to check. The default impl always returns true.
[edit] Closed Issue: We should write a schema-generator for rdf2go - unless this already exists?
URI Person = m.createURI("http://xmlns.com/foaf/0.1/Person");
URI knows = m.createURI("http://xmlns.com/foaf/0.1/knows");
URI name = m.createURI("http://xmlns.com/foaf/0.1/name");
URI age = m.createURI("http://xmlns.com/foaf/0.1/age");
Max: use RDFReactor and then say "Person.KNOWS" to use the property
with domain Person and name "knows"
Leo: there exists a schema generator, its part of aperture.sourceforge.net. Take it if you need it.
If you want more, use RDFReactor and generate domain-specific classes. Runs in top of RDF2Go.
ACTION: VocabularyWriter from Aperture has been added to RDF2Go and adapted to API.
[edit] Closed Issue: I would also like a "String m.serialize()" method - that doesn't require me to use a StringWriter...
- Idea: what about a util class for this?
- ACTION: added to model and modelset. Implemented in AbstractModel and AbstractModelSet.
