本文整理汇总了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());
}