Examples of Relation


Examples of kodkod.ast.Relation

        final Solution sol = Solution.triviallySatisfiable(stats, trivialInstance);
       
        final List<Formula> changes = new LinkedList<Formula>();
               
        for(Map.Entry<Relation, TupleSet> entry: trivialInstance.relationTuples().entrySet()) {
          final Relation r = entry.getKey();
         
          if (!translBounds.relations().contains(r)) {
            translBounds.bound(r, bounds.lowerBound(r), bounds.upperBound(r));
          }
         
          if (translBounds.lowerBound(r)!=translBounds.upperBound(r)) { // r may change
            if (entry.getValue().isEmpty()) {
              changes.add(r.some());
            } else {
              final Relation rmodel = Relation.nary(r.name()+"_"+trivial, r.arity());
              translBounds.boundExactly(rmodel, entry.getValue())
              changes.add(r.eq(rmodel).not());
            }
          }
        }
View Full Code Here

Examples of libchebi.Relation

   * @throws IOException
   */
  @Test
  public void getOutgoingsExisting() throws IOException, ParseException
  {
    Assert.assertTrue( existing.getOutgoings().contains( new Relation( Type.is_a, 17634, "C" ) ) ); //$NON-NLS-1$
  }
View Full Code Here

Examples of net.sf.mpxj.Relation

                        if (task1 != null && task2 != null)
                        {
                           RelationType type = RelationType.getInstance(MPPUtility.getShort(data, 12));
                           TimeUnit durationUnits = MPPUtility.getDurationTimeUnits(MPPUtility.getShort(data, 14));
                           Duration lag = MPPUtility.getAdjustedDuration(m_file, MPPUtility.getInt(data, 16), durationUnits);
                           Relation relation = task2.addPredecessor(task1, type, lag);
                           m_file.fireRelationReadEvent(relation);
                        }
                     }
                  }
               }
View Full Code Here

Examples of net.solosky.maplefetion.bean.Relation

   * @return
   */
  public synchronized ChatDialog createChatDialog(Buddy buddy)
          throws DialogException
  {
    Relation relation = buddy.getRelation();
    if( relation==Relation.BANNED ||
      relation==Relation.DECLINED ||
      relation==Relation.UNCONFIRMED) {
      throw new DialogException("Buddy relation is +"+buddy.getRelation()+", you couldn't send chat message to this buddy.");
    }
View Full Code Here

Examples of net.solosky.maplefetion.bean.Relation

        Element e = (Element) it.next();
        String uri = e.getAttributeValue("uri");
        Buddy buddy = context.getFetionStore().getBuddyByUri(uri);
        if(buddy!=null) {
          //检查用户关系的变化
          Relation relation = ParseHelper.parseRelation(e.getAttributeValue("relation-status"));
          //如果当前好友关系是没有确认,而返回的好友是确认了,表明好友同意了你添加好友的请求
          if(relation==Relation.BUDDY && buddy.getRelation()!=Relation.BUDDY) {
           
            //因为这里是手机好友,没有详细信息,故不再获取详细信息
            logger.debug("Mobile buddy agreed your buddy request:"+buddy.getFetionId());
View Full Code Here

Examples of net.solosky.maplefetion.bean.Relation

        Element e =  (Element) it.next();
        String uri = e.getAttributeValue("uri");
        final Buddy buddy = context.getFetionStore().getBuddyByUri(uri);
        if(buddy!=null) {
          //检查用户关系的变化
          Relation relation = ParseHelper.parseRelation(e.getAttributeValue("relation-status"));
          //如果当前好友关系是没有确认,而返回的好友是确认了,表明好友同意了你添加好友的请求
          if(relation==Relation.BUDDY && buddy.getRelation()!=Relation.BUDDY) {
           
            //这里还需要获取好友的详细信息
            SipcRequest request = dialog.getMessageFactory().createGetContactInfoRequest(buddy.getUri());
View Full Code Here

Examples of net.solosky.maplefetion.bean.Relation

   * @param listener 操作结果监听器
   */
  public void sendChatMessage(final Buddy toBuddy, final Message message, ActionEventListener listener)
  {
    this.ensureOnline();
    Relation relation = toBuddy.getRelation();
    if( relation==Relation.BANNED||
      relation==Relation.DECLINED||
      relation==Relation.UNCONFIRMED) {
      if(listener!=null) listener.fireEevent(new FailureEvent(FailureType.BUDDY_RELATION_FORBIDDEN));
    }else {
View Full Code Here

Examples of org.apache.oodt.cas.cli.option.require.RequirementRule.Relation

      assertNull(actionDependency.getRelation());
   }

   public void testVariableSetting() {
      String actionName = "operation";
      Relation relation = Relation.OPTIONAL;
      ActionDependencyRule actionDependency = new ActionDependencyRule(
            actionName, relation);
      assertEquals(actionName, actionDependency.getActionName());
      assertEquals(relation, actionDependency.getRelation());
View Full Code Here

Examples of org.apache.oodt.cas.cli.option.require.RequirementRule.Relation

      assertEquals(relation, actionDependency.getRelation());
   }

   public void testGetRelation() {
      String actionName = "operation";
      Relation relation = Relation.OPTIONAL;
      ActionDependencyRule actionDependency = new ActionDependencyRule(
            actionName, relation);
      assertEquals(relation,
            actionDependency.getRelation(createAction(actionName)));
   }
View Full Code Here

Examples of org.cedj.geekseek.domain.relation.model.Relation

    }

    @Test @InSequence(0)
    public void shouldBeAbleToCreateRelation() {

        Relation relation = repository.add(source, type, target);

        Assert.assertEquals("Verify returned object has same source id", relation.getSourceId(), source.getId());
        Assert.assertEquals("Verify returned object has same target id", relation.getTargetId(), target.getId());
        Assert.assertEquals("Verify returned object has same type", relation.getType(), type);

        Assert.assertNotNull("Verify created date was set", relation.getCreated());
    }
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.