Package com.cardence.lawshelf.model

Examples of com.cardence.lawshelf.model.ContentFull


  private void processContentForSection(SECTION section, Integer parentId) {

    CfrContentContainer content = new CfrContentContainer(Tag.DIV);
    content.addContentList(section.getSUBJECTOrAUTHOrAPPRO());
   
    ContentFull contentModel = new ContentFull();
    contentModel.setSectionId(parentId);
    contentModel.setContent(content.getStyledContent());
    contentModel.setNotes(false);
    contentModel.setFormatType("text/html");
   
    this.persistenceHelper.storeContentFull(contentModel, true);

  }
View Full Code Here


  private void processNotesForSection(SECTION section, Integer parentId) {

    CfrContentContainer content = new CfrContentContainer(Tag.DIV);
    content.addContentList(section.getSUBJECTOrAUTHOrAPPRO());
   
    ContentFull contentModel = new ContentFull();
    contentModel.setSectionId(parentId);
    contentModel.setContent(content.getStyledContent());
    contentModel.setNotes(true);
    contentModel.setFormatType("text/html");
   
    this.persistenceHelper.storeContentFull(contentModel, true);

  }
View Full Code Here

    List<Folder> subfolders = folder.getFolder();
    //Content file = folder.getFile();

    // process content (aka file)
    ContentFull content = contentFullDao.findContentFullBySection(section
        .getId());
    if (content != null) {
      Content jaxbContent = convertFullContent(content);
      if (content.isNotes()) {
        folder.setNotes(jaxbContent);
      } else {
        folder.setFile(jaxbContent);
      }
      // files.add(convertFulLContent(content));
View Full Code Here

      }
    }

    // children are done... do the notes
    if (xmlSection.getNotes() != null) {
      ContentFull notes = convertContentFullXml(xmlSection.getNotes(), s);
      this.storeContentFull(notes, true);
    }
    // children are done... do the content
    if (xmlSection.getFile() != null) {
      ContentFull file = convertContentFullXml(xmlSection.getFile(), s);
      this.storeContentFull(file, true);
    }

    return s;
  }
View Full Code Here

    return s;
  }

  private ContentFull convertContentFullXml(
      com.cardence.lawshelf.model.xml.Content xmlContent, Section section) {
    ContentFull c = new ContentFull();
    c.setFormatType(xmlContent.getContentType());
    c.setContent(xmlContent.getValue());
    c.setNotes(xmlContent.isIsNotes());

    c.setSection(section);
    c.setSectionId(section.getId());

    return c;
  }
View Full Code Here

  private static final String SQL_UPDATE = "update content_full set (content, format_type, is_only_notes) = (?,?,?) where id = ?";
  private static final String SQL_CREATE = "insert into content_full (section_id, content, format_type, is_only_notes) values (?,?,?,?)";

  private static final class ContentMapper implements RowMapper<ContentFull> {
    public ContentFull mapRow(ResultSet rs, int rowNum) throws SQLException {
      ContentFull c = new ContentFull();
      Section section = new Section();
      section.setId(rs.getInt("section_id"));
      c.setContent(rs.getString("content"));
      c.setSection(section);
      c.setSectionId(section.getId());
      c.setNotes(rs.getBoolean("is_only_notes"));
      c.setFormatType(rs.getString("format_type"));
      c.setId(rs.getInt("id"));
      return c;
    }
View Full Code Here

    this.model.addLevelPositionMapping(itempath, currentSection.getLevelPosition());
    this.sectionSequenceTracker.put(itempath, 0); // this is for any
                            // children

    // SAVE CONTENTS
    ContentFull contentFull = this.convertUscFieldsToContentFull(currentSection);
    List<ContentPart> contentPartList = this.convertUscFieldsToContentPartList(currentSection);

    // RULE: If content is ONLY NOTES, it almost always
    // (I have not seen an exception yet)
    // is all DIVS and TABLES...
    // VERY difficult to chop up into content parts... only store full for
    // now.
    persistence.storeContentFull(contentFull, (!currentSection.getIsNewRecord() == Boolean.TRUE));
    if (!contentFull.isNotes()) {
      persistence.storeContentParts(currentSection.getId(), contentFull.getId(), contentPartList,
          (!currentSection.getIsNewRecord() == Boolean.TRUE));
    }

    this.workingUscFieldList = null;
    this.currentUscField = null;
View Full Code Here

                      // stream
    }
  }

  private ContentFull convertUscFieldsToContentFull(Section section) {
    ContentFull content = new ContentFull();
    content.setNotes(true);

    for (Iterator<UscField> it = this.getWorkingUscFieldList().iterator(); it.hasNext();) {

      content = convertUscFieldToContentFull(it.next(), content);
    }

    content.setFormatType(UscTags.FORMATTYPE_HTML);
    content.setSection(section);

    return content;
  }
View Full Code Here

TOP

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

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.