Package com.cardence.lawshelf.ios.xml

Examples of com.cardence.lawshelf.ios.xml.Folder


  }

  private Folder generateFolder(int index) {
    int uIdx = index * RANDOM.nextInt(100000);
    Folder folder = new Folder();
    folder.setCategory("my test " + uIdx + " category");
    folder.setDisplay("hello display world for [" + uIdx + "]");
    folder.setId("" + RANDOM.nextInt());
    folder.setTitle("Title " + index + ". This is my most amazing title ");
    folder.setCategoryIndex(BigInteger.valueOf(index));
    folder.setBackendID(BigInteger.valueOf(uIdx));

    if (RANDOM.nextBoolean()) {
      // subfolders
      int totalFolders = RANDOM.nextInt(3) + 1;
      for (int i = 0; i < totalFolders; i++) {
        folder.getFolder().add(generateFolder(index));
      }

    } else {
      // files
      if (RANDOM.nextBoolean()) {
        folder.setFile(generateFile(index));
      } else {
        folder.setNotes(generateFile(index));
      }
    }
    return folder;
  }
View Full Code Here


    return asset;
  }

  private Folder convertSection(Section section) {
    Folder folder = new Folder();

    folder.setCategory(section.getLevelType());
    folder.setCategoryIndex(BigInteger.valueOf(section.getSectionSequence()));
    folder.setDisplay(section.getHeading());
    folder.setReference(section.getShortHeading());
    folder.setTitle(section.getTextHeading());
    folder.setBackendID(BigInteger.valueOf(section.getId()));
    folder.setId(section.getCodeId() + "-" + section.getId());

    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));
    }

    // recursively process children
View Full Code Here

TOP

Related Classes of com.cardence.lawshelf.ios.xml.Folder

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.