本文整理汇总了Java中net.sf.extjwnl.data.list.PointerTargetTreeNode类的典型用法代码示例。如果您正苦于以下问题:Java PointerTargetTreeNode类的具体用法?Java PointerTargetTreeNode怎么用?Java PointerTargetTreeNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PointerTargetTreeNode类属于net.sf.extjwnl.data.list包,在下文中一共展示了PointerTargetTreeNode类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSetOfSynsets
import net.sf.extjwnl.data.list.PointerTargetTreeNode; //导入依赖的package包/类
/**
* Harvest all the synsets from this {@link PointerTargetTreeNodeList}, iteratively and recursively. Each treeNode holds a synset, and a pointer to a child list
* of treeNodes.
*
* @param pointerTargetTreeList must not be null!
* @return
*/
protected Set<Synset> getSetOfSynsets(PointerTargetTreeNodeList pointerTargetTreeList) {
Set<Synset> ret = new LinkedHashSet<Synset>();
for (PointerTargetTreeNode treeNode : pointerTargetTreeList)
{
ret.add(new ExtJwnlSynset(extJwnlDictionary, treeNode.getSynset()));
if (treeNode.hasValidChildTreeList())
ret.addAll(getSetOfSynsets(treeNode.getChildTreeList()));
}
return ret;
}
示例2: printPointerTargetTree
import net.sf.extjwnl.data.list.PointerTargetTreeNode; //导入依赖的package包/类
private static void printPointerTargetTree(String lead, PointerTargetTreeNode hypTree, boolean needGloss, boolean needLex, boolean needOffset, boolean needSenseNum, boolean needSenseKeys) throws JWNLException {
printSense(lead, hypTree.getSynset(), needGloss, needLex, needOffset, needSenseNum, needSenseKeys);
if (null != hypTree.getChildTreeList()) {
for (PointerTargetTreeNode node : hypTree.getChildTreeList()) {
printPointerTargetTree(lead + "\t", node, needGloss, needLex, needOffset, needSenseNum, needSenseKeys);
}
}
}