Closed johnss closed 5 years ago
https://github.com/semsol/arc2/pull/102 doesn't mention anything about named graph https://en.m.wikipedia.org/wiki/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.
@bnowack I know it can extend triple but I'm not sure it will become 4 statement or 5 statement @k00ni will it become 4 statement or 5 statement
I want the graph to be (subject-predicate-object)-context
I don't want to become subject-predicate-(subject–predicate–object)
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- identified graphs?
Triples added to URI- identified graphs will become 5 node, while true named graph are 4 node, I assume no as Its just a query translator, there's no way to differentiate between named graph or triple added to graph URI
identified graphs will become 5 node, while true named graph are 4 node, I assume no as Its just a query translator, there's no way to differentiate between named graph or triple added to graph 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) And triple that link to book1 as object BookStore (subject) -> Have (predicate) -> [Book1 (subject) -> title (predicate) -> example book title (object)]
A true named graph doesn't need the predicate relation and will look like this BookStore (context) -> [Book1 (subject) -> title (predicate) -> example book title (object)]
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