Package edu.isi.karma.rep.alignment

Examples of edu.isi.karma.rep.alignment.DataPropertyLink


              return null;
            }
            if (this.graphBuilder.addNode(newNode)) {
              matches.add(newNode);
              String linkId = LinkIdFactory.getLinkId(incomingLink.getUri(), m.getId(), newNode.getId());
              DataPropertyLink link = new DataPropertyLink(linkId, new Label(incomingLink.getLabel()));
              this.graphBuilder.addLink(m, newNode, link);
            }
          }
          columnNodeMatches.put(n, matches);
        }
View Full Code Here


        } else {
//          System.out.println("added links: " + i);
//          i++;
          LabeledLink link;
          if (e instanceof DataPropertyLink)
            link = new DataPropertyLink(id, e.getLabel());
          else if (e instanceof ObjectPropertyLink)
            link = new ObjectPropertyLink(id, e.getLabel(), ((ObjectPropertyLink)e).getObjectPropertyType());
          else if (e instanceof SubClassLink)
            link = new SubClassLink(id);
          else if (e instanceof ClassInstanceLink)
View Full Code Here

        ColumnNode target = new ColumnNode(nodeId, nodeId, sourceColumn.getColumnName(), null);
        if (!this.graphBuilder.addNode(target)) continue;;
        addedNodes.add(target);

        String linkId = LinkIdFactory.getLinkId(propertyUri, source.getId(), target.getId())
        LabeledLink link = new DataPropertyLink(linkId, new Label(propertyUri));
       
        boolean result = weight == null ? this.graphBuilder.addLink(source, target, link) : this.graphBuilder.addLink(source, target, link, weight);
        if (!result) continue;;

        SemanticTypeMapping mp = new SemanticTypeMapping(sourceColumn, semanticType, (InternalNode)source, link, target);
View Full Code Here

    LabeledLink link;
    if (propertyUri.equalsIgnoreCase(ClassInstanceLink.getFixedLabel().getUri()))
      link = new ClassInstanceLink(linkId);
    else {
      Label label = this.ontologyManager.getUriLabel(propertyUri);
      link = new DataPropertyLink(linkId, label);
    }
    if (!this.graphBuilder.addLink(source, target, link)) return null;

    SemanticTypeMapping mappingStruct = new SemanticTypeMapping(sourceColumn, semanticType, source, link, target);
View Full Code Here

        }
      }
    } else if(propertiesRange == INTERNAL_PROP_RANGE.allDataProperties) {
      HashMap<String, Label> linkList = ontMgr.getDataProperties();
      for(Label label : linkList.values()) {
        properties.add(new DataPropertyLink(label.getUri(), label));
      }
    } else if(propertiesRange == INTERNAL_PROP_RANGE.allDataAndObjectProperties) {
      HashMap<String, Label> linkList = ontMgr.getDataProperties();
      for(Label label : linkList.values()) {
        properties.add(new DataPropertyLink(label.getUri(), label));
      }
      HashMap<String, Label> objectLinkList = ontMgr.getObjectProperties();
      for(Label label : objectLinkList.values()) {
        if(!linkList.containsValue(label))
          properties.add(new ObjectPropertyLink(label.getUri(), label, ObjectPropertyType.None));
      }
    } else if(propertiesRange == INTERNAL_PROP_RANGE.propertiesWithDomainRange) {
      Map<String, Label> linkList = ontMgr.getObjectPropertiesByDomainRange(domainURI, rangeURI, true);
      for(Label label : linkList.values()) {
        properties.add(new DataPropertyLink(label.getUri(), label));
      }
    } else if(propertiesRange == INTERNAL_PROP_RANGE.dataPropertiesForClass) {
      Map<String, Label> linkList = ontMgr.getDataPropertiesByDomain(classURI, true);
      for(Label label : linkList.values()) {
        properties.add(new DataPropertyLink(label.getUri(), label));
      }
    } else if(propertiesRange == INTERNAL_PROP_RANGE.existingProperties) {
      Alignment alignment = AlignmentManager.Instance().getAlignmentOrCreateIt(workspace.getId(), worksheetId, ontMgr);
      Set<String> steinerTreeNodeIds = new HashSet<String>();
      if (alignment != null && !alignment.isEmpty()) {
View Full Code Here

      }

      LabeledLink link;
      String id = LinkIdFactory.getLinkId(e.getLabel().getUri(), n1.getId(), n2.getId())
      if (e instanceof DataPropertyLink)
        link = new DataPropertyLink(id, e.getLabel());
      else if (e instanceof ObjectPropertyLink)
        link = new ObjectPropertyLink(id, e.getLabel(), ((ObjectPropertyLink)e).getObjectPropertyType());
      else if (e instanceof SubClassLink)
        link = new SubClassLink(id);
      else if (e instanceof ClassInstanceLink)
View Full Code Here

        } else {
          continue;
        }

        id = LinkIdFactory.getLinkId(predicateUri, n1.getId(), n2.getId())
        link = new DataPropertyLink(id, new Label(predicateUri));
        if (this.graphBuilder.addLink(n1, n2, link)) {
          this.graphBuilder.changeLinkWeight(link, 1 - ((double)linkFrequency / (double)countOfDataProperties));
//          this.graphBuilder.changeLinkWeight(link, countOfDataProperties - linkFrequency);
//          this.graphBuilder.changeLinkWeight(link, linkFrequency);
        }
View Full Code Here

        ColumnNode target = new ColumnNode(nodeId, nodeId, sourceColumn.getColumnName(), null);
        if (!this.graphBuilder.addNode(target)) 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;;

        SemanticTypeMapping mp = new SemanticTypeMapping(sourceColumn, semanticType, (InternalNode)source, link, target);
        mappings.add(mp);
      }
View Full Code Here

    LabeledLink link;
    if (propertyUri.equalsIgnoreCase(ClassInstanceLink.getFixedLabel().getUri()))
      link = new ClassInstanceLink(linkId);
    else {
      Label label = this.ontologyManager.getUriLabel(propertyUri);
      link = new DataPropertyLink(linkId, label);
    }
    if (!this.graphBuilder.addLink(source, target, link)) return null;

    SemanticTypeMapping mappingStruct = new SemanticTypeMapping(sourceColumn, semanticType, source, link, target);
View Full Code Here

        ColumnNode target = new ColumnNode(nodeId, nodeId, sourceColumn.getColumnName(), null);
        if (!this.graphBuilder.addNode(target)) 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;;

        SemanticTypeMapping mp = new SemanticTypeMapping(sourceColumn, semanticType, (InternalNode)source, link, target);
        mappings.add(mp);
      }
View Full Code Here

TOP

Related Classes of edu.isi.karma.rep.alignment.DataPropertyLink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.