Package org.osgi.impl.bundle.obr.resource

Examples of org.osgi.impl.bundle.obr.resource.ResourceImpl$IdentityUrlTransformer


            // do not index our repository.xml, nor the file we are working on now.
            return;
        }
      if (path.getName().endsWith(".jar")) {
        BundleInfo info = new BundleInfo(repository, path);
        ResourceImpl resource = info.build();
        if (urlTemplate != null) {
          doTemplate(path, resource);
        }
                else {
                    resource.setURL(path.toURL());
                }

        resources.add(resource);
      }
      else {
          // this is some other resource, we might want to include it.
          if (all) {
              resources.add(new ResourceImpl(repository, path.toURL()));
          }
      }
    }
  }
View Full Code Here


    Tag repository = new Tag("repository");
    repository.addAttribute("lastmodified", new Date());
    repository.addAttribute("name", name);

    for (Iterator i = resources.iterator(); i.hasNext();) {
      ResourceImpl resource = (ResourceImpl) i.next();
      repository.addContent(resource.toXML());
    }
    return repository;
  }
View Full Code Here

                // do not index our repository.xml, nor the file we are working on now.
                return;
            }
            if (path.getName().endsWith(".jar")) {
                BundleInfo info = new BundleInfo(repository, path);
                ResourceImpl resource = info.build();
                if (urlTemplate != null) {
                    doTemplate(path, resource);
                }
                else {
                    resource.setURL(path.toURI().toURL());
                }

                resources.add(resource);
            }
            else {
                // this is some other resource, we might want to include it.
                if (all) {
                    ResourceMetaData metadata = ResourceMetaData.getArtifactMetaData(path.getName());
                    ResourceImpl impl = new ResourceImpl(repository, metadata.getSymbolicName(), new VersionRange(metadata.getVersion()));
                    impl.setURL(path.toURI().toURL());
                    resources.add(impl);
                }
            }
        }
    }
View Full Code Here

        Tag repository = new Tag("repository");
        repository.addAttribute("lastmodified", new Date());
        repository.addAttribute("name", name);

        for (Iterator i = resources.iterator(); i.hasNext();) {
            ResourceImpl resource = (ResourceImpl) i.next();
            repository.addContent(resource.toXML());
        }
        return repository;
    }
View Full Code Here

  public Resource parseResource()
      throws IOException
  {
    try {
      return new ResourceImpl(obr, this);
    }
    catch (final XmlPullParserException e) {
      throw new LocalStorageException("Error parsing OBR resource", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.osgi.impl.bundle.obr.resource.ResourceImpl$IdentityUrlTransformer

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.