private boolean isMetaProperty(Label type, ColumnNode alignmentColumnNode) { // Check for the case of DataPropertyOfColumnLink and ColumnSubClassLink boolean case1 = (type.getUri().equals(DataPropertyOfColumnLink.getFixedLabel().getUri()) || type.getUri().equals(ColumnSubClassLink.getFixedLabel().getUri())); if (case1) return true; Set<LabeledLink> incomingLinks = alignment.getCurrentIncomingLinksToNode(alignmentColumnNode.getId()); if (incomingLinks != null && !incomingLinks.isEmpty()) { LabeledLink incomingLink = incomingLinks.iterator().next(); if (incomingLink != null && (incomingLink instanceof ClassInstanceLink) && incomingLink.getKeyType().equals(LinkKeyInfo.UriOfInstance)) return true; } return false; }
writer.name("keyInfo").value(l.getKeyType().toString()); writer.name("modelIds"); if (!writeLinkAnnotations || l.getModelIds() == null) writer.value(nullStr);
public static String gethNodeId(String alignmentId, String columnUri) { Alignment alignment = AlignmentManager.Instance().getAlignment(alignmentId); Set<LabeledLink> tmp = alignment.getCurrentOutgoingLinksToNode(columnUri); String hNodeId = null; for (LabeledLink link : tmp) { if (link.getKeyType() == LinkKeyInfo.UriOfInstance) { hNodeId = link.getTarget().getId(); } } return hNodeId; }
newLink = new SubClassLink(newId); else if (this instanceof ClassInstanceLink) newLink = new ClassInstanceLink(newId, this.getKeyType()); else if (this instanceof ColumnSubClassLink) newLink = new ColumnSubClassLink(newId); newLink.setKeyType(this.getKeyType()); newLink.setProvenance(this.isProvenance, this.isMainProvenanceLink); return newLink;
link = new SubClassLink(id); else if (e instanceof ClassInstanceLink) link = new ClassInstanceLink(id, e.getKeyType()); else if (e instanceof ColumnSubClassLink) link = new ColumnSubClassLink(id);