Examples of Relation


Examples of core.Relation

    }

    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testConstructorOfUnionOperatorFail2() {
        CellAddressFactory caf;
        Relation input1, input2;

        caf = new CellAddressFactory(1);
        input1 = caf.getSpaceForNewRelation(1);//(a)
        input2 = new EmptyRelation();
        new UnionOperator(caf, input1, input2);
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.Relation

        } else if (bridge.selectTriple(new Triple(Node.ANY, FOAF.name.asNode(), Node.ANY)) != null) {
          inventoryBridges.add(bridge);         
        }
      }
      if (inventoryBridges.isEmpty()) {
        Relation relation = (Relation) this.mapping.classMap(classMapResource).relation();
        NodeMaker typeNodeMaker = new FixedNodeMaker(
            RDF.type.asNode(), false);
        NodeMaker resourceNodeMaker = new FixedNodeMaker(RDFS.Resource.asNode(), false);
        inventoryBridges.add(new TripleRelation(relation,
            resourceMaker, typeNodeMaker, resourceNodeMaker));
View Full Code Here

Examples of de.iritgo.aktera.persist.Relation

  }

  public final Set getDetailNames()
  {
    HashSet subSet = new HashSet();
    Relation oneRelation = null;
    String oneName = null;

    for (Iterator i = relations.keySet().iterator(); i.hasNext();)
    {
      oneName = (String) i.next();
      oneRelation = (Relation) relations.get(oneName);

      if (oneRelation.getType() == Relation.DETAIL)
      {
        subSet.add(oneName);
      }
    }
View Full Code Here

Examples of edu.cmu.cs.fusion.Relation

 
  static ObjectLabel w, x, y, z;

  @BeforeClass
  static public void testRelationships() {
    tA = new Relation("A", new String[] {"Foo", "Bar"});
    tB = new Relation("B", new String[] {"Bar", "Bar"});
   
    w = new AbstractObjectLabel("w");
    x = new AbstractObjectLabel("x");
    y = new AbstractObjectLabel("y");
    z = new AbstractObjectLabel("z");
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.terminology.Relation

    c.getTerms();
    c.getText();
    c.getWordMap();

    c.getRelatedConcepts();
    Relation relation = new Relation("isa");
    c.getRelatedConcepts(relation);
    c.getRelationMap();
    c.getRelations();

    Annotation annots[] = c.getAnnotations();
View Full Code Here

Examples of edu.pitt.terminology.lexicon.Relation

          if(relationSources != null && !relationSources.contains(src))
            continue;
         
          // filter by known relationship
          if(filterRelations.contains(rel) && !cui1.equals(cui2)){
            Relation re = null;
            if("RB".equals(rel) || "PAR".equals(rel))
              re = Relation.BROADER;
            else if("RN".equals(rel) || "CHD".equals(rel))
              re = Relation.NARROWER;
           
View Full Code Here

Examples of edu.yale.cs.hadoopdb.catalog.xml.Relation

      n.setPassword(properties.getProperty(PASSWORD));
      n.setUsername(properties.getProperty(USERNAME));
      n.setLocation(node);

      for(String relation : relations_unchunked){
        Relation r = factory.createRelation();
        r.setId(relation);
        Partition p = factory.createPartition();
        p.setId(new Integer(node_counter).toString());
        p.setUrl(properties.getProperty(URL_PREFIX) + node + ":" + properties.getProperty(PORT)
            + "/" + properties.getProperty(UNCHUNKED_DB_PREFIX) + node_counter);
        r.getPartitions().add(p);
        n.getRelations().add(r);
      }
     
     
      for(String relation : relations_chunked){
        Relation r = factory.createRelation();
        r.setId(relation);
       
        int start_index = node_counter*(new Integer(properties.getProperty(CHUNKS_PER_NODE)));
        for(int index = start_index; index < start_index + (new Integer(properties.getProperty(CHUNKS_PER_NODE))); index ++) {
          Partition p = factory.createPartition();
          p.setId(new Integer(index).toString());
          p.setUrl(properties.getProperty(URL_PREFIX) + node + ":" + properties.getProperty(PORT)
              + "/" + properties.getProperty(CHUNKED_DB_PREFIX) + index);
          r.getPartitions().add(p);
        }
        n.getRelations().add(r);
      }     
     
      node_counter++;
View Full Code Here

Examples of gannuNLP.data.Relation

            {
              //Retrieve all the <a> for extracting the inGloss relation
              if(ge.getName().equals("a"))
              {
                String nurl=ge.getAttributeValue("href");
                s.addRelation("inGloss", new Relation("inGloss", nurl.replace("/wiki/", ""), ""));           
              }
            }
          }
          else
          {
            if(start)
              break;
          }
        }

      }
      else//Look for the start of the section
      {
        String all=xml.getRootElement().getValue();
        String section=all.substring(all.indexOf(this.redirect)+this.redirect.length());
        section=section.substring(0,section.indexOf("\")"));
       
        boolean start=false;
        for(Element e:body.getChildren())
        {
          if(start)
          {
            if(e.getName().equals("p"))
            {
              s.addBagOfWords(e.getValue(),e.getValue().split(" "),this.name);
              for(Element ge:e.getChildren())
              {
                //Retrieve all the <a> for extracting the inGloss relation
                if(ge.getName().equals("a"))
                {
                  String nurl=ge.getAttributeValue("href");
                  s.addRelation("inGloss", new Relation("inGloss", nurl.replace("/wiki/", ""), ""));           
                }
              }
            }
            else
            {
              break;
            }

          }
          else
          {
            if(e.getName().startsWith("h"))
            {
              for(Element es:e.getChildren())
              {
                if(es.getName().equals("span")&&section.equals(es.getAttributeValue("id")))
                {               
                  start=true;
                }
              }
            }
          }
         
        }
      }
      Element navbox=null;
      for(Element e:xml.getRootElement().getDescendants(new ElementFilter("table")))
      {
        if(e.getAttributeValue("class")!=null&&e.getAttributeValue("class").equals("navbox"))
        {
            navbox=e;
            break;
        }
      }
      //Add inNavBox relations
      if(navbox!=null)
      {
        for(Element e:navbox.getDescendants(new ElementFilter("a")))
        {
          String nurl=e.getAttributeValue("href");
          if(nurl!=null&&!this.isNotAnArticle(nurl))
          {
            s.addRelation("inNavBox", new Relation("inNavBox", nurl.replace("/wiki/", ""), ""));
          }
        }
      }
      //Add in CatLinks relations
      Element catlinks=null;
      String aux="catlinks";
      for(Element e:body.getParent().getDescendants(new ElementFilter("div")))
      {
        if(aux.equals(e.getAttributeValue("id")))
        {
          catlinks=e;
          break;
        }
      }
      if(catlinks!=null)
      {
        for(Element e:catlinks.getDescendants(new ElementFilter("a")))
        {
          String nurl=e.getAttributeValue("href");
          if(nurl!=null&&!this.isNotAnArticle(nurl))
          {
            s.addRelation("inCatLinks", new Relation("inCatLinks", nurl.replace("/wiki/", ""), ""));
          }
        }
      }
      Util.writeObject(f, s);
    }
View Full Code Here

Examples of helma.objectmodel.db.Relation

    private TransientProperty getProperty(String propname) {
        TransientProperty prop = (propMap == null) ? null : (TransientProperty) propMap.get(propname);

        // check if we have to create a virtual node
        if ((prop == null) && (dbmap != null)) {
            Relation rel = dbmap.getPropertyRelation(propname);

            if ((rel != null) && rel.isVirtual()) {
                prop = makeVirtualNode(propname, rel);
            }
        }

        return prop;
View Full Code Here

Examples of helma.objectmodel.db.Relation

        // if this is a HopObject, check if the property is defined
        // in the type.properties db-mapping.
        if (obj instanceof INode && ! "hopobject".equalsIgnoreCase(prototypeName)) {
            DbMapping dbm = app.getDbMapping(prototypeName);
            if (dbm != null) {
                Relation rel = dbm.propertyToRelation(propname);
                if (rel != null && (rel.isPrimitive() || rel.isCollection()))
                    return true;
            }
        }
        Scriptable wrapped = Context.toObject(obj, global);
        return wrapped.has(propname, wrapped);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.