Examples of BoostedNode


Examples of gluebooster.basic.collections.BoostedNode

    return slipcase; //BoostedNode slipcase =
  }
 
  @SuppressWarnings("unchecked")
  public static BoostedNode newZoomInBook (BoostedNode parent, Object documentationType, HasDocumentation content, DocumentationContext context, ChangeListener listener, boolean close) throws Exception{
    BoostedNode book = BoostedNodeUtils.createZoomInNode(parent, listener, getDocumentationResourcesTranslation(context).getString(documentationType.toString()), null);
    book.getAttributes().setType(GeneralConstants.BOOK);
    //book.getAttributes().setName(getDocumentationResourcesTranslation(context).getString(documentationType.toString()));
    //todo create heading, title, etc.
   
    if (DocumentationResourecesId.DOCUMENTATION_DEVELOPER.equals(documentationType)){
      BookUtils.createDiv(book, "The application may be created using the following steps.");
    }
    
    content.fillDocumentation(documentationType, book, context);
    //todo create index etc
    if (close)
      book.close();//the book is complete
   
    return book;
    
  }
View Full Code Here

Examples of gluebooster.basic.collections.BoostedNode

            throw new IllegalStateException(
                "No filename in documentation context for key "
                    + DocumentationContext.DOCUMENTATION_TARGET_PARAMETER);
        } else if (attributes instanceof ObjectAttributes) {
          BoostedNode documentationNode = (BoostedNode) event
              .getSource();

          ObjectAttributes objectAttributes = (ObjectAttributes) attributes;
          Object command = objectAttributes.getName();
View Full Code Here

Examples of gluebooster.basic.collections.BoostedNode

      //write the list of books
      Document doc = DomUtils.createDefaultDocumentBuilder().newDocument();
      Element body = createHtml(doc, documentationNode.getAttributes().getName(), HTML.Tag.BODY);
      Element list = DomUtils.appendElement(doc, body, HTML.Tag.UL);
      for (BoostedNode zoomInFocusPoint: documentationNode.getAllZoomInFocus()){
        BoostedNode zoomInNode = documentationNode.getZoomIn(zoomInFocusPoint, null);
        Object subtype = zoomInNode.getAttributes().getType();
       
        if (GeneralConstants.BOOK.equals(subtype)){
          Element li = DomUtils.appendElement(doc, list, HTML.Tag.LI);
          File file = getDocumentationContext(zoomInNode).getFromAttributesMap(File.class);
          DomUtils.appendElement(doc, li, HTML.Tag.A, CollectionFactory.getDefault().createMap( "href",file.getName() + "/index.html", "target", "content"),zoomInNode.getAttributes().getName());
        }
      }
      OutputStream out = getOutputStream(documentationContext, documentationNode, "booklist.html");
      DomUtils.write(doc, out);
      out.close();
View Full Code Here

Examples of gluebooster.basic.collections.BoostedNode

      /*Element chapter = */DomUtils.appendElement(doc, parentElement, tag, null, chapterNode.getAttributes().getName());
    }
   
    int chapterCount = 0;
    for (BoostedNode zoomInFocusPoint: chapterNode.getAllZoomInFocus()){
      BoostedNode zoomInNode = chapterNode.getZoomIn(zoomInFocusPoint, null);
      Object type = zoomInNode.getAttributes().getType();
     
      if (DocumentationResourecesId.CHAPTER.equals(type)){
        BookContext newBookContext = (BookContext) bookContext.clone();
        newBookContext.setChapterBreadcrumb(Arrays.copyOf(newBookContext.getChapterBreadcrumb(), newBookContext.getChapterBreadcrumb().length + 1) );
        newBookContext.getChapterBreadcrumb()[bookContext.getChapterBreadcrumb().length] = chapterCount++;
        fillBookChapter(zoomInNode, newBookContext, doc, parentElement, true);
      }else if (HTML.Tag.DIV.equals(type)){
         Element div = DomUtils.appendElement(doc, parentElement, HTML.Tag.DIV);
         fillBookChapter(zoomInNode, bookContext, doc, div, false);
      }else if (GeneralConstants.TEXT.equals(type)){
        DomUtils.appendText(doc, parentElement, zoomInNode.getAttributes().getValue());
      }else if (GeneralConstants.RAW.equals(type)){
        DomUtils.appendRaw(doc, parentElement, zoomInNode.getAttributes().getValue());
      }else {
        warningHandler.handleThrowable(new UnsupportedDataTypeException("type " + type ));
      }
    }
     
View Full Code Here

