Package devplugin

Examples of devplugin.Program


  /**
   * convert the program items to programs after start finished
   */
  void loadPrograms() {
    for (MarkListProgramItem programItem : mProgramItems) {
      Program program = programItem.getProgram();
      if (program != null) {
        addProgram(program);
        program.mark(SimpleMarkerPlugin.getInstance());
        program.validateMarking();
      }
    }
    mProgramItems.clear();
  }
View Full Code Here


        Date date = new Date();
        for (int d = 0; d < 31; d++) {

            for (Channel channel : channels) {
              for (Iterator<Program> it = Plugin.getPluginManager().getChannelDayProgram(date, channel); it.hasNext();) {
                  Program program = it.next();
                  if ((program != null) && (program.getTitle() != null) && (program.getTitle().equalsIgnoreCase(mTitle))) {
                      mProgramVector.add(program);
                  }
              }
            }
            date = date.addDays(1);
View Full Code Here

    Enumeration<Program> en = mUpdateList.elements();
    while (en.hasMoreElements()) {
      Element program = document.createElement("program");
      getratings.appendChild(program);

      Program prog = en.nextElement();

      program.appendChild(createNodeWithTextValue(document, "title", prog.getTitle()));

    }

    XMLWriter writer = new XMLWriter();
    writer.writeDocumentToOutputStream(document, output, "UTF-8");
View Full Code Here

    Date date = new Date();
    date = date.addDays(-1);
    for (int d = 0; d < 32; d++) {
      for (Channel channel : channels) {
        for (Iterator<Program> it = Plugin.getPluginManager().getChannelDayProgram(date, channel); it.hasNext();) {
          Program program = it.next();
          if ((program != null) && mPlugin.isProgramRateable(program)) {
            if (!table.containsKey(program.getTitle())) {
              table.put(program.getTitle(), program);
            }
          }
        }
      }
View Full Code Here

            Channel chan = conf.getChannelForExternalId(channel);

            if (chan != null) {
              for (Iterator<Program> it = CapturePlugin.getPluginManager().getChannelDayProgram(date, chan); it.hasNext();) {
                Program prog = it.next();

                if ((prog.getHours() == hour) && (prog.getMinutes() == min)) {
                  programs.add(prog);
                }
              }
            }
View Full Code Here

              // This day has data -> remember it
              lastDayWithData = day;

              // Search this day program
              for (int i = 0; i < dayProg.getProgramCount(); i++) {
                final Program prog = dayProg.getProgramAt(i);
                if (matches(prog, fieldArr)) {
                  if(listModel != null) {
                    SwingUtilities.invokeLater(new Runnable() {
                      public void run() {
                        int insertIndex = 0;

                        for(int index = 0; index < listModel.getSize(); index++) {
                          Program p = (Program)listModel.get(index);

                          if(ProgramUtilities.getProgramComparator().compare(p,prog) < 0) {
                            insertIndex = index+1;
                          }
                        }
View Full Code Here

      int endTimeLimit = channel.getEndTimeLimit();

      int size = dataFile.readInt();
      mDayProgram.removeAllPrograms();
      for (int i = 0; i < size; i++) {
        Program prog = loadProgram(dataFile, date, channel);

        if (prog != null) {
          int time = prog.getHours() * 60 + prog.getMinutes();
          if (timeLimited && !update) {
            if ((startTimeLimit < endTimeLimit && time >= startTimeLimit && time < endTimeLimit)
                || (endTimeLimit < startTimeLimit && (time < endTimeLimit || time >= startTimeLimit))) {
              mDayProgram.addProgram(prog);
            }
View Full Code Here

      Channel channel = Channel.readData(objIn, false);

      int size = objIn.readInt();
      mDayProgram.removeAllPrograms();
      for (int i = 0; i < size; i++) {
        Program prog = loadProgram(objIn, date, channel);
        mDayProgram.addProgram(prog);
      }

      stream.close();
      saveDayProgram(true);
View Full Code Here

      channel.writeToDataFile(dataFile);

      int programCount = mDayProgram.getProgramCount();
      dataFile.writeInt(programCount);
      for (int i = 0; i < programCount; i++) {
        Program program = mDayProgram.getProgramAt(i);
        saveProgram(program, dataFile);
      }

      dataFile.close();
    } finally {
View Full Code Here

  private boolean calculateMissingLengths(ChannelDayProgram channelProg) {
    boolean somethingChanged = false;
    // Go through all programs and correct them
    // (This is fast, if no correction is needed)
    for (int progIdx = 0; progIdx < channelProg.getProgramCount(); progIdx++) {
      Program program = channelProg.getProgramAt(progIdx);
      if (!(program instanceof MutableProgram)) {
        continue;
      }

      MutableProgram prog = (MutableProgram) program;

      if (prog.getLength() <= 0) {
        // Try to get the next program
        Program nextProgram = null;
        if ((progIdx + 1) < channelProg.getProgramCount()) {
          // Try to get it from this ChannelDayProgram
          nextProgram = channelProg.getProgramAt(progIdx + 1);
        } else {
          // This is the last program -> Try to get the first program of the
View Full Code Here

TOP

Related Classes of devplugin.Program

Copyright © 2015 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.