Examples of Activity


Examples of it.eng.spagobi.engines.chart.bo.charttypes.blockcharts.util.Activity

    int j=0;
    // for each activity
    logger.debug("retrieved number rows: "+listAtts.size());
    for (Iterator iterator = listAtts.iterator(); iterator.hasNext();) {
      SourceBean row = (SourceBean) iterator.next();
      Activity activity=new Activity(row, beginDateFormat, beginHourFormat);
      activities.add(activity);
      logger.debug("Activity built from "+activity.getBeginDate()+" minutes"+activity.getMinutes()!=null?activity.getMinutes().toString():"");
      if(maxDateFound!=null && !activity.getBeginDate().after(maxDateFound)){
      }
      else{
        maxDateFound=activity.getBeginDate();
      }

      if(minDateFound!=null && !activity.getBeginDate().before(minDateFound)){
      }
      else{
        minDateFound=activity.getBeginDate();
      }
    }

    //    count days
    long daysBetween;
    if(dateMin!=null && dateMax!=null){
      logger.debug("use date limit defined in template: from "+dateMin.toString()+" to "+dateMax.toString());
      daysBetween=daysBetween(dateMin,dateMax);
    }
    else{
      logger.debug("use date limit found: from "+minDateFound.toString()+" to "+maxDateFound.toString());
      daysBetween=daysBetween(minDateFound,maxDateFound);
    }
    logger.debug("Days between the two dates "+daysBetween);
    // add a date to include extremis
    long minutesBetweenLong=daysBetween*24*60*2; // raddoppio in caso di sovrapposizioni
    int mbl=Long.valueOf(minutesBetweenLong).intValue();

    DefaultXYZDataset dataset = new DefaultXYZDataset();

    ArrayList<Long> xValuesList=new ArrayList<Long>();
    ArrayList<Double> yValuesList=new ArrayList<Double>();
    ArrayList<Double> zValuesList=new ArrayList<Double>();


    annotations=new HashMap<String, AnnotationBlock>();
    // run all the activities
    for (Iterator iterator = activities.iterator(); iterator.hasNext();) {
      Activity activity = (Activity) iterator.next();

      // insert only if activty falls inside the min and max Range (idf defined)
      if(dateMin!=null && dateMax!=null && (activity.getBeginDate().after(dateMax) || activity.getBeginDate().before(dateMin))){
        logger.debug("Activity discarde because starting out of selected bounds in "+activity.getBeginDate());
      }
      else
        logger.debug("Inserting activity with begin date "+activity.getBeginDate()+" adn pattern "+activity.getPattern());
        RegularTimePeriod rtp = new Day(activity.getBeginDate());
        long secondmills= rtp.getFirstMillisecond();

        Minute minute=activity.getMinutes();
        for(int i=0;i<activity.getDuration();i++){
          // convert from hour to number axis (da sessantesimi a centesimi!)
          Integer hour=Integer.valueOf(minute.getHourValue());
          Integer minuteValue=Integer.valueOf(minute.getMinute());
          Double doubleMinuteValue=Double.valueOf(((double)minuteValue.intValue()));
          // minuteValue : 60 = x :100
          double convertedMinuteValue=(doubleMinuteValue*100)/60.0;
          double convertedMinuteValueCent=convertedMinuteValue/100;

          double hourD=(double)hour.intValue();
          double converted=hourD+convertedMinuteValueCent;

          String yVal=Double.valueOf(converted).toString();

          xValuesList.add(new Long(secondmills));
          yValuesList.add(Double.valueOf(yVal));

          Object cosa=patternRangeIndex.get(activity.getPattern());

          if(cosa!=null){
            zValuesList.add(Double.valueOf(patternRangeIndex.get(activity.getPattern())).doubleValue()+0.5);
          }
          else{
            zValuesList.add(-1.0);
          }
          //          xvalues[j]=secondmills;
//          yvalues[j]=Double.valueOf(yVal);
//          zvalues[j]=patternRangeIndex.get(activity.getPattern())+0.5;

          //System.out.println("Date: "+activity.getBeginDate()+":"+Double.valueOf(xvalues[j]).toString()+", Hour: "+Double.valueOf(yvalues[j]).toString()+", Value: "+Double.valueOf(zvalues[j]).toString());
          if(annotations.get(activity.getCode())==null){
            AnnotationBlock annotation=new AnnotationBlock(activity.getCode());
            annotation.setXPosition(xValuesList.get(j).doubleValue());
            annotation.setYPosition(yValuesList.get(j).doubleValue());
            annotations.put(annotation.getAnnotation(), annotation);
          }
          minute=(Minute)minute.next();
View Full Code Here

Examples of models.activity.Activity

     */
    public static void listen() {
        while (inbound.isOpen()) {
            try {
                //broadcast
                Activity activity = await(liveStream.nextEvent());
                if (activity != null) {
                    Logger.info("activity send " + activity + " from " + activity.member);
                    Logger.info("connecteds " + connecteds);
                    //bug json de serialize
                    //ne renvoyer l'activité que si cest une activité d'un linked d'un user connecte
View Full Code Here

Examples of name.pehl.karaka.server.activity.entity.Activity

            mdt.hourOfDay().set(9);
            int activitiesCount = 1 + random.nextInt(ACTIVITIES_PER_DAY);
            int hours = 2 + random.nextInt(6) / activitiesCount;
            for (int j = 0; j < activitiesCount; j++)
            {
                Activity activity = new Activity(loremIpsum.randomWords(2), loremIpsum.randomWords(4), timeZone);
                activity.setStart(new Time(mdt));
                int hour = mdt.hourOfDay().get() + hours;
                activity.setEnd(new Time(mdt.copy().hourOfDay().set(hour)));
                activity.setProject(Ref.create(projects.get(random.nextInt(projects.size()))));
                for (int i = 0; i < TAGS_PER_ACTIVITY; i++)
                {
                    Tag tag = tagKeys.get(random.nextInt(tagKeys.size()));
                    activity.addTag(Key.create(tag));
                }
                activities.add(activity);
                mdt.hourOfDay().add(hours);
            }
            mdt.addDays(1);
View Full Code Here

Examples of name.pehl.karaka.shared.model.Activity

    }

    @Override
    public void onActivityChanged(ActivityChangedEvent event)
    {
        Activity activity = event.getActivity();
        ChangeAction action = event.getAction();
        switch (action)
        {
            case NEW:
                break;
            case RESUMED:
            case STARTED:
            case STOPPED:
                currentActivity = activity;
                break;
            case DELETE:
                if (activity.equals(currentActivity))
                {
                    currentActivity = null;
                }
                break;
            default:
View Full Code Here

Examples of net.baguajie.domains.Activity

      trackShipRepository.save(ts);
    }
    if(tracked){
      trackShipRepository.save(ts);
      // save activity
      Activity activity = new Activity();
      activity.setOwner(signInUser.getId());
      activity.setCreatedAt(new Date());
      activity.setTargetSpot(target.getId());
      activity.setType(ActivityType.TRACK);
      activity.setBy(sessionUtil.getBy(session));
      activityRepository.save(activity);
    }
    return new AjaxResult(AjaxResultCode.SUCCESS);
  }
View Full Code Here

Examples of nexj.core.meta.workflow.Activity

            new Object[]{assignment.getName()});
      }

      if (fork.getConcurrentCount() == 1)
      {
         Activity activity = fork.getConcurrent(0);

         if (activity.getStep(0) instanceof Timeout)
         {
            activity.addStep(new Completion(assignment));
         }

         if (decision.getBranchCount() > 1)
         {
            for (int i = 0; i != activity.getStepCount(); ++i)
            {
               assignment.getActivity().addStep(activity.getStep(i));
            }

            return decision;
         }

         if (decision.getBranch(0).getStepCount() != 0)
         {
            for (int i = 0; i != activity.getStepCount(); ++i)
            {
               assignment.getActivity().addStep(activity.getStep(i));
            }

            activity = decision.getBranch(0);

            for (int i = 0; i != activity.getStepCount() - 1; ++i)
            {
               assignment.getActivity().addStep(activity.getStep(i));
            }
         }
         else
         {
            for (int i = 0; i != activity.getStepCount() - 1; ++i)
            {
               assignment.getActivity().addStep(activity.getStep(i));
            }
         }

         return activity.getStep(activity.getStepCount() - 1);
      }

      assignment.getActivity().addStep(fork);

      Join join = new Join(fork);
View Full Code Here

Examples of org.activiti.bpmn.model.Activity

      }
    }
   
    if (flowElement instanceof Activity) {
     
      Activity activity = (Activity) flowElement;
      for (BoundaryEvent boundaryEvent : activity.getBoundaryEvents()) {
        outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(boundaryEvent.getId()));
      }
     
      if (activity.isAsynchronous()) {
        propertiesNode.put(PROPERTY_ASYNCHRONOUS, PROPERTY_VALUE_YES);
      }
     
      if (activity.isNotExclusive()) {
        propertiesNode.put(PROPERTY_EXCLUSIVE, PROPERTY_VALUE_NO);
      }
     
      if (activity.getLoopCharacteristics() != null) {
        MultiInstanceLoopCharacteristics loopDef = activity.getLoopCharacteristics();
        if (StringUtils.isNotEmpty(loopDef.getLoopCardinality()) || StringUtils.isNotEmpty(loopDef.getInputDataItem()) ||
            StringUtils.isNotEmpty(loopDef.getCompletionCondition())) {
         
          if (loopDef.isSequential() == false) {
            propertiesNode.put(PROPERTY_MULTIINSTANCE_SEQUENTIAL, PROPERTY_VALUE_NO);
          }
          if (StringUtils.isNotEmpty(loopDef.getLoopCardinality())) {
            propertiesNode.put(PROPERTY_MULTIINSTANCE_CARDINALITY, loopDef.getLoopCardinality());
          }
          if (StringUtils.isNotEmpty(loopDef.getInputDataItem())) {
            propertiesNode.put(PROPERTY_MULTIINSTANCE_COLLECTION, loopDef.getInputDataItem());
          }
          if (StringUtils.isNotEmpty(loopDef.getElementVariable())) {
            propertiesNode.put(PROPERTY_MULTIINSTANCE_VARIABLE, loopDef.getElementVariable());
          }
          if (StringUtils.isNotEmpty(loopDef.getCompletionCondition())) {
            propertiesNode.put(PROPERTY_MULTIINSTANCE_CONDITION, loopDef.getCompletionCondition());
          }
        }
      }
     
      if (activity instanceof UserTask) {
        addListeners(((UserTask) activity).getTaskListeners(), false,  propertiesNode);
      } else {
        addListeners(activity.getExecutionListeners(), true,  propertiesNode);
      }
    }
   
    flowElementNode.put("outgoing", outgoingArrayNode);
  }
