本文整理汇总了Java中org.semanticweb.owlapi.reasoner.Node.getRepresentativeElement方法的典型用法代码示例。如果您正苦于以下问题:Java Node.getRepresentativeElement方法的具体用法?Java Node.getRepresentativeElement怎么用?Java Node.getRepresentativeElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.semanticweb.owlapi.reasoner.Node
的用法示例。
在下文中一共展示了Node.getRepresentativeElement方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSimilarityMaxIC
import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
public ScoreAttributeSetPair getSimilarityMaxIC(OWLNamedIndividual i,
OWLNamedIndividual j) {
Set<Node<OWLClass>> atts = getInferredAttributes(i);
atts.retainAll(getInferredAttributes(j)); // intersection
ScoreAttributeSetPair best = new ScoreAttributeSetPair(0.0);
for (Node<OWLClass> n : atts) {
OWLClass c = n.getRepresentativeElement();
Double ic = this.getInformationContentForAttribute(c);
if (Math.abs(ic - best.score) < 0.001) {
// tie for best attribute
best.addAttributeClass(c);
}
if (ic > best.score) {
best = new ScoreAttributeSetPair(ic, c);
}
}
return best;
}
示例2: ancsProperBitmapCachedModifiable
import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
public EWAHCompressedBitmap ancsProperBitmapCachedModifiable(OWLClass c) {
if (properSuperclassBitmapMap != null && properSuperclassBitmapMap.containsKey(c)) {
return properSuperclassBitmapMap.get(c);
}
Set<Integer> ancsInts = new HashSet<Integer>();
for (Node<OWLClass> anc : reasoner.getSuperClasses(c, false)) {
// TODO - verify robust for non-Rep elements
OWLClass ac = anc.getRepresentativeElement();
if (ac.equals(thing))
continue;
Integer ix = classIndex.get(ac);
if (ix == null) {
msg("??"+anc);
}
ancsInts.add(ix.intValue());
}
//msg(c + " ancs = "+caints.size());
EWAHCompressedBitmap bm = bm(ancsInts);
if (properSuperclassBitmapMap == null)
properSuperclassBitmapMap = new HashMap<OWLClass,EWAHCompressedBitmap>();
properSuperclassBitmapMap.put(c, bm);
return bm;
}
示例3: dumpClassHierarchy
import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
private void dumpClassHierarchy(Node<OWLClass> cls, int level, boolean showBottomNode) {
if (!showBottomNode && cls.isBottomNode()) {
return;
}
printIndent(level);
OWLClass representative = cls.getRepresentativeElement();
System.out.println(getEquivalentClasses(representative));
for (Node<OWLClass> subCls : getSubClasses(representative, true)) {
dumpClassHierarchy(subCls, level + 1, showBottomNode);
}
}
示例4: dumpObjectPropertyHierarchy
import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
private void dumpObjectPropertyHierarchy(Node<OWLObjectPropertyExpression> cls, int level, boolean showBottomNode) {
if (!showBottomNode && cls.isBottomNode()) {
return;
}
printIndent(level);
OWLObjectPropertyExpression representative = cls.getRepresentativeElement();
System.out.println(getEquivalentObjectProperties(representative));
for (Node<OWLObjectPropertyExpression> subProp : getSubObjectProperties(representative, true)) {
dumpObjectPropertyHierarchy(subProp, level + 1, showBottomNode);
}
}
示例5: dumpDataPropertyHierarchy
import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
private void dumpDataPropertyHierarchy(Node<OWLDataProperty> cls, int level, boolean showBottomNode) {
if (!showBottomNode && cls.isBottomNode()) {
return;
}
printIndent(level);
OWLDataProperty representative = cls.getRepresentativeElement();
System.out.println(getEquivalentDataProperties(representative));
for (Node<OWLDataProperty> subProp : getSubDataProperties(representative, true)) {
dumpDataPropertyHierarchy(subProp, level + 1, showBottomNode);
}
}
示例6: renderAttributes
import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
private String renderAttributes(Set<Node<OWLClass>> atts,
OWLPrettyPrinter owlpp) {
List<String> s = new ArrayList<String>();
for (Node<OWLClass> n : atts) {
OWLClass c = n.getRepresentativeElement();
s.add(owlpp.render(c));
}
return (StringUtils.join(s, " | "));
}