Examples of CHAPTER


Examples of org.gtugs.domain.Chapter

     
      list = new JSONArray();
      for (Event event : events) {
        JSONObject map = new JSONObject();
        map.put("chapterId", event.getChapterId());
        Chapter chapter=chaptersMap.get(event.getChapterId());
        if (chapter!=null) {
          map.put("chapterName", chapter.getName());
          map.put("chapterUrl", "http://www.gtugs.org/chapter.jsp?id=" +
              chapter.getId());
          map.put("chapterWebsite", chapter.getWebsite());
          map.put("chapterStatus", chapter.getStatus());
        }
        map.put("id", event.getId());
        map.put("name", event.getName());
        map.put("timeZone", event.getTimeZone());
        map.put("startDate", event.getStartDate());
View Full Code Here

Examples of org.gtugs.domain.Chapter

        int numEvents = chapters.get(i).getNumEvents();
        int j = i - 1;
        boolean done = false;
        do {
          if (chapters.get(j).getNumEvents() < numEvents) {
            Chapter swapped = chapters.remove(j + 1);
            chapters.add(j, swapped);
            j--;
            if (j < 0) {
              done = true;
            }
View Full Code Here

Examples of org.gtugs.domain.Chapter

      model.put("errorText", errorText);

      return new ModelAndView("admin_error", model);
    }

    Chapter chapter = retrieveChapter(event.getChapterId());

    if (chapter == null) {
      String errorText = "Failed to retrieve chapter with ID \"" +
          event.getChapterId() + "\" -- chapter not found.";
      model.put("errorText", errorText);
View Full Code Here

Examples of org.gtugs.domain.Chapter

          "\" -- event not found.";

      return new ModelAndView("admin_error", "errorText", errorText);
    }

    Chapter chapter = retrieveChapter(event.getChapterId());

    if (chapter == null) {
      String errorText = "Failed to retrieve chapter with ID \"" +
          event.getChapterId() + "\" -- chapter not found.";

      return new ModelAndView("admin_error", "errorText", errorText);
    }
    if (!hasAccess(userService, chapter)) {
      String errorText = "You are not listed as an organizer for the " +
          "chapter associated with this event. Please sign in with an " +
          "organizer's account to access this page.";

      return new ModelAndView("error", "errorText", errorText);
    }

    event.setName(cmd.getName());
    event.setTimeZone(cmd.getTimeZone());
    event.setStartDate(cmd.getStartDate());
    event.setEndDate(cmd.getEndDate());
    event.setStreetAddress(cmd.getStreetAddress());
    event.setRoom(cmd.getRoom());
    event.setCity(cmd.getCity());
    event.setState(cmd.getState());
    event.setZipCode(cmd.getZipCode());
    event.setCountry(cmd.getCountry());
    event.setLatitude(cmd.getLatitude());
    event.setLongitude(cmd.getLongitude());
    event.setUrl(cmd.getUrl());
    event.setDescription(cmd.getDescription());
    event.setAttendeeCount(cmd.getAttendeeCount());
    event.setNotes(cmd.getNotes());

    event.getTopics().clear();
    if (cmd.getOnAndroid()) {
      event.addTopic(Topic.ANDROID);
    }
    if (cmd.getOnGoogleAjaxApis()) {
      event.addTopic(Topic.GOOGLE_AJAX_APIS);
    }
    if (cmd.getOnGoogleAppEngine()) {
      event.addTopic(Topic.GOOGLE_APP_ENGINE);
    }
    if (cmd.getOnGoogleChromeExtensions()) {
      event.addTopic(Topic.GOOGLE_CHROME_EXTENSIONS);
    }
    if (cmd.getOnGoogleEarthApis()) {
      event.addTopic(Topic.GOOGLE_EARTH_APIS);
    }
    if (cmd.getOnGoogleMapsApis()) {
      event.addTopic(Topic.GOOGLE_MAPS_APIS);
    }
    if (cmd.getOnGoogleWaveApis()) {
      event.addTopic(Topic.GOOGLE_WAVE_APIS);
    }
    if (cmd.getOnGoogleWebToolkit()) {
      event.addTopic(Topic.GOOGLE_WEB_TOOLKIT);
    }
    if (cmd.getOnOpenSocial()) {
      event.addTopic(Topic.OPENSOCIAL);
    }
    if (cmd.getOnOther() && cmd.getCustomTopic() != null &&
        !cmd.getCustomTopic().equals("")) {
      event.addTopic(cmd.getCustomTopic());
    }

    eventManager.storeEvent(event);

    return new ModelAndView(new RedirectView(getSuccessView() + "?id=" +
        chapter.getId() + "&t=events"));
  }
View Full Code Here

Examples of qurtext.domain.Chapter

    try {
      String[] location=start.split("[:]");
      int chapterNo=Integer.valueOf(location[0]);
      int verseNo=Integer.valueOf(location[1]);
      int wordNo=Integer.valueOf(location[2]);
      Chapter chapter = ((Collection<Chapter>) pm.newQuery("select from " + Chapter.class.getName() + " where chapterNo==" + chapterNo)
          .execute()).iterator().next();
      for (Section section:chapter.getSections()) {
        if (section.getStartVerse()>verseNo || section.getEndVerse()<verseNo) continue;
        for (Verse verse:section.getVerses()) {
          if (verse.getVerseNo()!=verseNo) continue;
          String[] texts = verse.getText().replaceAll("[\u0640]", "").split("[ ]");
          int maxWordPerRequest=wordNo+WORD_COUNT_PER_REQUEST;
View Full Code Here

Examples of qurtext.domain.Chapter

  @SuppressWarnings("unchecked")
  private Chapter getChapter(PersistenceManager pm, int chapterNo) {
    try {
      String query = "select from " + Chapter.class.getName() + " where chapterNo==" + chapterNo;
      Chapter result=((Collection<Chapter>) pm.newQuery(query)
          .execute()).iterator().next();
      return result;
    } catch (NoSuchElementException e) {
      return null;
    }
View Full Code Here

Examples of qurtext.domain.Chapter

           ,{111,1,5}
           ,{112,1,4}
           ,{113,1,5}
           ,{114,1,6}};
        for (int i=1;i<chapterSize.length;i++) {
          Chapter chapter=getChapter(pm, i);
          if (null==chapter) {
            chapter=new Chapter();
          }
          chapter.setChapterNo(i);
          chapter.setStartVerse(1);
          chapter.setEndVerse(chapterSize[i]);
          chapter.setTitel(getTanzilChapterName(i));
          chapter.setTransliteration(getTanzilChapterTransliteration(i));
          pm.makePersistent(chapter);
          initialChapterMap.put(i,chapter);
        }
        for (int i=0;i<sections.length;i++) {
          int[] sectionData=sections[i];
          Chapter chapter=initialChapterMap.get(sectionData[0]);
          Section section = chapter.getSection(sectionData[1]);
          if (null==section) {
            section=new Section();
            chapter.addSection(section);
          }
          section.setSectionNo(i);
          section.setChapterNo(chapter.getChapterNo());
          section.setStartVerse(sectionData[1]);
          section.setEndVerse(sectionData[2]);
          pm.makePersistent(section);
        }
      }
      Chapter chapter=initialChapterMap.get(start);
      if (null==chapter)
        return -1;
    } finally {
      pm.close();
    }
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.