On 08/12/13 06:54, Osma Suominen wrote:
Hi Andy!
07.12.2013 23:13, Andy Seaborne wrote:
Comments? Any chances of getting this merged?
Tests! Excellent!
Did you mean that it's excellent that I had a sort of manual test
procedure embedded in my message, or was this a reminder to write unit
tests as well? :)
That there was material under src/test/java at all. Not all patches
have tests :-(
Anyway, I can try to write some unit tests for the code. I already
modified the existing tests so they don't break due to the new argument
EntityDefinition constructors now take.
To make sure it does not get lost:
https://issues.apache.org/jira/browse/JENA-605
and added the files from your email.
Great!
Looks good - a couple of small questions:
1/ Blank node graphs - how about using the pseudo URI _:label rather
than use g.getBlankNodeLabel()?
So you mean
String graph = (g.isURI() ) ? g.getURI() : "_:" +
g.getBlankNodeLabel() ;
instead of the current
String graph = (g.isURI() ) ? g.getURI() : g.getBlankNodeLabel() ;
or did I misunderstand?
yes - that should do it if it isn't in the code anywhere else as well.
I don't think I've tested this code at all with blank node graphs, I
just copied the approach used for entity URIs on the preceding line,
assuming it would work the same for graphs.
How can I create a blank node graph with Fuseki? I've usually just put
data into named graphs using s-put, but that requires an explicit graph
URI. Or do I have to test this from Java code?
Upload a TriG file with bnode-labeled graphs.
The java code is behind the curve - Graph/Node level works, the
Dataset/Resource API does not allow the creation of bNode labeled graphs.
2/ Did I get it right that the default graph is
Quad.defaultGraphNodeGenerated? Maybe
In my tests the default graph seems to have the URI
"urn:x-arq:DefaultGraph", so it's probably this one from Quad.java:
public static final Node defaultGraphIRI =
NodeFactory.createURI("urn:x-arq:DefaultGraph") ;
Since it's just another URI to the index, indexing works fine here as
well. Though it would make sense to add a unit test for indexing the
default graph just in case.
How much of the documentation needs to change? Just another section?
Basically it's just another section for the text-query.html page. Also
the the Configuration by Code section currently shows how to use
EntityDefinition, it needs to be updated with the new constructor argument.
Where is the documentation kept? Do you take documentation patches as
well or what is the preferred way of contributing to the docs?
It's in SVN
http://svn.apache.org/repos/asf/jena/site/trunk/content/documentation/query/text-query.mdtext
so via patches. (I can't remember if the Apache CMS copes with anon
editing and turns it in to patch. I may be imaging that.)
Andy
-Osma