本文整理汇总了Java中org.apache.jena.ontology.OntModel.getOntClass方法的典型用法代码示例。如果您正苦于以下问题:Java OntModel.getOntClass方法的具体用法?Java OntModel.getOntClass怎么用?Java OntModel.getOntClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jena.ontology.OntModel
的用法示例。
在下文中一共展示了OntModel.getOntClass方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadCnt
import org.apache.jena.ontology.OntModel; //导入方法依赖的package包/类
private void loadCnt() {
if (cnt != null) {
return;
}
OntModel ontModel = loadOntologyFromClasspath("content.owl", CNT);
bytes = ontModel.getDatatypeProperty(CNT + "bytes");
chars = ontModel.getDatatypeProperty(CNT + "chars");
characterEncoding = ontModel.getDatatypeProperty(CNT + "characterEncoding");
ContentAsText = ontModel.getOntClass(CNT + "ContentAsText");
ContentAsBase64 = ontModel.getOntClass(CNT + "ContentAsBase64");
checkNotNull(ontModel, bytes, chars, characterEncoding, ContentAsText, ContentAsBase64);
cnt = ontModel;
}
示例2: loadTavernaProv
import org.apache.jena.ontology.OntModel; //导入方法依赖的package包/类
protected synchronized void loadTavernaProv() {
if (tavernaProv != null) {
return;
}
OntModel ontModel = loadOntologyFromClasspath(TAVERNAPROV_TTL, TAVERNAPROV);
content = ontModel.getObjectProperty(TAVERNAPROV + "content");
byteCount = ontModel.getDatatypeProperty(TAVERNAPROV + "byteCount");
sha1 = ontModel.getDatatypeProperty(TAVERNAPROV + "sha1");
sha512 = ontModel.getDatatypeProperty(TAVERNAPROV + "sha512");
stackTrace = ontModel.getDatatypeProperty(TAVERNAPROV + "stackTrace");
errorMessage = ontModel.getDatatypeProperty(TAVERNAPROV + "errorMessage");
Content = ontModel.getOntClass(TAVERNAPROV + "Content");
Error = ontModel.getOntClass(TAVERNAPROV + "Error");
TavernaEngine = ontModel.getOntClass(TAVERNAPROV + "TavernaEngine");
checkNotNull(ontModel, content, Content, byteCount,sha1, sha512, stackTrace, errorMessage, Content, Error, TavernaEngine);
tavernaProv = ontModel;
}
示例3: loadProvDictionary
import org.apache.jena.ontology.OntModel; //导入方法依赖的package包/类
protected synchronized void loadProvDictionary() {
if (provDict != null) {
return;
}
OntModel ontModel = loadOntologyFromClasspath(PROV_DICTIONARY_TTL,
PROV_DICTIONARY);
hadDictionaryMember = ontModel.getObjectProperty(PROV
+ "hadDictionaryMember");
pairEntity = ontModel.getObjectProperty(PROV + "pairEntity");
pairKey = ontModel.getDatatypeProperty(PROV + "pairKey");
Dictionary = ontModel.getOntClass(PROV + "Dictionary");
EmptyDictionary = ontModel.getOntClass(PROV + "EmptyDictionary");
KeyEntityPair = ontModel.getOntClass(PROV + "KeyEntityPair");
checkNotNull(ontModel, hadDictionaryMember, pairEntity, pairKey,
Dictionary, EmptyDictionary, KeyEntityPair);
provDict = ontModel;
}
示例4: loadWfDesc
import org.apache.jena.ontology.OntModel; //导入方法依赖的package包/类
protected synchronized void loadWfDesc() {
if (wfdesc != null) {
return;
}
OntModel ontModel = loadOntologyFromClasspath(WFDESC_OWL, WFDESC);
hasSubProcess = ontModel.getObjectProperty(WFDESC + "hasSubProcess");
Input = ontModel.getOntClass(WFDESC + "Input");
// Input.addSuperClass(Role);
Output = ontModel.getOntClass(WFDESC + "Output");
// Output.addSuperClass(Role);
Process = ontModel.getOntClass(WFDESC + "Process");
Workflow = ontModel.getOntClass(WFDESC + "Workflow");
checkNotNull(ontModel, hasSubProcess, Process, Workflow, Input, Output);
wfdesc = ontModel;
}
示例5: loadDCT
import org.apache.jena.ontology.OntModel; //导入方法依赖的package包/类
protected synchronized void loadDCT() {
if (dct != null)
return;
OntModel ontModel = loadOntologyFromClasspath(
"/ontologies/dcterms_od.owl",
"http://purl.org/wf4ever/dcterms_od");
// properties from dct
standard = ontModel.getOntClass(DCT + "Standard");
conformsTo = ontModel.getObjectProperty(DCT + "conformsTo");
// We'll cheat dc:format in
format = ontModel
.createDatatypeProperty("http://purl.org/dc/elements/1.1/"
+ "format");
checkNotNull(standard, conformsTo, format);
dct = ontModel;
}
示例6: loadORE
import org.apache.jena.ontology.OntModel; //导入方法依赖的package包/类
protected synchronized void loadORE() {
if (ore != null)
return;
OntModel ontModel = loadOntologyFromClasspath(
"/ontologies/ore-owl.owl", "http://purl.org/wf4ever/ore-owl");
aggregation = ontModel.getOntClass(ORE + "Aggregation");
aggregates = ontModel.getObjectProperty(ORE + "aggregates");
proxyFor = ontModel.getObjectProperty(ORE + "proxyFor");
proxyIn = ontModel.getObjectProperty(ORE + "proxyIn");
isDescribedBy = ontModel.getObjectProperty(ORE + "isDescribedBy");
checkNotNull(aggregation, aggregates, proxyFor, proxyIn, isDescribedBy);
ore = ontModel;
}
示例7: loadWfprov
import org.apache.jena.ontology.OntModel; //导入方法依赖的package包/类
protected synchronized void loadWfprov() {
if (wfprov != null) {
return;
}
OntModel ontModel = loadOntologyFromClasspath(WFPROV_OWL, WFPROV);
wasEnactedBy = ontModel.getObjectProperty(WFPROV + "wasEnactedBy");
// wasEnactedBy.addSuperProperty(wasAssociatedWith);
describedByWorkflow = ontModel.getObjectProperty(WFPROV + "describedByWorkflow");
describedByProcess = ontModel.getObjectProperty(WFPROV + "describedByProcess");
describedByParameter = ontModel.getObjectProperty(WFPROV + "describedByParameter");
usedInput = ontModel.getObjectProperty(WFPROV + "usedInput");
wasOutputFrom = ontModel.getObjectProperty(WFPROV + "wasOutputFrom");
wasPartOfWorkflowRun = ontModel.getObjectProperty(WFPROV + "wasPartOfWorkflowRun");
// wasPartOfWorkflowRun.addSuperProperty(hasPart);
Artifact = ontModel.getOntClass(WFPROV + "Artifact");
// Artifact.addSuperClass(Entity);
ProcessRun = ontModel.getOntClass(WFPROV + "ProcessRun");
// ProcessRun.addSuperClass(Activity);
WorkflowRun = ontModel.getOntClass(WFPROV + "WorkflowRun");
checkNotNull(ontModel, wasEnactedBy, describedByWorkflow, describedByProcess,
describedByParameter,
wasPartOfWorkflowRun, usedInput, wasOutputFrom,
Artifact, ProcessRun, WorkflowRun);
wfprov = ontModel;
}
示例8: getClass
import org.apache.jena.ontology.OntModel; //导入方法依赖的package包/类
public OntClass getClass(String className) {
try {
for (Ontology ontology : getProfileDocument().getOntology()) {
OntModel ontModel = getOntology(ontology.getId());
if (ontModel != null) {
OntClass result = ontModel.getOntClass(className);
if (result != null)
return result;
}
}
} catch (ComponentException e) {
}
return null;
}
示例9: loadPROVO
import org.apache.jena.ontology.OntModel; //导入方法依赖的package包/类
protected synchronized void loadPROVO() {
if (prov != null) {
return;
}
OntModel ontModel = loadOntologyFromClasspath(PROV_O_RDF, PROV_O);
ontModel.setNsPrefix("prov", PROV_O);
wasDerivedFrom = ontModel.getObjectProperty(PROV + "wasDerivedFrom");
wasAssociatedWith = ontModel.getObjectProperty(PROV
+ "wasAssociatedWith");
qualifiedAssociation = ontModel.getObjectProperty(PROV
+ "qualifiedAssociation");
wasGeneratedBy = ontModel.getObjectProperty(PROV + "wasGeneratedBy");
qualifiedGeneration = ontModel.getObjectProperty(PROV
+ "qualifiedGeneration");
used = ontModel.getObjectProperty(PROV + "used");
qualifiedUsage = ontModel.getObjectProperty(PROV + "qualifiedUsage");
wasInformedBy = ontModel.getObjectProperty(PROV + "wasInformedBy");
qualifiedCommunication = ontModel.getObjectProperty(PROV
+ "qualifiedCommunication");
qualifiedStart = ontModel.getObjectProperty(PROV + "qualifiedStart");
qualifiedEnd = ontModel.getObjectProperty(PROV + "qualifiedEnd");
hadMember = ontModel.getObjectProperty(PROV + "hadMember");
agent = ontModel.getObjectProperty(PROV + "agent");
entity = ontModel.getObjectProperty(PROV + "entity");
activity = ontModel.getObjectProperty(PROV + "activity");
hadPlan = ontModel.getObjectProperty(PROV + "hadPlan");
hadRole = ontModel.getObjectProperty(PROV + "hadRole");
startedAtTime = ontModel.getDatatypeProperty(PROV + "startedAtTime");
endedAtTime = ontModel.getDatatypeProperty(PROV + "endedAtTime");
atTime = ontModel.getDatatypeProperty(PROV + "atTime");
Bundle = ontModel.getOntClass(PROV + "Bundle");
Entity = ontModel.getOntClass(PROV + "Entity");
Activity = ontModel.getOntClass(PROV + "Activity");
Start = ontModel.getOntClass(PROV + "Start");
End = ontModel.getOntClass(PROV + "End");
Association = ontModel.getOntClass(PROV + "Association");
Plan = ontModel.getOntClass(PROV + "Plan");
Role = ontModel.getOntClass(PROV + "Role");
Generation = ontModel.getOntClass(PROV + "Generation");
Usage = ontModel.getOntClass(PROV + "Usage");
Communication = ontModel.getOntClass(PROV + "Communication");
Collection = ontModel.getOntClass(PROV + "Collection");
EmptyCollection = ontModel.getOntClass(PROV + "EmptyCollection");
checkNotNull(ontModel, wasDerivedFrom, wasAssociatedWith,
qualifiedAssociation, wasGeneratedBy, qualifiedGeneration,
used, qualifiedUsage, wasInformedBy, qualifiedCommunication,
agent, entity, activity, hadPlan, hadMember, hadRole,
startedAtTime, endedAtTime, atTime, qualifiedStart,
qualifiedEnd,
Bundle, Entity, Activity, Association, Plan, Role, Generation,
Usage, Communication, Start, End, Collection, EmptyCollection);
prov = ontModel;
}