当前位置: 首页>>代码示例>>Java>>正文


Java Repository类代码示例

本文整理汇总了Java中org.apache.felix.bundlerepository.Repository的典型用法代码示例。如果您正苦于以下问题:Java Repository类的具体用法?Java Repository怎么用?Java Repository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Repository类属于org.apache.felix.bundlerepository包,在下文中一共展示了Repository类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUpOnlineRepo

import org.apache.felix.bundlerepository.Repository; //导入依赖的package包/类
/**
 * initializes the online repository
 * information comes from the pathvisio.xml file
 * in the repository
 * such an XML file can contain more than one 
 * repository
 */
private void setUpOnlineRepo(Repository repo, URL url) {
	if(repo != null) {
		Logger.log.info("Initialize repository " + url);
		
		List<PVRepository> repositories = readPluginInfo(url);
		if(repositories != null) {
			for(PVRepository r : repositories) {
				// set to installed if bundle is present in local repository
				for(BundleVersion version : r.getBundleVersions()) {
					if(localHandler.containsBundle(version.getSymbolicName()) != null) {
						version.getBundle().setInstalled(true);
					}
				}
			}
			// a database can contain more than one repository
			// all of them will be added separately
			onlineRepos.addAll(repositories);
		}
	}
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:28,代码来源:PluginManager.java

示例2: BndRunOption

import org.apache.felix.bundlerepository.Repository; //导入依赖的package包/类
private BndRunOption(File bndRunFile, URL repoURL) throws Exception {
    props.load(new FileInputStream(bndRunFile));
    DataModelHelperImpl dataModelHelper = new DataModelHelperImpl();
    Repository repository = dataModelHelper.repository(repoURL);
    addRunBundles(repository);
    addSystemPackages(options, props);
}
 
开发者ID:cschneider,项目名称:reactive-components,代码行数:8,代码来源:BndRunOption.java

示例3: addRunBundles

import org.apache.felix.bundlerepository.Repository; //导入依赖的package包/类
private void addRunBundles(Repository repository) {
    BundleUris bundleUris = new BundleUris(repository);
    String runBundles = (String)props.get("-runbundles");
    List<BundleRef> bundles = RunBundles.parse(runBundles);
    
    for (BundleRef bundle : bundles) {
        String uri = bundleUris.getUri(bundle.symbolicName, bundle.version);
        options.add(CoreOptions.bundle(uri));
    }
}
 
开发者ID:cschneider,项目名称:reactive-components,代码行数:11,代码来源:BndRunOption.java

示例4: getRemoteRepositories

import org.apache.felix.bundlerepository.Repository; //导入依赖的package包/类
@Override
public Collection<String> getRemoteRepositories() {
    ServiceReference ref = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
    RepositoryAdmin repoAdmin = (RepositoryAdmin)bundleContext.getService(ref);
    Repository[] repositories = repoAdmin.listRepositories();
    List<String> results = new ArrayList<>();
    for (Repository repository : repositories) {
        results.add(repository.getURI());
    }
    return results;
}
 
开发者ID:whizzosoftware,项目名称:hobson-hub-core,代码行数:12,代码来源:OSGIPluginManager.java

示例5: KonektiFelixResource

import org.apache.felix.bundlerepository.Repository; //导入依赖的package包/类
public KonektiFelixResource(String id, Long bundleId, String symbolicName, String version,
		String presentationName, Repository repository, String url,
		Requirement[] requeriments, Capability[] capabilities, String[] categories,
		String licenseUrl, String description, String documentation,
		String copyright, String sourceUrl, String size, String[] keys, Resource resource,
		String bundleStatus, Bundle bundle) {
	super();
	this.id = id;
	this.bundleId = bundleId;
	this.symbolicName = symbolicName;
	this.version = version;
	this.presentationName = presentationName;
	this.repository = repository;
	this.url = url;
	this.requeriments = requeriments;
	this.capabilities = capabilities;
	this.categories = categories;
	this.licenseUrl = licenseUrl;
	this.description = description;
	this.documentation = documentation;
	this.copyright = copyright;
	this.sourceUrl = sourceUrl;
	this.size = size;
	this.keys = keys;
	this.resource = resource;
	this.bundleStatus = bundleStatus;
	this.bundle = bundle;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:29,代码来源:KonektiFelixResource.java

示例6: BundleUris

import org.apache.felix.bundlerepository.Repository; //导入依赖的package包/类
BundleUris(Repository repository) {
    for (Resource res : repository.getResources()) {
        bundleUri.put(getKey(res) , res.getURI());
    }
}
 
开发者ID:cschneider,项目名称:reactive-components,代码行数:6,代码来源:BundleUris.java

示例7: getAllPossibleValues

import org.apache.felix.bundlerepository.Repository; //导入依赖的package包/类
public boolean getAllPossibleValues(final List<Completion> completions,
        final Class<?> requiredType, final String originalUserInput,
        final String optionContext, final MethodTarget target) {
    boolean local = false;
    boolean obr = false;

    if ("".equals(optionContext)) {
        local = true;
    }

    if (optionContext.contains("local")) {
        local = true;
    }

    if (optionContext.contains("obr")) {
        obr = true;
    }

    if (local) {
        final Bundle[] bundles = context.getBundleContext().getBundles();
        if (bundles != null) {
            for (final Bundle bundle : bundles) {
                final String bsn = bundle.getSymbolicName();
                if (bsn != null && bsn.startsWith(originalUserInput)) {
                    completions.add(new Completion(bsn));
                }
            }
        }
    }

    if (obr) {
        final Repository[] repositories = repositoryAdmin
                .listRepositories();
        if (repositories != null) {
            for (final Repository repository : repositories) {
                final Resource[] resources = repository.getResources();
                if (resources != null) {
                    for (final Resource resource : resources) {
                        if (resource.getSymbolicName().startsWith(
                                originalUserInput)) {
                            completions.add(new Completion(resource
                                    .getSymbolicName()));
                        }
                    }
                }
            }
        }
    }

    return false;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:52,代码来源:BundleSymbolicNameConverter.java

示例8: getRepository

import org.apache.felix.bundlerepository.Repository; //导入依赖的package包/类
/**
 * @return the repository
 */
public Repository getRepository() {
	return repository;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:7,代码来源:KonektiFelixResource.java

示例9: setRepository

import org.apache.felix.bundlerepository.Repository; //导入依赖的package包/类
/**
 * @param repository the repository to set
 */
public void setRepository(Repository repository) {
	this.repository = repository;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:7,代码来源:KonektiFelixResource.java


注:本文中的org.apache.felix.bundlerepository.Repository类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。