Examples of Section


Examples of nl.siegmann.epublib.domain.Section

 
      // Add css file
      book.getResources().add(new InputStreamResource(Simple1.class.getResourceAsStream("/book1/book1.css"), "book1.css"));
 
      // Add Chapter 2
      Section chapter2 = book.addResourceAsSection("Second Chapter", new InputStreamResource(Simple1.class.getResourceAsStream("/book1/chapter2.html"), "chapter2.html"));
     
      // Add image used by Chapter 2
      book.getResources().add(new InputStreamResource(Simple1.class.getResourceAsStream("/book1/flowers_320x240.jpg"), "flowers.jpg"));
 
      // Add Chapter2, Section 1
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.Section

                // Get annotation @CsvRecord from the class
                CsvRecord record = cl.getAnnotation(CsvRecord.class);

                // Get annotation @Section from the class
                Section section = cl.getAnnotation(Section.class);

                if (record != null) {
                    LOG.debug("Csv record: {}", record);

                    // Get skipFirstLine parameter
                    skipFirstLine = record.skipFirstLine();
                    LOG.debug("Skip First Line parameter of the CSV: {}" + skipFirstLine);

                    // Get generateHeaderColumnNames parameter
                    generateHeaderColumnNames = record.generateHeaderColumns();
                    LOG.debug("Generate header column names parameter of the CSV: {}", generateHeaderColumnNames);

                    // Get Separator parameter
                    ObjectHelper.notNull(record.separator(), "No separator has been defined in the @Record annotation");
                    separator = record.separator();
                    LOG.debug("Separator defined for the CSV: {}", separator);

                    // Get carriage return parameter
                    crlf = record.crlf();
                    LOG.debug("Carriage return defined for the CSV: {}", crlf);

                    // Get isOrdered parameter
                    messageOrdered = record.isOrdered();
                    LOG.debug("Must CSV record be ordered: {}", messageOrdered);

                    if (ObjectHelper.isNotEmpty(record.quote())) {
                        quote = record.quote();
                        LOG.debug("Quoting columns with: {}", quote);
                    }

                    quoting = record.quoting();
                    LOG.debug("CSV will be quoted: {}", messageOrdered);

                    autospanLine = record.autospanLine();
                    LOG.debug("Autospan line in last record: {}", autospanLine);
                }

                if (section != null) {
                    // Test if section number is not null
                    ObjectHelper.notNull(section.number(), "No number has been defined for the section");

                    // Get section number and add it to the sections
                    sections.put(cl.getName(), section.number());
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.derby.client.am.Section

    private int calculateResultSetFlags() {
        return CodePoint.RSLSETFLG_EXTENDED_SQLDA;
    }

    public void writeSetSpecialRegister(java.util.ArrayList sqlsttList) throws SqlException {
        Section section =
                netAgent_.sectionManager_.getDynamicSection(java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT);

        buildEXCSQLSET(section);

        // SQLSTT:
View Full Code Here

Examples of org.apache.pivot.wtk.Menu.Section

                    sectionIndex--;
                }
            }

            while (sectionIndex >= 0) {
                Section section = sections.get(sectionIndex);
                if (itemIndex == -1) {
                    int sectionLength = section.getLength();
                    itemIndex = sectionLength - 1;
                }

                while (itemIndex >= 0) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }

                    itemIndex--;
                }

                if (itemIndex >= 0) {
                    break;
                }

                sectionIndex--;
            }

            consumed = true;
        } else if (keyCode == Keyboard.KeyCode.DOWN) {
            Menu.SectionSequence sections = menu.getSections();
            int sectionCount = sections.getLength();

            Menu.Item activeItem = menu.getActiveItem();
            int sectionIndex;
            int itemIndex;
            if (activeItem == null) {
                sectionIndex = 0;
                itemIndex = 0;
            } else {
                Menu.Section section = activeItem.getSection();
                sectionIndex = sections.indexOf(section);
                itemIndex = section.indexOf(activeItem) + 1;
            }

            while (sectionIndex < sectionCount) {
                Section section = sections.get(sectionIndex);
                int sectionLength = section.getLength();

                while (itemIndex < sectionLength) {
                    Item item = section.get(itemIndex);

                    if (item.isEnabled()) {
                        item.setActive(true);
                        break;
                    }
View Full Code Here

Examples of org.apache.poi.hpsf.Section

            SummaryInformation.DEFAULT_STREAM_NAME);
        r.read(new FileInputStream(filename));
        Assert.assertNotNull(psa[0]);
        Assert.assertTrue(psa[0].isSummaryInformation());

        final Section s = (Section) (psa[0].getSections().get(0));
        Object p1 = s.getProperty(PropertyIDMap.PID_AUTHOR);
        Object p2 = s.getProperty(PropertyIDMap.PID_TITLE);
        Assert.assertEquals(AUTHOR, p1);
        Assert.assertEquals(TITLE, p2);
    }
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.Section

   */
  public Section getSection(int index)
  {
    initSections();
    SEPX sepx = (SEPX)_sections.get(index + _sectionStart);
    Section sep = new Section(sepx, this);
    return sep;
  }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.Section

    {
            final String mimeType = serverMessage.getMessageHeader().getMimeType();
            byte[] data = new byte[(int) serverMessage.getSize()];
            serverMessage.getContent(ByteBuffer.wrap(data), 0);

            Section bodySection = convertMessageBody(mimeType, data);

            final ByteBuffer allData = encodeConvertedMessage(metaData, bodySection, sectionEncoder);

            return new StoredMessage<MessageMetaData_1_0>()
            {
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.Section

      }
   }

   private static int getMessageType(Message protonMessage)
   {
      Section section = protonMessage.getBody();
      if (section instanceof AmqpValue)
      {
         AmqpValue amqpValue = (AmqpValue) section;
         Object value = amqpValue.getValue();
         if (value instanceof String)
View Full Code Here

Examples of org.apache.shiro.config.Ini.Section

    }
  }

  private void parseGroups(FileSystem fileSystem, Path resourcePath) throws IOException {
    Ini ini = PolicyFiles.loadFromPath(fileSystem, resourcePath);
    Section usersSection = ini.getSection(PolicyFileConstants.USERS);
    if (usersSection == null) {
      LOGGER.warn("No section " + PolicyFileConstants.USERS + " in the " + resourcePath);
      return;
    }
    for (Entry<String, String> userEntry : usersSection.entrySet()) {
      String userName = Strings.nullToEmpty(userEntry.getKey()).trim();
      String groupNames = Strings.nullToEmpty(userEntry.getValue()).trim();
      if (userName.isEmpty()) {
        LOGGER.error("Invalid user name in the " + resourcePath);
        continue;
View Full Code Here

Examples of org.apache.stanbol.enhancer.nlp.model.Section

            sections = Collections.singleton(at).iterator();
        }
       
        //for all sentences (or the whole Text - if no sentences available)
        while(sections.hasNext()){
            Section section = sections.next();
            //Tokenize section
            opennlp.tools.util.Span[] tokenSpans = tokenizer.tokenizePos(section.getSpan());
            for(int i=0;i<tokenSpans.length;i++){
                Token token = section.addToken(tokenSpans[i].getStart(), tokenSpans[i].getEnd());
                log.trace(" > add {}",token);
            }
        }
    }
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.