Package edu.isi.karma.rep.alignment

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


     
      LabeledLink newLink;
      if (uri.equalsIgnoreCase(Uris.RDFS_SUBCLASS_URI))
        newLink = new SubClassLink(id);
      else
        newLink = new ObjectPropertyLink(id, label, linkObjectPropertyType);
     
      sortedLinks.add(newLink);
    }
   
    Collections.sort(sortedLinks, new LinkPriorityComparator());
View Full Code Here


//          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)
            link = new ClassInstanceLink(id, e.getKeyType());
          else if (e instanceof ColumnSubClassLink)
View Full Code Here

   
    if (propertiesRange == INTERNAL_PROP_RANGE.allObjectProperties) {
      HashMap<String, Label> linkList = ontMgr.getObjectProperties();
      if(linkList != null) {
        for(Label label : linkList.values()) {
          properties.add(new ObjectPropertyLink(label.getUri(), label, ObjectPropertyType.None));
        }
      }
    } 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));
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)
        link = new ClassInstanceLink(id, e.getKeyType());
      else if (e instanceof ColumnSubClassLink)
View Full Code Here

        } else {
          n2 = nodes.iterator().next();
        }

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

        sources.add(link.getSource());
        targets.add(link.getTarget());

        id = LinkIdFactory.getLinkId(lf1.getLinkUri(), link.getSource().getId(), link.getTarget().getId());
        if (link instanceof ObjectPropertyLink)
          newLinks.add(new ObjectPropertyLink(id, new Label(lf1.getLinkUri()), ((ObjectPropertyLink) link).getObjectPropertyType()));
        else if (link instanceof SubClassLink)
          newLinks.add(new SubClassLink(id));

        weights.add(lf1.getWeight());
      } else if (c < 0) {
        sources.add(link.getTarget());
        targets.add(link.getSource());

        id = LinkIdFactory.getLinkId(lf2.getLinkUri(), link.getSource().getId(), link.getTarget().getId());
        if (link instanceof ObjectPropertyLink)
          newLinks.add(new ObjectPropertyLink(id, new Label(lf2.getLinkUri()), ((ObjectPropertyLink) link).getObjectPropertyType()));
        else if (link instanceof SubClassLink)
          newLinks.add(new SubClassLink(id));

        weights.add(lf2.getWeight());
      } else
View Full Code Here

        graph.addVertex(obj);
      }
     
      LabeledLink e;
      if (obj instanceof InternalNode)
        e = new ObjectPropertyLink(LinkIdFactory.getLinkId(predicateStr, subj.getId(), obj.getId()), new Label(predicateStr), ObjectPropertyType.None);
      else
        e = new DataPropertyLink(LinkIdFactory.getLinkId(predicateStr, subj.getId(), obj.getId()), new Label(predicateStr));
      graph.addEdge(subj, obj, e);
     
    }
View Full Code Here

      } else if (type == LinkType.DataPropertyLink) {
        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);
      } else if (type == LinkType.ObjectPropertySpecializationLink) {
        l = new ObjectPropertySpecializationLink(hNodeId, specializedLinkId);
      } else if (type == LinkType.SubClassLink) {
        l = new SubClassLink(id);
      } else if (type == LinkType.CompactObjectPropertyLink) {
View Full Code Here

 

    public ObjectPropertyLink addObjectPropertyLink(Node source, Node target, Label label) {
           
            String id = LinkIdFactory.getLinkId(label.getUri(), source.getId(), target.getId());       
            ObjectPropertyLink link = new ObjectPropertyLink(id, label,
                this.graphBuilder.getOntologyManager().getObjectPropertyType(source.getLabel().getUri(), target.getLabel().getUri(), label.getUri()));
            if (this.graphBuilder.addLink(source, target, link))
            {
              return link;
            }
            else if(this.graphBuilder.getIdToLinkMap().containsKey(link.getId()))
            {
              return (ObjectPropertyLink) this.graphBuilder.getIdToLinkMap().get(link.getId());
            }
            else
            {
              return null;
            }
View Full Code Here

        String linkUri = LinkIdFactory.getLinkUri(linkId);
        LabeledLink newLink;
        if (linkUri.equalsIgnoreCase(Uris.RDFS_SUBCLASS_URI))
          newLink = new SubClassLink(linkId);
        else
          newLink = new ObjectPropertyLink(linkId,
              this.graphBuilder.getOntologyManager().getUriLabel(linkUri),
              this.graphBuilder.getOntologyManager().getObjectPropertyType(source.getLabel().getUri(), target.getLabel().getUri(), linkUri));
       
        newLink.setStatus(LinkStatus.ForcedByUser);
        this.graphBuilder.addLink(source, target, newLink);
View Full Code Here

TOP

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

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.