-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Named Graph and SPARUL #103
Comments
#102 doesn't mention anything about named graph |
Does https://github.com/semsol/arc2/wiki/SPARQL- help? ARC2 does not distinguish graphs from named graphs, and the syntax may be out of date, but it is possible to add triples to URI-identified graphs. |
Hi, ARC2 uses a SPARQL syntax which is similar to SPARUL. More information about that in the wiki. I am the maintainer of Saft, which integrates ARC2. It transforms SPARUL queries such as: DELETE WHERE {
Graph <http://localhost/Saft/TestGraph/> {
?s ?p ?o .
}
} to queries which ARC2 understands, like: DELETE FROM <http://localhost/Saft/TestGraph/> {
?s ?p ?o .
}
WHERE {
?s ?p ?o .
} Maybe it helps. |
Btw. #102 was not about adding new functionality, but to provide a set of tests, checking that a feature is there or missing. |
Can you paste some example code? I can't follow you, i am afraid. |
My project is i want to create site like wikidata, I don't have a code example as I will probably use php method directly and not using SPARQL. My question is how your plug in distinguish between named graph or triples added to URI- Triples added to URI- |
What do you mean by "become 5 node"? ARC2 only knows graphs (with their URI), regardless if named or not in the first place. They are not added as triples, if that is what you meant. If you are not using SPARQL, how would like to "query" the data? Maybe you want something like this or that? |
I already know that arc2 store it several different table, the values of triple stored it in id2val,s2val,o2val, a triples table that link that 3 table together, I don't know what exactly G2T table is used for but I think its used for nesting triple. Example for 5 node is Book1 (subject) -> title (predicate) -> example book title (object) A true named graph doesn't need the predicate relation and will look like this The ResourceGuy & Helper and the unit test look the same to me, can you explain the differences? |
@johnss: ResourceGuy basically represents a sub graph, starting by a certain resource. You can access nodes and edges via array-access, like: $guy = new ResourceGuy();
$anotherGuy = new ResourceGuy();
// storing
$guy['foaf:name'] = $nodeFactory->createLiteral('Mister X');
$guy['foaf:knows'] = $anotherGuy; // ResourceGuy
// getting
$guy['foaf:name'] = $nodeFactory->createLiteral('Mister X');
echo $guy['foaf:name'];
// set and get URI of the ResourceGuy instance
$guy['_idUri'] = $nodeFactory->createNamedNode('http://uri/');
echo $guy['_idUri']->getUri(); // will output a string ResourceGuyHelper makes it easier to get/create these subgraphs. For instance get all resources of a certain RDF type. |
Can this issue be closed? |
Does this this library support Named graph SPARQL 1.1 Update
?
https://en.m.wikipedia.org/wiki/SPARUL
The text was updated successfully, but these errors were encountered: