Package org.corrib.s3b.sscf.manage

Examples of org.corrib.s3b.sscf.manage.BookmarksHelper


    //XXX:fix foafrealm!!
    Person person = null;//PersonFactory.getPersonIfExists(new URIImpl(ownerMbox), null,innerModel);
    //if (person == null) {
    //  person = PersonFactory.createPerson(ownerMbox, null,innerModel);
    //}
    BookmarksHelper bh = new BookmarksHelper(dirUri);
    String uri = bh.createResource(dirUri, dirLabel, dirComment, person,true);
   
    try
    {
      innerModel.addStatement(null,innerModel.createURI(uri), innerModel.createURI(S3B_SSCF.isIn), innerModel.createURI(ownerMbox));
    }
    catch (Exception e)
    {
      //if the inserting is failed, removed just created resource
      XfoafSscfResource xfsr = XfoafSscfResource.getXfoafSscfResource(uri,innerModel);
      if(xfsr!=null)
        bh.removeResource(xfsr, person);
    }
   
    return uri;
  }
View Full Code Here


  public String insertResource(String destinations,String item,String view,HttpSession session,String serviceAddr, String tags)
  {
    String[] destTable = destinations.split(";;");
    Person viewer = PersonFactory.findPerson(view);
   
    BookmarksHelper bh = new BookmarksHelper("http://foo.bar");
    String createdUri = bh.createResource(item);
   
    if(createdUri!=null)
    {
      XfoafSscfResource res = XfoafSscfResource.getXfoafSscfResource(createdUri);
      if(res!=null)
      {
        bh.placeResources(res, destTable, viewer);
     
        //notify synchronization resource loader that resources of user were changed
          ResourcesLoader.setLastChangeDate(view, new Date());
        //it will be useful to have type here.
        return getBookmarks(res.getStringURI(), viewer.getURI().toString(), session, 2, true,false,serviceAddr,null);
View Full Code Here

    if(ikhUri!=null&&!"".equals(ikhUri.trim())) {
      IKHConnector ikhc = new IKHConnector(ikhUri+"$"+item+"$",tags,view);
      ikhc.start();
    }
   
    BookmarksHelper bh = new BookmarksHelper("http://foo.bar");
   
    if(type.equals("web"))
      resourceType = S3B_SSCF.WebResource;
    else if(type.equals("hex"))
      resourceType = S3B_SSCF.HexResource;
   
    if(viewer!=null)
    {
      if(viewer.getMbox_sha1sum()!=null)
        wbr = WebBookmarkResource.getWebBookmarkResource(item,null,viewer.getMbox_sha1sum(),resourceType);
      else
        wbr = WebBookmarkResource.getWebBookmarkResource(item,view,null,resourceType);
     
      if(wbr!=null)
      {
        wbr.setLabel(label);
        if(desc!=null&&!"".equals(desc.trim()))
          wbr.setComment(desc);
       
        //ArrayList<String> ltags = new ArrayList<String>();
        bh.placeResources(wbr, destTable, viewer);
        /*
         * Add tags for newly created resource
         */
        try {
          if (tags != null) {
View Full Code Here

TOP

Related Classes of org.corrib.s3b.sscf.manage.BookmarksHelper

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.