Examples of XResource


Examples of org.foafrealm.manage.XResource

//    }
    Iterator<XResource> it = parent.listContent();
    List<String> urisIn = new ArrayList<String>()// list of resource uris that were already processed.
                            // used to filter for duplicate resources
    while(it.hasNext()){
      XResource childBr = it.next();
      XfoafSscfResource xres= XfoafSscfResource.getXfoafSscfResource(childBr.getStringURI());
      //recursive call to fetch bookmarks stored in subDirectory
      if(xres != null && xres.isDirectory()){
        result.addAll(loadPosts(xres));
      }else if(xres != null){
        if(!urisIn.contains(xres.getURI().toString())){
View Full Code Here

Examples of org.foafrealm.manage.XResource

    XfoafSscfResource resource = XfoafSscfResource.getXfoafSscfResource(uri);
    Iterator<XResource> it = resource.listContent();
    List<XfoafSscfResource> ret = new ArrayList<XfoafSscfResource>();

    while (it.hasNext()) {
      XResource br = it.next();
      if(br instanceof XfoafSscfResource)
      {
        XfoafSscfResource res = (XfoafSscfResource)br;
        if (viewer != null) {
          if (checkCredit(viewer, res)) {
View Full Code Here

Examples of org.foafrealm.manage.XResource

      DirectoryDescription dd = new DirectoryDescription();
     
      //Get name and description
      dd.setName(xsscf.getLabel());
      dd.setDescription(xsscf.getComment());
      XResource xfr = xsscf.getIssuedBy();
      if(xfr instanceof Person) {
        Person tmp = (Person)xfr;
        dd.setOwner(tmp.getName());
      }
     
View Full Code Here

Examples of org.foafrealm.manage.XResource

      boolean isSuggested,boolean inOwn,String serviceAddr,String selectedUri,
      Set<List<String>> pathsToUri) {
    // FriendAuthentication fa = null;

    while (it.hasNext()) {
      XResource resource = it.next();

      if (resource instanceof SiocDataResource) {
        bookmarksTreeSiocData(resource, viewer, buffer, depth, session, it, level, parentIsOwner, standalone, inOwn,selectedUri,pathsToUri);
      }
      if (resource instanceof WebBookmarkResource)
View Full Code Here

Examples of org.foafrealm.manage.XResource

      boolean isSuggested,boolean inOwn,String serviceAddr,String selectedUri,
      Set<List<String>> pathsToUri) {
   
    Person issuer = null;
    int level = _level;
    XResource xfr = resource.getIssuedBy();
    if(xfr instanceof Person)
      issuer = (Person)xfr;
   
    boolean isDir = resource.isDirectory();
    boolean isOwner = false;
View Full Code Here

Examples of org.foafrealm.manage.XResource

   * @return - JSON object with tree nodes.
   */
  private String getBookmarks(String item,String view,HttpSession session,int level,boolean paste,boolean standalone,String serviceAddr,String type)
  {
    Person viewer;
    XResource resource;
   
    boolean personEqViewer = false;
   
    //TODO: change to get person - this person exists
    viewer = PersonFactory.findPerson(view);
    if(!paste&&item!=null&&item.length()<=8)
    {
      resource = PersonFactory.findPerson(item);
      if(resource!=null)
        personEqViewer = resource.equals(viewer);
    }
    else if(type!=null&&(type.equals(S3B_SSCF.WebResource)||type.equals(S3B_SSCF.HexResource)))
    {
      resource = WebBookmarkResource.getWebBookmarkResource(item);
    }
View Full Code Here

Examples of org.foafrealm.manage.XResource

    if(inbox!=null) {
      Iterator<XResource> it = inbox.listContent();
     
      while(it.hasNext())
      {
        XResource br = it.next();
        JSONObject jo = new JSONObject();
        jo.put("label", br.getLabel());
        jo.put("uri", br.getStringURI());
       
        ja.add(jo);
        i++;
     
    }
View Full Code Here

Examples of org.jboss.osgi.resolver.XResource

                    if (metadata != null) {
                        builder.loadFrom(metadata);
                    } else {
                        builder.loadFrom(module);
                    }
                    XResource res = builder.getResource();
                    res.addAttachment(Module.class, module);
                    injectedEnvironment.getValue().installResources(res);
                    return true;
                }
            }
        }
View Full Code Here

Examples of org.jboss.osgi.resolver.XResource

                File contentFile = getRepositoryEntry(bundlesDir, moduleIdentifier);
                if (contentFile != null) {
                    URL baseURL = bundlesDir.toURI().toURL();
                    String contentPath = contentFile.toURI().toURL().toExternalForm();
                    contentPath = contentPath.substring(baseURL.toExternalForm().length());
                    XResource resource = URLBasedResourceBuilder.createResource(baseURL, contentPath);
                    result.add(resource.getIdentityCapability());
                } else {
                    contentFile = getRepositoryEntry(modulesDir, moduleIdentifier);
                    if (contentFile != null) {
                        URL baseURL = modulesDir.toURI().toURL();
                        String contentPath = contentFile.toURI().toURL().toExternalForm();
                        contentPath = contentPath.substring(baseURL.toExternalForm().length());
                        XResource resource = URLBasedResourceBuilder.createResource(baseURL, contentPath);
                        result.add(resource.getIdentityCapability());
                    }
                }
            } catch (RepositoryResolutionException ex) {
                throw ex;
            } catch (Exception ex) {
View Full Code Here

Examples of org.jboss.osgi.resolver.XResource

                    @Override
                    public XBundleRevision createResource() {
                        return new AbstractBundleRevisionAdaptor(syscontext, module);
                    }
                };
                XResource resource;
                XResourceBuilder builder = XBundleRevisionBuilderFactory.create(factory);
                if (metadata != null) {
                    builder.loadFrom(metadata);
                    resource = builder.getResource();
                    resource.addAttachment(OSGiMetaData.class, metadata);
                } else {
                    builder.loadFrom(module);
                    resource = builder.getResource();
                }
                injectedEnvironment.getValue().installResources(resource);

                // Set the start level of the adapted bundle
                Integer bundleStartLevel = configcap.getStartLevel();
                if (bundleStartLevel != null && bundleStartLevel > 0) {
                    StartLevel plugin = injectedStartLevel.getValue();
                    Long bundleId = resource.getAttachment(Long.class);
                    XBundle bundle = getBundleManager().getBundleById(bundleId);
                    plugin.setBundleStartLevel(bundle, bundleStartLevel);
                }
                return true;
            }
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.