当前位置: 首页>>代码示例>>Java>>正文


Java OntProperty.listSuperProperties方法代码示例

本文整理汇总了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;
}
 
开发者ID:crapo,项目名称:sadlos2,代码行数:18,代码来源:JenaBasedSadlModelValidator.java

示例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
}
 
开发者ID:crapo,项目名称:sadlos2,代码行数:35,代码来源:ModelManager.java

示例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;
	}
 
开发者ID:crapo,项目名称:sadlos2,代码行数:41,代码来源:ModelManager.java

示例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;
}
 
开发者ID:crapo,项目名称:sadlos2,代码行数:15,代码来源:JenaBasedSadlModelValidator.java


注:本文中的com.hp.hpl.jena.ontology.OntProperty.listSuperProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。