-
Notifications
You must be signed in to change notification settings - Fork 3
Deriving a VoID Linkset view of an SPO Balance
Tim L edited this page Jul 11, 2013
·
12 revisions
- Vocabulary of Interlinked Data: http://www.w3.org/TR/void
- SPO Balance
This page describes how to compute a VoID Linkset description of the Named Graphs summarized by SPO Balance.
- VoID Linkset views can be arranged using Centrifuge graph layout algorithm.
VoIDLinksetsFromSPOBalance.java uses ResourcesInSPOBalanceNamedGraphs.java (which implements linksets-from-bal.rq)
ResourcesInSPOBalanceNamedGraphs querylet = new ResourcesInSPOBalanceNamedGraphs(null, pmap);
QueryletProcessor.processQuery(this.specimenRepository, querylet);
for( Resource dataset : querylet.get().keySet() ) {
conn.add(dataset, RDF.type, VoID.DATASET, reportR);
for( Resource dataset2 : querylet.get().keySet() ) {
conn.add(dataset2, RDF.type, VoID.DATASET, reportR);
if( !dataset2.equals(dataset) ) {
Set<URI> intersection = new HashSet<URI>();
intersection.addAll( querylet.get().get(dataset));
intersection.retainAll(querylet.get().get(dataset2));
if( intersection.size() > 1 ) {
Resource linkset = vf.createBNode();
conn.add(dataset, VoID.subset, linkset, reportR);
conn.add(linkset, RDF.type, VoID.Linkset, reportR);
conn.add(linkset, VoID.target, dataset, reportR);
conn.add(linkset, VoID.target, dataset2, reportR);
conn.add(linkset, VoID.triples, vf.createLiteral(intersection.size()), reportR);
}
}
}
conn.commit();
}
produces:
<.../http_ieeevis_tw_rpi_edu_lam-2012-evaluations-2-categories/spo>
void:subset [
void:target <.../http_ieeevis_tw_rpi_edu_lam-2012-evaluations-2-categories/spo>,
<.../http_ieeevis_tw_rpi_edu_source_ieeevis-tw-rpi-edu_dataset_vsr-semantic-graphic-search_version_2013-Apr-02_ac4615b3ef1eed5c66fe07f3b10d66f8/spo> ;
void:triples "1152"^^xsd:int ;
a void:Linkset
], [
void:target <.../http_ieeevis_tw_rpi_edu_lam-2012-evaluations-2-categories/spo>,
<.../http_ieeevis_tw_rpi_edu_source_datahub_io_dataset_vis-evaluation-methods-in-2005-2007-infovis-and-2006-2007-vast-papers_version_2013-Mar-22/spo> ;
void:triples "114"^^xsd:int ;
a void:Linkset
],
- VoID Linkset information can be Centrifuged to get a graph layout.