private void writeMappingToSourceColumn(JsonWriter writer, Entry<ColumnNode, ColumnNode> mapping) throws IOException { if (mapping == null || mapping.getKey() == null || mapping.getValue() == null) return; writer.beginObject(); writer.name("id").value(mapping.getKey().getId()); writer.name("sourceColumnId").value(mapping.getValue().getId()); writer.endObject(); }
private void writeSourceColumn(JsonWriter writer, ColumnNode sourceColumn) throws IOException { if (sourceColumn == null) return; writer.beginObject(); writer.name("id").value(sourceColumn.getId()); writer.name("hNodeId").value(sourceColumn.getHNodeId()); writer.name("columnName").value(sourceColumn.getColumnName()); writer.endObject(); }
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; }
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; }
if (this.mappingToSourceColumns != null && (cn = this.mappingToSourceColumns.get((ColumnNode)n)) != null) { nodeIds.put(n, cn.getId()); } else { nodeIds.put(n, n.getId());
else if (n instanceof ColumnNode) { ColumnNode cn = mainModel.mappingToSourceColumns.get(n); if (cn == null) continue; else key = cn.getId(); else if (n instanceof ColumnNode) { ColumnNode cn = targetModel.mappingToSourceColumns.get(n); if (cn == null) continue; else key = cn.getId(); else if (target instanceof ColumnNode) { ColumnNode cn = mainModel.mappingToSourceColumns.get(target); if (cn == null) continue; else targetStr = cn.getId(); else if (target instanceof ColumnNode) { ColumnNode cn = targetModel.mappingToSourceColumns.get(target); if (cn == null) continue; else targetStr = cn.getId();
if(n instanceof ColumnNode) String columnName = translator.getColumnNameForHNodeId(((ColumnNode)n).getId()); columnsCovered.add(columnName);
addedNodes.add(target); String linkId = LinkIdFactory.getLinkId(propertyUri, source.getId(), target.getId()); LabeledLink link = new DataPropertyLink(linkId, new Label(propertyUri)); if (!this.graphBuilder.addLink(source, target, link)) continue;;
addedNodes.add(target); String linkId = LinkIdFactory.getLinkId(propertyUri, source.getId(), target.getId()); LabeledLink link = new DataPropertyLink(linkId, new Label(propertyUri)); if (!this.graphBuilder.addLink(source, target, link)) continue;;
addedNodes.add(target); String linkId = LinkIdFactory.getLinkId(propertyUri, source.getId(), target.getId()); LabeledLink link; if (propertyUri.equalsIgnoreCase(ClassInstanceLink.getFixedLabel().getUri()))
addedNodes.add(target); String linkId = LinkIdFactory.getLinkId(propertyUri, source.getId(), target.getId()); LabeledLink link; if (propertyUri.equalsIgnoreCase(ClassInstanceLink.getFixedLabel().getUri()))
node.getLabel().getRdfsLabel(), node.getLabel().getRdfsComment(), node.getId(), node.getType().name(), node.isForced(),
List<LabeledLink> columnNodeIncomingLinks = alignment.getGraphBuilder().getIncomingLinks(columnNode.getId()); if (columnNodeIncomingLinks != null) { for(LabeledLink oldIncomingLinkToColumnNode : columnNodeIncomingLinks) {
ColumnNode cn = sm.mappingToSourceColumns.get((ColumnNode)target); if (cn == null) return null; str += cn.getId(); str += separator;
ColumnNode columnNode = alignment.getColumnNodeByHNodeId(hNode.getId()); List<LabeledLink> columnNodeIncomingLinks = alignment.getGraphBuilder().getIncomingLinks(columnNode.getId()); if (columnNodeIncomingLinks == null || columnNodeIncomingLinks.isEmpty()) { // SemanticType not yet assigned Label propertyLabel = new Label(ns + columnName, ns, "karma");
columnNode.setRdfLiteralType(rdfLiteralType); columnNode.setLanguage(language); List<LabeledLink> columnNodeIncomingLinks = alignment.getGraphBuilder().getIncomingLinks(columnNode.getId()); if (columnNodeIncomingLinks != null) { for(LabeledLink oldIncomingLinkToColumnNode : columnNodeIncomingLinks) {