public SparqlBuilder with(String name, boolean value) { bindings.put(name, con.getValueFactory().createLiteral(value)); return this; }
public SparqlBuilder with(String name, short value) { bindings.put(name, con.getValueFactory().createLiteral(value)); return this; }
public SparqlBuilder with(String name, int value) { bindings.put(name, con.getValueFactory().createLiteral(value)); return this; }
public SparqlBuilder with(String name, double value) { bindings.put(name, con.getValueFactory().createLiteral(value)); return this; }
/** * Creates an object with assumed rdf:types. */ public RDFObject createObject(String uri, URI... types) { if (connection == null) throw new IllegalStateException("No ObjectConnection"); ValueFactory vf = connection.getValueFactory(); return createObject(vf.createURI(uri), types); }
/** * Creates an object with assumed rdf:types. */ public RDFObject createObject(String uri, Set<URI> types) { if (connection == null) throw new IllegalStateException("No ObjectConnection"); ValueFactory vf = connection.getValueFactory(); return createObject(vf.createURI(uri), types); }
/** * Creates an object with no rdf:type. */ public RDFObject createObject(String uri) { if (connection == null) throw new IllegalStateException("No ObjectConnection"); ValueFactory vf = connection.getValueFactory(); return createObject(vf.createURI(uri)); }
public <T> Result<T> getObjects(Class<T> concept, String... uris) throws RepositoryException, QueryEvaluationException { ValueFactory vf = getValueFactory(); Resource[] resources = new Resource[uris.length]; for (int i = 0; i < uris.length; i++) { resources[i] = vf.createURI(uris[i]); } return getObjects(concept, resources); }
public <T> Result<T> getObjects(Class<T> concept, String... uris) throws RepositoryException, QueryEvaluationException { ValueFactory vf = getValueFactory(); Resource[] resources = new Resource[uris.length]; for (int i = 0; i < uris.length; i++) { resources[i] = vf.createURI(uris[i]); } return getObjects(concept, resources); }
/** * Creates an object with assumed rdf:types. */ public RDFObject createObject(String uri, Set<URI> types) { ValueFactory vf = connection.getValueFactory(); return createObject(vf.createURI(uri), types); }
/** * Explicitly adds the type to the entity. * * @return the entity with new composed types */ public Object addDesignation(Object entity, String uri) throws RepositoryException { return addDesignations(entity, getValueFactory().createURI(uri)); }
/** * Explicitly removes the type from the entity. */ public void removeDesignation(Object entity, String uri) throws RepositoryException { removeDesignations(entity, getValueFactory().createURI(uri)); }
/** * Creates an object with no rdf:type. */ public RDFObject createObject(String uri) { ValueFactory vf = connection.getValueFactory(); return createObject(vf.createURI(uri)); }
/** * Loads a single Object by URI in String form. */ public Object getObject(String uri) throws RepositoryException { assert uri != null; return getObject(getValueFactory().createURI(uri)); }
/** * Loads a single Object that is assumed to be of the given concept. */ public <T> T getObject(Class<T> concept, String uri) throws RepositoryException, QueryEvaluationException { assert uri != null; return getObject(concept, getValueFactory().createURI(uri)); }
/** * Creates an object with assumed rdf:types. */ public RDFObject createObject(String uri, URI... types) { ValueFactory vf = connection.getValueFactory(); return createObject(vf.createURI(uri), types); }
/** * Explicitly removes the types from the entity. */ public void removeDesignations(Object entity, String... uris) throws RepositoryException { URI[] types = new URI[uris.length]; for (int i=0;i<uris.length;i++) { types[i] = getValueFactory().createURI(uris[i]); } removeDesignations(entity, types); }
/** * Loads a single Object by URI in String form. */ public Object getObject(String uri) throws RepositoryException { assert uri != null; return getObject(getValueFactory().createURI(uri)); }
/** * Creates an anonymous object with no rdf:type. */ public RDFObject createObject() { if (connection == null) throw new IllegalStateException("No ObjectConnection"); BNode node = connection.getValueFactory().createBNode(); return createBean(node, resolver.resolveBlankEntity()); }
/** * Creates an anonymous object with no rdf:type. */ public RDFObject createObject() { BNode node = connection.getValueFactory().createBNode(); return createBean(node, resolver.resolveBlankEntity()); }