Package org.data2semantics.tools.rdf

Examples of org.data2semantics.tools.rdf.RDFSingleDataSet


    //---------


    // As one RDF graph dataset
    List<List<Statement>> rdfTriples2 = createMoleculeRDFGraphs(graphs, false);
    RDFDataSet ts = new RDFSingleDataSet();
    for (List<Statement> trips : rdfTriples2) {
      ts.addStatements(trips);
    }

    List<Resource> instances = new ArrayList<Resource>();

    List<Statement> stmts = ts.getStatementsFromStrings(null, RDF.TYPE.stringValue(), GraphUtils.NAMESPACE + "Molecule");
    for (Statement stmt : stmts) {
      instances.add(stmt.getSubject());
    }

    // Data graph
    DTGraph<String,String> sGraph = org.nodes.data.RDF.createDirectedGraph(ts.getStatements(null, null, null, false), null, null);

    //---------
    // Results Table
    ResultsTable resTable = new ResultsTable();
    resTable.setDigits(3);
View Full Code Here


    //*/


    // As one RDF graph dataset
    List<List<Statement>> rdfTriples2 = createMoleculeRDFGraphs(graphs, false);
    RDFDataSet ts = new RDFSingleDataSet();
    for (List<Statement> trips : rdfTriples2) {
      ts.addStatements(trips);
    }

    List<Resource> instances = new ArrayList<Resource>();

    List<Statement> is = ts.getStatementsFromStrings(null, RDF.TYPE.stringValue(), GraphUtils.NAMESPACE + "Molecule");
    for (Statement stmt : is) {
      instances.add(stmt.getSubject());
    }


    DTGraph<String,String> sGraph = org.nodes.data.RDF.createDirectedGraph(ts.getStatements(null, null, null, false), null, null);
    List<DTNode<String,String>> hubs = SlashBurn.getHubs(sGraph, 2, true);
    // (int) Math.round(0.05 * sGraph.nodes().size())
   
 
    Comparator<Node<String>> comp2 = new DegreeComparator<String>();
View Full Code Here

      File rdfFile,
      RDFFormat format,
      List<String> vWhiteList,
      List<String> eWhiteList)
  {   
    RDFSingleDataSet testSet = new RDFFileDataSet(rdfFile, format);

    //org.openrdf.model.Graph triples = testSet.getStatements(null, "http://swrc.ontoware.org/ontology#affiliation", null, true);
    List<Statement> triples = testSet.getFullGraph();
     
    DirectedGraph<Vertex<String>, Edge<String>> jungGraph = GraphFactory.createDirectedGraph(triples, vWhiteList, eWhiteList);
       
    return jungGraph;
  }
View Full Code Here

TOP

Related Classes of org.data2semantics.tools.rdf.RDFSingleDataSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.