本文整理汇总了Java中gate.creole.ontology.OConstants.Closure方法的典型用法代码示例。如果您正苦于以下问题:Java OConstants.Closure方法的具体用法?Java OConstants.Closure怎么用?Java OConstants.Closure使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gate.creole.ontology.OConstants
的用法示例。
在下文中一共展示了OConstants.Closure方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInstancesIterator
import gate.creole.ontology.OConstants; //导入方法依赖的package包/类
public ClosableIterator<OInstance> getInstancesIterator(
ONodeID aClass, OConstants.Closure closure) {
// if aClass is null: all instances
// if aClass is not null: instances of that class either
// direct or transitive
// once we have that, remove unneeded classes and re-implement
// getOInstance and has OInstance in abstractOntologyimpl
UtilResourceQueryIterator ret = null;
if(aClass == null) {
ret = new UtilResourceQueryIterator<OInstance>(
this, qp_getInstancesAll, OInstance.class);
} else if(closure == OConstants.Closure.DIRECT_CLOSURE) {
ret = new UtilResourceQueryIterator<OInstance>(
this, qp_getInstancesDirectFor, OInstance.class);
ret.setBinding("yyy1", new LiteralOrONodeIDImpl(aClass));
} else {
ret = new UtilResourceQueryIterator<OInstance>(
this, qp_getInstancesAllFor, OInstance.class);
ret.setBinding("yyy1", new LiteralOrONodeIDImpl(aClass));
}
return ret;
}
示例2: getInstances
import gate.creole.ontology.OConstants; //导入方法依赖的package包/类
public Set<OInstance> getInstances(ONodeID aClass, OConstants.Closure closure) {
//System.out.println("Running service.getInstances()");
Set<OInstance> theInstances = new HashSet<OInstance>();
ClosableIterator<OInstance> ii = getInstancesIterator(aClass, closure);
while(ii.hasNext()) {
OInstance i = ii.next();
//System.out.println("Adding to result: "+i);
theInstances.add(i);
}
return theInstances;
}
示例3: getInstancesIterator
import gate.creole.ontology.OConstants; //导入方法依赖的package包/类
public ClosableIterator<OInstance> getInstancesIterator(
ONodeID aClass, OConstants.Closure closure);
示例4: isSubClassOf
import gate.creole.ontology.OConstants; //导入方法依赖的package包/类
public boolean isSubClassOf(OClass aClass, OConstants.Closure closure) {
return ontologyService.isSubClassOf(aClass.getONodeID().toString(),
this.nodeId.toString(), closure);
}
示例5: isSubClassOf
import gate.creole.ontology.OConstants; //导入方法依赖的package包/类
public boolean isSubClassOf(OClass aClass, OConstants.Closure closure) {
return ontologyService.isSubClassOf(aClass.getONodeID().toString(),
this.nodeId.toString(), closure);
}