本文整理匯總了Java中org.apache.jena.rdf.model.Model.createProperty方法的典型用法代碼示例。如果您正苦於以下問題:Java Model.createProperty方法的具體用法?Java Model.createProperty怎麽用?Java Model.createProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.jena.rdf.model.Model
的用法示例。
在下文中一共展示了Model.createProperty方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: RelationshipType
import org.apache.jena.rdf.model.Model; //導入方法依賴的package包/類
protected RelationshipType(Model model, Resource resource, Resource inverseResource) {
super(model, resource);
property = model.createProperty(resource.getURI());
this.inverseResource = inverseResource;
if (inverseResource != null) this.inverseProperty = model.createProperty(inverseResource.getURI());
else inverseProperty = null;
}
示例2: main
import org.apache.jena.rdf.model.Model; //導入方法依賴的package包/類
public static void main(String[] args) {
try {
OEModelEndpoint endpoint = new OEModelEndpoint();
endpoint.setBaseUrl("http://localhost:8080/swoe");
endpoint.setModelIRI("model:myExample");
try (OEBatchClient client = new OEBatchClient(endpoint)) {
client.loadCurrentModelFromOE();
Model m = client.getPendingModel();
Property semGuid = m.createProperty("http://www.smartlogic.com/2014/08/semaphore-core#guid");
Resource r = m.createResource("http://myexample.com/Scheme4");
r.addProperty(RDF.type, SKOS.ConceptScheme);
r.addProperty(RDFS.label, "Test Scheme 4 (Test)");
r.addProperty(semGuid, UUID.randomUUID().toString());
Resource c = m.createResource("http://myexample.com/MyTestConcept1");
c.addProperty(RDF.type, SKOS.Concept);
c.addProperty(semGuid, UUID.randomUUID().toString());
Resource cl = m.createResource("http://myexample.com/MyTestConcept1_prefLabel_en");
cl.addProperty(SKOSXL.literalForm, "My Test Concept 1");
cl.addProperty(RDF.type, SKOSXL.Label);
c.addProperty(SKOSXL.prefLabel, cl);
r.addProperty(SKOS.hasTopConcept, c);
client.commit();
} finally {
}
} catch (Exception e) {
e.printStackTrace();
}
}
示例3: MetadataType
import org.apache.jena.rdf.model.Model; //導入方法依賴的package包/類
protected MetadataType(Model model, Resource resource) {
super(model, resource);
property = model.createProperty(resource.getURI());
}
示例4: rdf4jPropertyToJenaProperty
import org.apache.jena.rdf.model.Model; //導入方法依賴的package包/類
private Property rdf4jPropertyToJenaProperty(@NonNull Model jenaModel,
@NonNull SimpleIRI resource) {
return jenaModel.createProperty(resource.stringValue());
}