View Full Code Here

Examples of org.apache.commons.workflow.Activity

        ActionErrors errors = new ActionErrors();

        WebContext context = getContext(mapping,request,
            response);

        Activity activity = getActivity(mapping);

        validateInit(errors,context,activity);

        if (errors.empty()) {
View Full Code Here

Examples of org.apache.ode.bpel.compiler.bom.Activity

                for (OScope.Variable v : variables) {
                    v.declaringScope = implicitScope;
                    implicitScope.addLocalVariable(v);
                }
                if (source instanceof ScopeActivity) {
                    Activity scopeChild = ((ScopeActivity) source).getChildActivity();
                    if (scopeChild == null)
                        throw new CompilationException(__cmsgs.errEmptyScope().setSource(source));
                    implicitScope.activity = compile(scopeChild);
                } else {
                    implicitScope.activity = compileActivity(false, source);
View Full Code Here

Examples of org.apache.shindig.social.opensocial.model.Activity

    assertEquals(actual.getTitle(), expected.getTitle());
    assertEquals(actual.getBody(), expected.getBody());
  }

  public static Activity buildTestActivity(String id, String userId, String title, String body) {
    Activity activity = new ActivityImpl(id, userId);
    activity.setTitle(title);
    activity.setBody(body);
    return activity;
  }
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.