writer.name("objectPropertyType").value( ((ObjectPropertyLink)l).getObjectPropertyType().toString()); if (l instanceof ObjectPropertySpecializationLink) { writer.name("specializedLink").value(((ObjectPropertySpecializationLink)l).getSpecializedLinkId());
public ObjectPropertySpecializationLink addObjectPropertySpecializationLink(Node source, Node target, String specializedLinkId) { String id = LinkIdFactory.getLinkId(Uris.OBJECTPROPERTY_SPECIALIZATION_LINK_URI, source.getId(), target.getId()); ObjectPropertySpecializationLink link = new ObjectPropertySpecializationLink(id, specializedLinkId); if (this.graphBuilder.addLink(source, target, link)) return link; return null; }
); else if (this instanceof ObjectPropertySpecializationLink) newLink = new ObjectPropertySpecializationLink(newId, ((ObjectPropertySpecializationLink)this).getSpecializedLinkId()); else logger.error("cannot instanciate a link from the type: " + this.getType().toString());
ObjectPropertySpecializationLink.getFixedLabel(), classInstanceNode.getLabel(), classInstanceNode.getId(),
); else if (e instanceof ObjectPropertySpecializationLink) link = new ObjectPropertySpecializationLink(id, ((ObjectPropertySpecializationLink)e).getSpecializedLinkId()); else { logger.error("cannot instanciate a link from the type: " + e.getType().toString());
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; }
l = new ObjectPropertyLink(id, label, objectPropertyType); } else if (type == LinkType.ObjectPropertySpecializationLink) { l = new ObjectPropertySpecializationLink(hNodeId, specializedLinkId); } else if (type == LinkType.SubClassLink) { l = new SubClassLink(id);
if (link.getType() == LinkType.ObjectPropertySpecializationLink) { ObjectPropertySpecializationLink spLink = (ObjectPropertySpecializationLink) link; String linkId = spLink.getSpecializedLinkId(); linkObj.put(JsonKeys.source.name(), linkId); edgeLinksArr.put(linkObj);
ObjectPropertySpecializationLink opLink = (ObjectPropertySpecializationLink) link; String specializedLinkId = opLink .getSpecializedLinkId();