Search in sources :

Example 6 with RdfRepresentation

use of org.apache.stanbol.entityhub.model.sesame.RdfRepresentation in project stanbol by apache.

the class RdfIndexingSource method createRepresentationGraph.

/**
     * Extracts the triples that belong to the {@link Representation} with the
     * parsed id from the Sesame repository.
     * @param con the repository connection
     * @param uri the subject of the Representation to extract
     * @return the representation with the extracted data.
     * @throws RepositoryException 
     */
protected RdfRepresentation createRepresentationGraph(RepositoryConnection con, org.openrdf.model.URI uri) throws RepositoryException {
    RdfRepresentation rep = vf.createRdfRepresentation(uri);
    Model model = rep.getModel();
    extractRepresentation(con, model, uri, followBNodeState ? new HashSet<BNode>() : null);
    return rep;
}
Also used : RdfRepresentation(org.apache.stanbol.entityhub.model.sesame.RdfRepresentation) Model(org.openrdf.model.Model) HashSet(java.util.HashSet)

Aggregations

RdfRepresentation (org.apache.stanbol.entityhub.model.sesame.RdfRepresentation)6 Model (org.openrdf.model.Model)4 Representation (org.apache.stanbol.entityhub.servicesapi.model.Representation)3 URI (org.openrdf.model.URI)3 BNode (org.openrdf.model.BNode)2 TreeModel (org.openrdf.model.impl.TreeModel)2 RepositoryConnection (org.openrdf.repository.RepositoryConnection)2 HashSet (java.util.HashSet)1 RdfValueFactory (org.apache.stanbol.entityhub.model.sesame.RdfValueFactory)1 SparqlFieldQuery (org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery)1 Yard (org.apache.stanbol.entityhub.servicesapi.yard.Yard)1 YardException (org.apache.stanbol.entityhub.servicesapi.yard.YardException)1 YardTest (org.apache.stanbol.entityhub.test.yard.YardTest)1 SesameYard (org.apache.stanbol.entityhub.yard.sesame.SesameYard)1 Test (org.junit.Test)1 Value (org.openrdf.model.Value)1 BindingSet (org.openrdf.query.BindingSet)1 QueryEvaluationException (org.openrdf.query.QueryEvaluationException)1 TupleQueryResult (org.openrdf.query.TupleQueryResult)1 RepositoryException (org.openrdf.repository.RepositoryException)1