Package org.apache.stanbol.entityhub.model.sesame

Examples of org.apache.stanbol.entityhub.model.sesame.RdfRepresentation


     * @param uri the subject of the Representation to extract
     * @return the representation with the extracted data.
     * @throws RepositoryException
     */
    protected RdfRepresentation createRepresentationGraph(RepositoryConnection con, RdfValueFactory valueFactory, URI uri) throws RepositoryException{
        RdfRepresentation rep = valueFactory.createRdfRepresentation(uri);
        Model model = rep.getModel();
        extractRepresentation(con, model, uri, new HashSet<BNode>());
        return rep;
    }
View Full Code Here


            } else {
                return null;
            }
        }
        //get the graph for the Representation and add it to the store
        RdfRepresentation toAdd = valueFactory.toRdfRepresentation(representation);
        if(toAdd.getModel().isEmpty()){
            con.add(toAdd.getURI(),managedRepresentation,managedRepresentationState, contexts);
        } else {
            con.add(toAdd.getModel(), contexts);
        }
        return toAdd;
    }
View Full Code Here

            while(results.hasNext()){
                BindingSet result = results.next();
                Value value = result.getValue(query.getRootVariableName());
                if(value instanceof URI){
                    //copy all data to the model and create the representation
                    RdfRepresentation rep = createRepresentationGraph(con, valueFactory, (URI)value);
                    model.add(queryRoot, queryResult, value); //link the result with the query result
                    representations.add(rep);
                } //ignore non URI results
            }
            con.commit();
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.model.sesame.RdfRepresentation

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.