Package com.cardence.lawshelf.model

Examples of com.cardence.lawshelf.model.ContentPart


      + "(content, section_id, content_id, content_sequence, is_heading, is_notes, content_type, notes_type, format_type) "
      + "values (?, ?, ?, ?, ?, ?, ?, ?, ?)";

  private static final class ContentMapper implements RowMapper<ContentPart> {
    public ContentPart mapRow(ResultSet rs, int rowNum) throws SQLException {
      ContentPart c = new ContentPart();
      Section section = new Section();
      section.setId(rs.getInt("section_id"));
      c.setSection(section);
      c.setSectionId(section.getId());
      c.setContent(rs.getString("content"));
      c.setContentSequence(rs.getInt("content_sequence"));
      c.setContentType(rs.getString("content_type"));
      c.setHeader(rs.getBoolean("is_heading"));
      c.setNotes(rs.getBoolean("is_notes"));
      c.setNotesType(rs.getString("notes_type"));
      c.setContentId(rs.getInt("content_id"));
      c.setFormatType(rs.getString("format_type"));
      c.setId(rs.getInt("id"));
      return c;
    }
View Full Code Here


    ArrayList<ContentPart> contentPartList = new ArrayList<ContentPart>();

    int counter = startSequence;
    for (Iterator<TagElement> it = field.getTagElementList().iterator(); it.hasNext();) {
      TagElement el = it.next();
      ContentPart content = convertTagElementToContentPart(el);
      content.setContentType(field.getTopLevelFieldName());
      content.setContentSequence(counter++);
      content.setSection(section);

      if (field.isPartOfStructural() || field.isPartOfCode() || field.isPartOfNotes()) {
        content.setNotes(true);
        content.setNotesType(field.getFieldName());
      } else {
        content.setNotes(false);
      }

      contentPartList.add(content);
    }
View Full Code Here

    // addAttributes(el.getAttributeMap(), content);
    return content;
  }

  private ContentPart convertTagElementToContentPart(TagElement el) {
    ContentPart content = new ContentPart();
    if (el.isDiv() || el.isTable()) {
      content.setContent(el.getOuterHTML());
    } else {
      content.setContent(el.getInnerHTML());
    }
    content.setHeader(el.isHeading());
    content.setFormatType(UscTags.FORMATTYPE_HTML);

    addAttributes(el.getAttributeMap(), content);

    return content;
  }
View Full Code Here

TOP

Related Classes of com.cardence.lawshelf.model.ContentPart

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