edu.isi.karma.modeling.alignment.Alignment.getNodesByType()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中edu.isi.karma.modeling.alignment.Alignment.getNodesByType()方法的一些代码示例,展示了Alignment.getNodesByType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Alignment.getNodesByType()方法的具体详情如下:
包路径:edu.isi.karma.modeling.alignment.Alignment
类名称:Alignment
方法名:getNodesByType

Alignment.getNodesByType介绍

暂无

代码示例

代码示例来源:origin: usc-isi-i2/Web-Karma

private Map<String, ColumnNode> createColumnNodeMap() {
  Set<Node> alignmentColumnNodes = alignment.getNodesByType(NodeType.ColumnNode);
  Map<String, ColumnNode> hNodeIdToColumnNodeMap = new HashMap<>();
  if (alignmentColumnNodes == null)
    return hNodeIdToColumnNodeMap;
  for (Node cNode : alignmentColumnNodes) {
    ColumnNode columnNode = (ColumnNode) cNode;
    hNodeIdToColumnNodeMap.put(columnNode.getHNodeId(), columnNode);
  }
  return hNodeIdToColumnNodeMap;
}

代码示例来源:origin: usc-isi-i2/Web-Karma

private void addProvenaceLinks(Alignment alignment, Label linkLabel, LiteralNode targetNode) {
  String targetId = targetNode.getId();
  Set<Node> internalNodes = alignment.getNodesByType(NodeType.InternalNode);
  String edgeUri = linkLabel.getUri();
  
  for(Node internalNode : internalNodes) {
    String nodeId = internalNode.getId();
    Set<LabeledLink> inLinks = alignment.getIncomingLinksInTree(nodeId);
    Set<LabeledLink> outLinks = alignment.getOutgoingLinksInTree(nodeId);
    if((inLinks != null && inLinks.size() > 0) 
        || (outLinks != null && outLinks.size() > 0)) {
      String linkId = LinkIdFactory.getLinkId(edgeUri, nodeId, targetId);
      LabeledLink link = alignment.getLinkById(linkId);
      if(link == null) {
        link = alignment.addObjectPropertyLink(internalNode,
            targetNode, linkLabel);
        alignment.changeLinkStatus(linkId, LinkStatus.ForcedByUser);
        link.setProvenance(true, false);
      }
    }
  }
}

代码示例来源:origin: usc-isi-i2/Web-Karma

Set<Node> internalNodes = alignment.getNodesByType(NodeType.InternalNode);
if(internalNodes != null) {
  for(Node internalNode : internalNodes) {

相关文章