Search in sources :

Example 51 with URI

use of org.openrdf.model.URI in project vcell by virtualcell.

the class MIRIAM method createProperty.

public static URI createProperty(Set<URI> all, String ns, String name) {
    URI property = schema.getValueFactory().createURI(ns + name);
    all.add(property);
    return property;
}
Also used : URI(org.openrdf.model.URI)

Example 52 with URI

use of org.openrdf.model.URI in project vcell by virtualcell.

the class OntUtil method createAnnotationProperty.

public static URI createAnnotationProperty(Graph model, String uri) {
    URI property = model.getValueFactory().createURI(uri);
    model.add(property, RDF.TYPE, OWL.ANNOTATIONPROPERTY);
    return property;
}
Also used : URI(org.openrdf.model.URI)

Example 53 with URI

use of org.openrdf.model.URI in project vcell by virtualcell.

the class OntUtil method createURIIndividual.

public static URI createURIIndividual(Graph model, String uri, Resource type) {
    URI individual = model.getValueFactory().createURI(uri);
    model.add(individual, RDF.TYPE, type);
    return individual;
}
Also used : URI(org.openrdf.model.URI)

Example 54 with URI

use of org.openrdf.model.URI in project vcell by virtualcell.

the class OntUtil method createObjectProperty.

public static URI createObjectProperty(Graph model, String uri) {
    URI property = model.getValueFactory().createURI(uri);
    model.add(property, RDF.TYPE, OWL.OBJECTPROPERTY);
    return property;
}
Also used : URI(org.openrdf.model.URI)

Example 55 with URI

use of org.openrdf.model.URI in project vcell by virtualcell.

the class VCMetaDataMiriamManager method addStoredCrossReferencedLink.

public void addStoredCrossReferencedLink(MiriamResource miriamResource, URL url) {
    ValueFactory valueFactory = vcMetaData.getRdfData().getValueFactory();
    URI resource = valueFactory.createURI(miriamResource.getMiriamURN());
    // TODO: fix this. literally translated from the Jena-based code, but not correct in
    // terms of MIRIAM
    vcMetaData.getRdfData().add(resource, MIRIAM.BioProperties.isDescribedBy, valueFactory.createLiteral(url.toString()));
}
Also used : ValueFactory(org.openrdf.model.ValueFactory) URI(org.openrdf.model.URI)

Aggregations

URI (org.openrdf.model.URI)111 Test (org.junit.Test)28 SailConnection (org.openrdf.sail.SailConnection)25 Value (org.openrdf.model.Value)22 Statement (org.openrdf.model.Statement)21 NotifyingSailConnection (org.openrdf.sail.NotifyingSailConnection)21 Resource (org.openrdf.model.Resource)20 Literal (org.openrdf.model.Literal)14 ValueFactory (org.openrdf.model.ValueFactory)12 RepositoryException (org.openrdf.repository.RepositoryException)11 SailException (org.openrdf.sail.SailException)10 ShineRuntimeException (com.thoughtworks.studios.shine.ShineRuntimeException)8 Vertex (com.tinkerpop.blueprints.Vertex)7 HashSet (java.util.HashSet)7 Representation (org.apache.stanbol.entityhub.servicesapi.model.Representation)7 Model (org.openrdf.model.Model)7 URIImpl (org.openrdf.model.impl.URIImpl)7 Edge (com.tinkerpop.blueprints.Edge)6 BNode (org.openrdf.model.BNode)6 QueryEvaluationException (org.openrdf.query.QueryEvaluationException)6