linkUri = link.getUri();
public String toString() { String key = ""; if (this.edgeList.isEmpty()) return key; if (this.startNode != null) key += this.startNode.getLocalId(); for (DefaultLink l : this.edgeList) { key += "<"; key += l.getUri(); key += ">"; if (l.getTarget() != null) key += l.getTarget().getLocalId(); } return key; } }
this.idToLinkMap.remove(link.getId()); Set<LabeledLink> linksWithSameUri = uriToLinksMap.get(link.getUri()); if (linksWithSameUri != null) linksWithSameUri.remove(link);
public static HashMap<SemanticType, LabeledLink> getDomainLinks(DirectedGraph<Node, DefaultLink> g, ColumnNode n, List<SemanticType> semanticTypes) { HashMap<SemanticType, LabeledLink> domainLinks = new HashMap<>(); if (g == null || n == null || semanticTypes == null || !g.vertexSet().contains(n)) return domainLinks; Set<DefaultLink> incomingLinks = g.incomingEdgesOf(n); if (incomingLinks != null) { for (SemanticType st : semanticTypes) { for (DefaultLink l : incomingLinks) { if (st.getDomain().getUri().equalsIgnoreCase(l.getSource().getUri()) && st.getType().getUri().equalsIgnoreCase(l.getUri())) { if (l instanceof LabeledLink) domainLinks.put(st, (LabeledLink)l); } } } } return domainLinks; }
String uri = link.getUri(); Label label = this.ontologyManager.getUriLabel(uri); if (label == null) { String key = source.getId() + link.getUri(); Integer count = this.nodeDataPropertyCount.get(key); if (count == null) this.nodeDataPropertyCount.put(key, 1); key = source.getUri() + link.getUri(); Set<SemanticTypeMapping> SemanticTypeMappings = this.semanticTypeMatches.get(key); if (SemanticTypeMappings == null) {
for (DefaultLink dl : outLinks) { if (dl instanceof LabeledLink && dl.getUri().equalsIgnoreCase(linkUri)) { sortedMatchedNodes.remove(0); okLink = false; for (DefaultLink dl : inLinks) { if (dl instanceof LabeledLink && dl.getUri().equalsIgnoreCase(linkUri)) { sortedMatchedNodes.remove(0); okLink = false;
String linkUri; for (DefaultLink link : this.graphBuilder.getGraph().edgeSet()) { linkUri = link.getUri(); if (!linkUri.equalsIgnoreCase(Uris.DEFAULT_LINK_URI)) { if (link.getTarget() instanceof InternalNode && !linkUri.equalsIgnoreCase(Uris.RDFS_SUBCLASS_URI)) {
if (source instanceof ColumnNode) continue; target = newNode; newId = LinkIdFactory.getLinkId(l.getUri(), source.getId(), target.getId()); DefaultLink copyLink = l.getCopy(newId); this.addLink(source, target, copyLink, l.getWeight()); target = l.getTarget(); if (!copyLinksToColumnNodes && target instanceof ColumnNode) continue; // skip links to column nodes newId = LinkIdFactory.getLinkId(l.getUri(), source.getId(), target.getId()); DefaultLink copyLink = l.getCopy(newId); this.addLink(source, target, copyLink, l.getWeight());
String edgeUri = e.getUri(); String edgeLocalUri; String edgeLabel = "";