else writeLabel(writer, l.getLabel()); if (l instanceof DataPropertyOfColumnLink) writer.name("hNodeId").value( ((DataPropertyOfColumnLink)l).getSpecializedColumnHNodeId()); if (l instanceof ObjectPropertyLink) writer.name("objectPropertyType").value( ((ObjectPropertyLink)l).getObjectPropertyType().toString());
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; }
public DataPropertyOfColumnLink addDataPropertyOfColumnLink(Node source, Node target, String specializedColumnHNodeId, String specializedLinkId) { String id = LinkIdFactory.getLinkId(Uris.DATAPROPERTY_OF_COLUMN_LINK_URI, source.getId(), target.getId()); DataPropertyOfColumnLink link = new DataPropertyOfColumnLink(id, specializedColumnHNodeId, specializedLinkId); if (this.graphBuilder.addLink(source, target, link)) return link; return null; }
newLink = new ColumnSubClassLink(newId); else if (this instanceof DataPropertyOfColumnLink) newLink = new DataPropertyOfColumnLink(newId, ((DataPropertyOfColumnLink)this).getSpecializedColumnHNodeId(), ((DataPropertyOfColumnLink)this).getSpecializedLinkId() ); else if (this instanceof ObjectPropertySpecializationLink)
} else if (link.getType() == LinkType.DataPropertyOfColumnLink) { DataPropertyOfColumnLink spLink = (DataPropertyOfColumnLink) link; String linkId = spLink.getSpecializedLinkId(); linkObj.put(JsonKeys.source.name(), linkId); edgeLinksArr.put(linkObj);
link = new ColumnSubClassLink(id); else if (e instanceof DataPropertyOfColumnLink) link = new DataPropertyOfColumnLink(id, ((DataPropertyOfColumnLink)e).getSpecializedColumnHNodeId(), ((DataPropertyOfColumnLink)e).getSpecializedLinkId() ); else if (e instanceof ObjectPropertySpecializationLink)
private LabeledLink getSpecializationLinkIfExists(LabeledLink link, Node sourceNode) { Set<LabeledLink> outgoingEdges = this.alignmentGraph.outgoingEdgesOf(sourceNode); for (LabeledLink olink:outgoingEdges) { // Check for the object property specialization if (olink instanceof ObjectPropertySpecializationLink ) { String splLinkId = ((ObjectPropertySpecializationLink) olink).getSpecializedLinkId(); if (splLinkId.equals(link.getId())) return olink; } // Check for the data property specialization else if (olink instanceof DataPropertyOfColumnLink) { DataPropertyOfColumnLink dlink = (DataPropertyOfColumnLink) olink; Node target = link.getTarget(); if (target instanceof ColumnNode) { ColumnNode cnode = (ColumnNode) target; if (dlink.getSpecializedColumnHNodeId().equals(cnode.getId())) return dlink; } } } return null; }
DataPropertyOfColumnLink.getFixedLabel(), classInstanceNode.getLabel(), classInstanceNode.getId(),
l = new DataPropertyLink(id, label); } else if (type == LinkType.DataPropertyOfColumnLink) { l = new DataPropertyOfColumnLink(id, hNodeId, specializedLinkId); } else if (type == LinkType.ObjectPropertyLink) { l = new ObjectPropertyLink(id, label, objectPropertyType);
DataPropertyOfColumnLink dpLink = (DataPropertyOfColumnLink) link; String startHNodeId = dpLink .getSpecializedColumnHNodeId();