本文整理汇总了Java中com.hp.hpl.jena.ontology.OntProperty.listSuperProperties方法的典型用法代码示例。如果您正苦于以下问题:Java OntProperty.listSuperProperties方法的具体用法?Java OntProperty.listSuperProperties怎么用?Java OntProperty.listSuperProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hp.hpl.jena.ontology.OntProperty
的用法示例。
在下文中一共展示了OntProperty.listSuperProperties方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkObjectPropertyRange
import com.hp.hpl.jena.ontology.OntProperty; //导入方法依赖的package包/类
public boolean checkObjectPropertyRange(OntModel theJenaModel2, OntProperty pred, OntResource obj, boolean isList, EObject expr) throws CircularDependencyException {
if (pred.isObjectProperty()) {
if (checkRangeForMatch(theJenaModel2, pred, obj, isList)) {
return true;
}
ExtendedIterator<? extends OntProperty> propitr = pred.listSuperProperties(false);
while (propitr.hasNext()) {
OntProperty sprop = propitr.next();
if (checkRangeForMatch(theJenaModel2, sprop, obj, isList)) {
propitr.close();
return true;
}
}
return false;
}
return true;
}
示例2: validateClassInDomain
import com.hp.hpl.jena.ontology.OntProperty; //导入方法依赖的package包/类
public boolean validateClassInDomain(NamedNode pred, NamedNode domainClass) {
if (beginDeepValidation()) {
OntProperty prop = getJenaModel().getOntProperty(
pred.toFullyQualifiedString());
if (prop != null) {
OntResource dr = prop.getDomain();
OntClass dcls = getJenaModel().getOntClass(
domainClass.toFullyQualifiedString());
if (dcls != null) {
if (dr == null) {
ExtendedIterator<? extends OntProperty> spitr = prop.listSuperProperties();
while (spitr.hasNext()) {
OntProperty sprop = spitr.next();
dr = sprop.getDomain();
if (dr != null) {
if (classIsSubclassOf(dcls, dr, true)) {
spitr.close();
endDeepValidation();
return true;
}
}
}
spitr.close();
}
else {
boolean bresult = classIsSubclassOf(dcls, dr, true); // dr.as(OntClass.class), dcls);
endDeepValidation();
return bresult;
}
}
}
}
return true; // annotation properties aren't OntProperties
}
示例3: validateClassInRange
import com.hp.hpl.jena.ontology.OntProperty; //导入方法依赖的package包/类
public boolean validateClassInRange(NamedNode pred, NamedNode rangeClass) {
if (beginDeepValidation()) {
OntProperty prop = getJenaModel().getOntProperty(
pred.toFullyQualifiedString());
if (prop != null && prop.isObjectProperty()) {
OntResource rr = prop.getRange();
OntClass rcls = getJenaModel().getOntClass(
rangeClass.toFullyQualifiedString());
if (rcls != null) {
if (rr == null) {
ExtendedIterator<? extends OntProperty> spitr = prop.listSuperProperties();
while (spitr.hasNext()) {
OntProperty sprop = spitr.next();
rr = sprop.getDomain();
if (rr != null) {
if (classIsSubclassOf(rcls, rr, true)) {
spitr.close();
endDeepValidation();
return true;
}
}
}
spitr.close();
}
else {
boolean breturn = classIsSubclassOf(rcls, rr, true);
endDeepValidation();
return breturn;
}
}
}
else if (prop == null) {
// TODO this might need more checking awc 9/15/2013
return true;
}
endDeepValidation();
return false;
}
return true;
}
示例4: checkPropertyRange
import com.hp.hpl.jena.ontology.OntProperty; //导入方法依赖的package包/类
public boolean checkPropertyRange(OntModel theJenaModel2, OntProperty pred, OntResource obj, boolean isList, EObject expr) throws CircularDependencyException {
if (checkRangeForMatch(theJenaModel2, pred, obj, isList)) {
return true;
}
ExtendedIterator<? extends OntProperty> propitr = pred.listSuperProperties(false);
while (propitr.hasNext()) {
OntProperty sprop = propitr.next();
if (checkRangeForMatch(theJenaModel2, sprop, obj, isList)) {
propitr.close();
return true;
}
}
return false;
}