Examples of gluebooster.basic.collections.BoostedNode

      File file = docContext.getFromAttributesMap(File.class);

      if (file == null) {

        BoostedNode parent = documentationNode.getZoomOut(null)
            .getLeft();
        if (parent == null) {
          String filename = (String) context
              .getFromAttributesMap(DocumentationContext.DOCUMENTATION_TARGET_PARAMETER);
          if (filename == null)
View Full Code Here

Examples of gluebooster.basic.collections.BoostedNode

public class BookUtils {
 
  @SuppressWarnings("unchecked")
  public static BoostedNode createSlipcase(BoostedNode parent, ChangeListener listener, Object name){
    BoostedNode slipcase = BoostedNodeUtils.createZoomInNode(parent, listener, name, null);
   
    slipcase.getAttributes().setType(GeneralConstants.SLIPCASE);
    //slipcase.getAttributes().setName(name);
   
    return slipcase;
  }
View Full Code Here

Examples of gluebooster.basic.collections.BoostedNode

    return slipcase;
  }

  @SuppressWarnings("unchecked")
  public static BoostedNode createBook(BoostedNode parent, ChangeListener listener, Object name){
    BoostedNode slipcase = BoostedNodeUtils.createZoomInNode(parent, listener, name, null);
   
    slipcase.getAttributes().setType(GeneralConstants.BOOK);
    //slipcase.getAttributes().setName(name);
   
    return slipcase;
 
View Full Code Here

Examples of net.sf.gluebooster.java.booster.basic.container.BoostedNode

            DocumentationResourcesId.DOCUMENTATION_USER_INSTANCE_DESCRIPTION,
            documentationParent, context);
      }
    } else if (DocumentationResourcesId.DOCUMENTATION_USER_INSTANCE_DESCRIPTION
        .equals(type)) {
      BoostedNode chapter = BookBoostUtils.createChapter(
          documentationParent, "Transformation Graph Description");
      BookBoostUtils
          .createText(
              chapter,
              "The graphic displays an overview of the graph, containing only the top-level-nodes.");
View Full Code Here

Examples of net.sf.gluebooster.java.booster.basic.container.BoostedNode

      /*Element chapter = */DomBoostUtils.appendElement(doc, parentElement, tag, null, chapterNode.getAttributes().getName());
    }
   
    int chapterCount = 0;
    for (BoostedNode zoomInFocusPoint: chapterNode.getAllZoomInFocus()){
      BoostedNode zoomInNode = chapterNode.getZoomIn(zoomInFocusPoint, null);
      Object type = zoomInNode.getAttributes().getType();
     
      if (DocumentationResourcesId.CHAPTER.equals(type)) {
        BookContext newBookContext = (BookContext) bookContext.clone();
        newBookContext.setChapterBreadcrumb(Arrays.copyOf(newBookContext.getChapterBreadcrumb(), newBookContext.getChapterBreadcrumb().length + 1) );
        newBookContext.getChapterBreadcrumb()[bookContext.getChapterBreadcrumb().length] = chapterCount++;
        fillBookChapter(zoomInNode, newBookContext, doc, parentElement, true);
      }else if (HTML.Tag.DIV.equals(type)){
         Element div = DomBoostUtils.appendElement(doc, parentElement, HTML.Tag.DIV);
         fillBookChapter(zoomInNode, bookContext, doc, div, false);
      } else if (TextBoostUtils.TEXT.equals(type)) {
        DomBoostUtils.appendText(doc, parentElement, zoomInNode.getAttributes().getValue());
      }else if (GeneralConstants.RAW.equals(type)){
        DomBoostUtils.appendRaw(doc, parentElement, zoomInNode.getAttributes().getValue());
      }else if (GuiBoostUtils.TYPE_IMAGE.equals(type)){

        String filename = (String) zoomInNode.getAttributes()
            .getFromAttributes(ScriptEngine.FILENAME);
        if (filename == null) {
          ThreadBoostUtils.sleep(2);// to get a new time
          filename = "images/file"
              + System.currentTimeMillis()
              + "."
              + zoomInNode.getAttributes().getFromAttributes(
                  GeneralConstants.FORMAT);
          zoomInNode.getAttributes().setAttribute(
              ScriptEngine.FILENAME, filename);
        }

        Element img = DomBoostUtils.appendElement(doc, parentElement,
            HTML.Tag.IMG, ContainerBoostUtils.createMap(
                HTML.Attribute.SRC,
"../"
                + filename));// the
                                        // ..
                                        // because
                                        // the
                                        // book
                                        // is
                                        // in
                                        // a
                                        // separate
                                        // subdirectory.
                                        // Go
                                        // up
                                        // to
                                        // the
                                        // main
        DocumentationContext documentationContext = getDocumentationContext(zoomInNode);
        String documentationTargetDirname = (String) documentationContext
            .getFromAttributesMap(DocumentationContext.DOCUMENTATION_TARGET_PARAMETER);
        if (documentationTargetDirname == null)
          throw new IllegalStateException(
              "no documentationTargetDirname");

        File documentationTargetDir = new File(
            documentationTargetDirname);

        if (filename == null)
          throw new IllegalStateException("no filename");

        FileUtils.writeByteArrayToFile(new File(documentationTargetDir,
            filename), (byte[]) zoomInNode.getAttributes()
            .getValue());
       
      }else {
        warningHandler.handleThrowable(new UnsupportedDataTypeException("type " + type ));
      }
View Full Code Here

Examples of net.sf.gluebooster.java.booster.basic.container.BoostedNode

public void fillDocumentation(Object type, BoostedNode documentationRoot,
    DocumentationContext context) {
 
    if (DocumentationResourcesId.DOCUMENTATION_TECHNICAL
        .equals(type)) {
    BoostedNode div = BookBoostUtils.createDiv(documentationRoot);
    BookBoostUtils.createText(div, "The class that fetches the resource is " + resourceGettingClass.getSimpleName() + ". The resource is '" + resourceName + "'");
  }
 
 
}
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.