Can I refer to a triple in another triple in virtuoso?

Hi

I need to refer to triples in order to add sources to statements. Is it something that is possible with Virtuoso ?

url:TripleID1 = url:Cannabidiol url:hasPositiveEffectOn url:ChronicPain
url:TripleID2 = url:TripleID1 url:isSupportedBy url:Study1
url:TripleID3 = url:TripleID1 url:isSupportedBy url:Study2
url:TripleID4 = url:TripleID1 url:isNotSupportedBy url:Study3

Thanks

Virtuoso is a Quad Store (re RDF Data Management functionality) which implies triples are grouped by Named Graphs which are unambiguously identified by their own IRIs.

A Typical SPARQL Query that refers to Relations (represented as Triples) across Named Graphs would have something like the following in its body:

{
   GRAPH <g1>  {<#thisThing> <#someRelation> <#thatThing> . }
   GRAPH <g2> {<#thisThing> <#someOtherRelation> <#someOtherThing> . }
}

Net effect, you’ve created a broader description of <#thisThing> by combing relations from Named Graphs <g1> and <g2> .

In addition, SPARQL INSERT does let you apply the following operations to Named Graphs:
COPY, MOVE, ADD etc…

What you’re trying to achieve can also be achieved by using rdf:subject, rdf:predicate, and rdf:object properties to map out each statement, as a “triple in another triple”.

Ex:

url:TripleID1
a rdf:Statement;
rdf:subject url:Cannabidiol;
rdf:predicate url:hasPositiveEffectOn;
rdf:object url:ChronicPain.

url:TripleID2
a rdf:Statement;
rdf:subject url:TripleID1;
rdf:predicate url:isSupportedBy;
rdf:object url:Study1.

Live Example Links:

{
GRAPH url:TripleNamedGraph1 { url:Cannabidiol url:hasPositiveEffectOn url:ChronicPain } .
GRAPH url:TripleNamedGraph2 {?s1 url:isSupportedBy url:Study1 } .
GRAPH url:TripleNamedGraph3 {?s1 url:isSupportedBy url:Study2 } .
GRAPH url:TripleNamedGraph4 { ?s1 url:isNotSupportedBy url:Study3 } .
}

A SPARQL Named Graph is a Data Source Name i.e., a Document Identifier.
Sentences/Statements reside in Documents. That’s where they go to rest. Ditto that’s where they are accessed from for processing e.g., via a SPARQL Query Processor that supports Named Graphs.

Example

DESCRIBE ?s1
FROM NAMED GRAPH url:TripleID1
FROM NAMED GRAPH url:TripleID2
FROM NAMED GRAPH url:TripleID3
FROM NAMED GRAPH url:TripleID4
WHERE
{
   GRAPH url:TripleNamedGraph1 { url:Cannabidiol url:hasPositiveEffectOn url:ChronicPain } .
   GRAPH url:TripleNamedGraph2 {?s1 url:isSupportedBy url:Study1 } .
   GRAPH url:TripleNamedGraph3 {?s1 url:isSupportedBy url:Study2 } .
  GRAPH url:TripleNamedGraph4 { ?s1 url:isNotSupportedBy url:Study3 } .
  FILTER (?s1 = url:Cannabidiol) 
}