private LabeledLink getMainProvenanceLink(Alignment alignment, LabeledLink link) { String edgeUri = link.getUri(); for(LabeledLink otherLink : alignment.getCurrentIncomingLinksToNode(link.getTarget().getId())) { if(otherLink.getUri().equals(edgeUri) && otherLink.isMainProvenanceLink()) return otherLink; } return null; }
public void savePatternLink(LabeledLink l) { String key = l.getSource().getUri() + l.getUri() + l.getTarget().getUri(); List<LabeledLink> links = this.patternLinks.get(key); if (links == null) { links = new LinkedList<>(); this.patternLinks.put(key, links); } links.add(l); }
link.put(Arguments.uri.name(), property.getUri()); link.put(Arguments.label.name(), property.getLabel().getDisplayName());
Node domain = l.getSource(); Node mappedNode = internalNodeMapping.get(domain); String linkUri = l.getUri(); String key = mappedNode.getId() + linkUri;
if (l.getSource() == null) continue; Node domain = l.getSource(); String linkUri = l.getUri(); String key = domain.getId() + linkUri; Integer count = dataPropertyCount.get(key); String graphKey = m.getId() + incomingLink.getUri(); Set<Node> dataPropertyColumnNodes = this.graphBuilder.getNodeDataProperties().get(graphKey); Integer graphDataPropertyCount = this.graphBuilder.getNodeDataPropertyCount().get(graphKey); String modelKey = domain.getId() + incomingLink.getUri(); int modelDataPropertyCount = dataPropertyCount.get(modelKey); for (int i = 0; i < modelDataPropertyCount - graphDataPropertyCount; i++) { String linkId = LinkIdFactory.getLinkId(incomingLink.getUri(), m.getId(), newNode.getId()); DataPropertyLink link = new DataPropertyLink(linkId, new Label(incomingLink.getLabel())); this.graphBuilder.addLink(m, newNode, link, ModelingParams.PATTERN_LINK_WEIGHT);
Collections.sort(idSortedLinks); for (LabeledLink l : idSortedLinks) { key = l.getSource().getUri() + l.getUri() + l.getTarget().getUri(); if (this.graphBuilder.getPatternLinks().get(key) != null) { sortedLinks.add(l); linkUri = e.getUri(); id = LinkIdFactory.getLinkId(e.getUri(), n1.getId(), n2.getId()); LabeledLink l = this.graphBuilder.getIdToLinkMap().get(id); if (l != null) {
String id = LinkIdFactory.getLinkId(e.getUri(), n1.getId(), n2.getId()); LabeledLink l = this.graphBuilder.getIdToLinkMap().get(id); if (l != null) {
String id = LinkIdFactory.getLinkId(e.getUri(), n1.getId(), n2.getId()); LabeledLink l = this.graphBuilder.getIdToLinkMap().get(id); if (l != null) { if (nn1.equals(source) && nn2.equals(target)) continue; if (nn1.equals(nn2)) continue; String id = LinkIdFactory.getLinkId(l.getUri(), nn1.getId(), nn2.getId()); LabeledLink newLink = l.copy(id); newLink.setModelIds(null);
continue; String id = LinkIdFactory.getLinkId(l.getUri(), source.getId(), target.getId()); LabeledLink newLink = l.copy(id);
newEdge.put(ChangeInternalNodeLinksCommand.LinkJsonKeys.edgeSourceId.name(), link.getSource().getId()); newEdge.put(ChangeInternalNodeLinksCommand.LinkJsonKeys.edgeTargetId.name(), link.getTarget().getId()); newEdge.put(ChangeInternalNodeLinksCommand.LinkJsonKeys.edgeId.name(), link.getUri()); newEdge.put(ChangeInternalNodeLinksCommand.LinkJsonKeys.isProvenance.name(), link.isProvenance()); newEdges.put(newEdge);