Examples of BookmarkNode


Examples of org.corrib.s3b.sscf.tools.sscf2js.BookmarkNode

      owner = spr.getMaker();
      isOwner = viewer.equals(owner);
     
      nc.setType("siocPost");
   
      BookmarkNode bn = new BookmarkNode();
      bn.setId(spr.getStringURI());
     
      if(spr.getTitle()!=null&&!"".equals(spr.getTitle().trim()))
        bn.setLabel("Post:"+spr.getTitle());
      else
        bn.setLabel("Post:"+spr.getStringURI());
       
      //check if this bookmark is selected this directory        
      if(resource.getStringURI().equals(selectedUri))
      {
        bn.setSelected(true);
      }
      else bn.setSelected(false);
     
      bn.setLevel(level);
      bn.setOwn(parentIsOwner)
      bn.setStandalone(standalone);
      nc.setContent(bn);
    }
    else if (resource instanceof SiocForumResource) {
      SiocForumResource sfr = SiocForumResource.getInstance(resource.getStringURI());
     
View Full Code Here

Examples of org.corrib.s3b.sscf.tools.sscf2js.BookmarkNode

    //set dynamic load
    nc.setDyn(false);
 
    //Web bookmark
    nc.setType("webBookmark");
    BookmarkNode bn = new BookmarkNode();
   
    bn.setId(resource.getResource().toString());
   
    bn.setLabel((resource.getLabel()!=null&&!"".equals(resource.getLabel())) ? escapeForJs(resource.getLabel()) : resource.getStringURI().toString() );
    bn.setHits(resource.getResourceHits());
   
    int savedBy = resource.getSavedByNumber();
    if(savedBy>1)
    {
      bn.setSavedBy(savedBy);
    }
   
    //check if this bookmark is selected this directory        
    if(resource.getStringURI().toString().equals(selectedUri))
    {
      bn.setSelected(true);
    }
    else bn.setSelected(false);
     
    bn.setLevel(level+1);
    bn.setOwn(parentIsOwner)
    bn.setStandalone(standalone);
    bn.setHref(resource.getSeeAlso()!=null?resource.getSeeAlso().toString():resource.getStringURI());
    nc.setContent(bn);
   
    //add created nodes to the buffer
    nc.toJSON(buffer)
  }
View Full Code Here

Examples of org.corrib.s3b.sscf.tools.sscf2js.BookmarkNode

    //set dynamic load
    nc.setDyn(false);
 
    //Web bookmark
    nc.setType("hexBookmark");
    BookmarkNode bn = new BookmarkNode();
   
    bn.setId(resource.getResource().toString());
   
    bn.setLabel((resource.getLabel()!=null&&!"".equals(resource.getLabel())) ? resource.getLabel() : resource.getStringURI().toString() );
    bn.setHits(resource.getResourceHits());
   
    int savedBy = resource.getSavedByNumber();
    if(savedBy>1)
    {
      bn.setSavedBy(savedBy);
    }
   
    //check if this bookmark is selected this directory        
    if(resource.getStringURI().toString().equals(selectedUri))
    {
      bn.setSelected(true);
    }
    else bn.setSelected(false);
     
    bn.setLevel(level+1);
    bn.setOwn(parentIsOwner)
    bn.setStandalone(standalone);
    bn.setHref(resource.getSeeAlso().toString());
    nc.setContent(bn);
   
    //add created nodes to the buffer
    nc.toJSON(buffer)
  }
View Full Code Here

Examples of org.corrib.s3b.sscf.tools.sscf2js.BookmarkNode

        }
        //bookmark
        else
        {
          nc.setType("bookmark");
          BookmarkNode bn = new BookmarkNode();
          ResourceWrapper bookRes = new ResourceWrapper(resource,serviceAddr,true);
          bn.setId(resource.getResource().toString());
 
          if (bookRes.getAuthors() != null && bookRes.getTitle() != null) {
            bn.setLabel("<i>[" + bookRes.getAuthors() + "]</i> " + bookRes.getTitle());
          } else {
          //TODO: temporarly switched of to get some efficiency - will be substituted with - "fetch details" button
           
            if(resource.getLabel().contains("\"")||resource.getLabel().contains("'"))
              bn.setLabel(resource.getLabel().replace("\"", "\\\"").replace("'", "\\'"));
            else
              bn.setLabel(resource.getLabel()!=null&&!"".equals(resource.getLabel())?resource.getLabel(): resource.getResource().toString());
          }
         
          //check if this bookmark is selected this directory        
          if(isSelected)
          {
            bn.setSelected(true);
          }
          else bn.setSelected(false);
         
          bn.setHits(resource.getResourceHits());
          bn.setLevel(level);
          bn.setOwn(parentIsOwner)
          bn.setStandalone(standalone);
          nc.setContent(bn);
        }
       
        //add created nodes to the buffer
        if(reachable)
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.