Examples of Section


Examples of org.pentaho.reporting.engine.classic.core.Section

      if (dataSourceChangeTracker.equals(dataFactoryChangeTrackers.get(id)) == false)
      {
        return true;
      }

      final Section parentSection = parent.getParentSection();
      if (parentSection == null)
      {
        parent = null;
      }
      else
      {
        parent = (AbstractReportDefinition) parentSection.getReportDefinition();
      }
    }
    return false;
  }
View Full Code Here

Examples of org.tei.comparator.web.client.Section

 
  public Section getSection(int file, TableOfContentsEntry entry) {
    DocumentContainer docContainer = DocumentContainer.getInstance();

    Section sec = new Section();
   
    Node section = docContainer.lookUpTocEntryIn(entry, file);
   
    DocumentBuilderFactory documentBuilderFactory =  DocumentBuilderFactory.newInstance();
    documentBuilderFactory.setNamespaceAware(true);
    Document doc = null;
    DOMResult xmlResult = null;
    try {
      DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
      doc = documentBuilder.newDocument();
      Node importedNode = doc.importNode(section, true);
      doc.appendChild(importedNode);
     
      // search for all matchable nodes
      XPathFactory xpf = XPathFactory.newInstance();
      XPath xpath = xpf.newXPath();
      xpath.setNamespaceContext(Utils.getTEINamespaceContext());
      XPathExpression xpexp = xpath.compile("//attribute::tc:cid/..");
      NodeList list = (NodeList) xpexp.evaluate(doc, XPathConstants.NODESET);
      // loop over matchable elements and add tc:match attribute if matched
      for(int i = 0; i < list.getLength(); i++){
        Node node = list.item(i);
        if (node instanceof Element) {
          Element el = (Element) node;
          if(DBManager.getInstance().isConfirmed(el.getAttributeNS(Utils.TEI_COMPARATOR_NAMESPACE, "cid"))){
            el.setAttributeNS(Utils.TEI_COMPARATOR_NAMESPACE, "confirmedMatch", "true");
          } else if(DBManager.getInstance().isMatched(el.getAttributeNS(Utils.TEI_COMPARATOR_NAMESPACE, "cid"))){
              el.setAttributeNS(Utils.TEI_COMPARATOR_NAMESPACE, "matched", "true")
          }
         
          // get notes for section
          List<TCNote> notes = DBManager.getInstance().getNotesFor(TCNote.TYPE_PARAGRAPH, el.getAttributeNS(Utils.TEI_COMPARATOR_NAMESPACE, "cid"));
          sec.addNotes(notes);
        }
      }
     
      // get transformer and transform
      Transformer tf = docContainer.getTEIToHTMLTransformer(file);
      xmlResult = new DOMResult();
      DOMSource source = new DOMSource(doc);
      tf.transform(source, xmlResult);
    } catch (ParserConfigurationException e) {
      e.printStackTrace();
    } catch (TransformerConfigurationException e) {
      e.printStackTrace();
    } catch (TransformerException e) {
      e.printStackTrace();
    } catch (XPathExpressionException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
   
   
    sec.setText(Utils.getXMLNodeAsString(xmlResult.getNode()));
   
    return sec;
  }
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRepoConfig.Section

    //
    HgRepository repo = new HgLookup().detect(repoLoc);
    final HgRepoConfig cfg = repo.getConfiguration();
    assertNotNull(cfg.getPaths());
    assertNotNull(cfg.getExtensions());
    final Section dne = cfg.getSection("does-not-exist");
    assertNotNull(dne);
    assertFalse(dne.exists());
    assertEquals(username, cfg.getSection("ui").getString("username", null));
    final PathsSection p = cfg.getPaths();
    assertTrue(p.getPathSymbolicNames().contains(path1_key));
    assertEquals(path1_value, p.getString(path1_key, null));
    assertTrue(p.hasDefault());
View Full Code Here

Examples of org.wikipediacleaner.api.data.Section

      List<Section> result = new ArrayList<Section>(listSections.size());
      Iterator itSection = listSections.iterator();
      while (itSection.hasNext()) {
        Element sectionNode = (Element) itSection.next();
        try {
          Section section = new Section(
              Integer.valueOf(sectionNode.getAttributeValue("toclevel")),
              Integer.valueOf(sectionNode.getAttributeValue("level")),
              sectionNode.getAttributeValue("line"),
              sectionNode.getAttributeValue("number"),
              Integer.valueOf(sectionNode.getAttributeValue("index")));
View Full Code Here

Examples of pl.tecna.gwt.connectors.client.elements.Section

     */
    for (ConnectionPoint cp : shape.connectionPoints) {
      for (EndPoint ep : cp.gluedEndPoints) {
        Connector conn = ep.connector;
        if (conn.sections.size() > 1) {
          Section secondFromShape = null;
          int sectionLength;
          boolean start = false;
          if (conn.endEndPoint.equals(ep)) {
            secondFromShape = conn.sections.get(conn.sections.size() - 2);

          } else if (conn.startEndPoint.equals(ep)) {
            start = true;
            secondFromShape = conn.sections.get(1);
          }

          if (secondFromShape.isHorizontal()) {
            sectionLength = secondFromShape.endPoint.getLeft() - secondFromShape.startPoint.getLeft();
          } else {
            sectionLength = secondFromShape.endPoint.getTop() - secondFromShape.startPoint.getTop();
          }

          if (start) {
            sectionLength = -sectionLength;
          }

          if (Math.abs(sectionLength) < Shape.SECTION_TOLERANCE) {
            if (secondFromShape.isHorizontal()) {
              horSectionsMap.put(sectionLength, secondFromShape);
            } else {
              vertSectionsMap.put(sectionLength, secondFromShape);
            }
          }
        }
      }
    }

    Integer minHorizontal = Integer.MAX_VALUE;
    Integer minVertical = Integer.MAX_VALUE;
    Section lastHorizontalSection = null;
    Section lastVerticalSection = null;

    for (Integer length : horSectionsMap.keySet()) {
      if (length < minHorizontal) {
        minHorizontal = length;
        lastHorizontalSection = horSectionsMap.get(length);
View Full Code Here

Examples of qurtext.domain.Section

  public void initSectionVerses(int chapterNo, int verseNo) {
    translationParser= new TranslationParser("WEB-INF/quran.txt");
    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      Section section = getSection(chapterNo, verseNo, pm);

      JSONObject verses = getYaqbVerse(section);
          Verse previousVerse=null;
          String previousTransliteration="";;
      for (int i=section.getStartVerse();i<=section.getEndVerse();i++) {
        JSONObject versions=verses.getJSONObject("" + section.getChapterNo() + ":" + i);
        String arabic = getTanzilText(section.getChapterNo(), i);
        String transliteration = versions.getString("Transliteration");
        transliteration=transliteration.replaceAll("[A][A]", "'");
        transliteration=transliteration.replaceAll("[<][b][>]", "<s>");
        transliteration=transliteration.replaceAll("[ ][<][/][b][>]", "</s>");
        transliteration=transliteration.replaceAll("[<][/][b][>]", "</s>");
        transliteration=transliteration.replaceAll("[<][s][t][r][o][n][g][>]", "<s>");
        transliteration=transliteration.replaceAll("[<][/][s][t][r][o][n][g][>]", "</s>");
        String token="" + section.getChapterNo() + ":" + i;
        String translation = versions.getString(TRANSLATOR);
        if ("Free_Minds".equals(TRANSLATOR)) {
          translation=translationParser.getTranslations().get(token).trim();
        }
        TreeSet<String> topicList = translationParser.getVerseTopics().get(token);
        String topics = flattenStringCollection(topicList);
        transliteration = repairShiftedTransliteration(arabic,
            transliteration);
        Verse verse=section.getVerse(chapterNo,i);
        if (null==verse) {
          verse=new Verse();
          section.addVerse(verse);
        }
        verse.setChapterNo(chapterNo);
        verse.setVerseNo(i);
        verse.setText(arabic);
        verse.setUthmani(getTanzilUthmani(section.getChapterNo(), i));
        verse.setTransliteration(transliteration);
        verse.setTranslation(translation);
        verse.setTopics(topics);
        pm.makePersistent(verse);
        if (previousTransliteration.equals(transliteration)) {//suspicious;
View Full Code Here

Examples of rakama.worldtools.data.Section

    }
   
    public void setLight(int x, int y, int z, byte val)
    {
        int sindex = toSectionIndex(x >> 4, y >> 4, z >> 4);
        Section sec = sections[sindex];

        if(sec == null)
            return;

        int eindex = toElementIndex(x & 0xF, y & 0xF, z & 0xF);

        if(mode == Mode.BLOCKLIGHT)
            sec.setBlockLight(eindex, val);
        else
            sec.setSkyLight(eindex, val);
    }
View Full Code Here

Examples of ru.org.linux.section.Section

  }

  private Map<String, Object> getNewsSection(HttpServletRequest request, String tag) throws TagNotFoundException {
    Template tmpl = Template.getTemplate(request);

    Section newsSection = sectionService.getSection(Section.SECTION_NEWS);

    List<Topic> newsTopics = topicListService.getTopicsFeed(
            newsSection,
            null,
            tag,
View Full Code Here

Examples of sun.swing.SwingUtilities2.Section

        int col = columnAtPoint(p);
        boolean outside = Boolean.TRUE == getClientProperty("Table.isFileList")
                          && SwingUtilities2.pointOutsidePrefSize(this, row, col, p);

        Rectangle rect = getCellRect(row, col, true);
        Section xSection, ySection;
        boolean between = false;
        boolean ltr = getComponentOrientation().isLeftToRight();

        switch(dropMode) {
            case USE_SELECTION:
View Full Code Here

Examples of ucar.ma2.Section

  public boolean hasNext() { // have to actually fetch the thing here
    if (totalNelemsDone >= totalNelems) return false;

    if ((index == null) || !index.hasNext()) { // get new data node
      try {
        Section dataSection;
        DataChunk dataChunk;

        while (true) { // look for intersecting sections

          if (!chunkIterator.hasNext()) {
            next = null;
            return false;
          }

          // get next dataChunk
          try {
            dataChunk = chunkIterator.next();
          } catch (IOException e) {
            e.printStackTrace();
            next = null;
            return false;
          }

          // make the dataSection for this chunk
          dataSection = new Section(dataChunk.offset, chunkSize);
          if (dataSection.intersects(want)) // does it intersect ?
            break;
        }

        if (debug)
          System.out.println(" found intersecting section: " + dataSection + " for filePos " + dataChunk.filePos);
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.