DataModelHelper
public class DataModelHelperImpl extends Object implements DataModelHelper
Modifier and Type | Field | Description |
---|---|---|
static String |
BUNDLE_LICENSE |
|
static String |
BUNDLE_SOURCE |
Constructor | Description |
---|---|
DataModelHelperImpl() |
Modifier and Type | Method | Description |
---|---|---|
Capability |
capability(String name,
Map properties) |
Create a capability
|
Resource |
createResource(URL bundleUrl) |
Create a resource for the bundle located at the
given location.
|
Resource |
createResource(Attributes attributes) |
Create a resource corresponding to the given manifest
entries.
|
ResourceImpl |
createResource(org.apache.felix.bundlerepository.impl.DataModelHelperImpl.Headers headers) |
|
Resource |
createResource(org.osgi.framework.Bundle bundle) |
Create a resource corresponding to the given bundle.
|
org.osgi.framework.Filter |
filter(String filter) |
Create an extender filter supporting the SUBSET, SUPERSET and other extensions
|
Capability |
readCapability(Reader reader) |
|
Capability |
readCapability(String xml) |
|
Property |
readProperty(Reader reader) |
|
Property |
readProperty(String xml) |
|
Repository |
readRepository(Reader reader) |
|
Repository |
readRepository(String xml) |
|
Requirement |
readRequirement(Reader reader) |
|
Requirement |
readRequirement(String xml) |
|
Resource |
readResource(Reader reader) |
|
Resource |
readResource(String xml) |
|
RepositoryImpl |
repository(InputStream is,
String uri) |
|
Repository |
repository(URL url) |
Create a repository from the specified URL.
|
Repository |
repository(Resource[] resources) |
Create a repository for the given set of resources.
|
Requirement |
requirement(String name,
String filter) |
Create a simple requirement to be used for selection
|
String |
writeCapability(Capability capability) |
|
void |
writeCapability(Capability capability,
Writer writer) |
|
String |
writeProperty(Property property) |
|
void |
writeProperty(Property property,
Writer writer) |
|
String |
writeRepository(Repository repository) |
|
void |
writeRepository(Repository repository,
Writer writer) |
|
String |
writeRequirement(Requirement requirement) |
|
void |
writeRequirement(Requirement requirement,
Writer writer) |
|
String |
writeResource(Resource resource) |
|
void |
writeResource(Resource resource,
Writer writer) |
public static final String BUNDLE_LICENSE
public static final String BUNDLE_SOURCE
public Requirement requirement(String name, String filter)
DataModelHelper
requirement
in interface DataModelHelper
public org.osgi.framework.Filter filter(String filter)
DataModelHelper
filter
in interface DataModelHelper
filter
- the string filterpublic Repository repository(URL url) throws Exception
DataModelHelper
repository
in interface DataModelHelper
Exception
public RepositoryImpl repository(InputStream is, String uri) throws Exception
Exception
public Repository repository(Resource[] resources)
DataModelHelper
repository
in interface DataModelHelper
resources
- an array of resourcespublic Capability capability(String name, Map properties)
DataModelHelper
capability
in interface DataModelHelper
name
- name of this capabilityproperties
- the propertiespublic String writeRepository(Repository repository)
writeRepository
in interface DataModelHelper
public void writeRepository(Repository repository, Writer writer) throws IOException
writeRepository
in interface DataModelHelper
IOException
public String writeResource(Resource resource)
writeResource
in interface DataModelHelper
public void writeResource(Resource resource, Writer writer) throws IOException
writeResource
in interface DataModelHelper
IOException
public String writeCapability(Capability capability)
writeCapability
in interface DataModelHelper
public void writeCapability(Capability capability, Writer writer) throws IOException
writeCapability
in interface DataModelHelper
IOException
public String writeRequirement(Requirement requirement)
writeRequirement
in interface DataModelHelper
public void writeRequirement(Requirement requirement, Writer writer) throws IOException
writeRequirement
in interface DataModelHelper
IOException
public String writeProperty(Property property)
writeProperty
in interface DataModelHelper
public void writeProperty(Property property, Writer writer) throws IOException
writeProperty
in interface DataModelHelper
IOException
public Resource createResource(org.osgi.framework.Bundle bundle)
DataModelHelper
createResource
in interface DataModelHelper
bundle
- the bundlepublic Resource createResource(URL bundleUrl) throws IOException
DataModelHelper
createResource
in interface DataModelHelper
bundleUrl
- the location of the bundleIOException
public Resource createResource(Attributes attributes)
DataModelHelper
createResource
in interface DataModelHelper
attributes
- the manifest headerspublic ResourceImpl createResource(org.apache.felix.bundlerepository.impl.DataModelHelperImpl.Headers headers)
public Repository readRepository(String xml) throws Exception
readRepository
in interface DataModelHelper
Exception
public Repository readRepository(Reader reader) throws Exception
readRepository
in interface DataModelHelper
Exception
public Resource readResource(String xml) throws Exception
readResource
in interface DataModelHelper
Exception
public Resource readResource(Reader reader) throws Exception
readResource
in interface DataModelHelper
Exception
public Capability readCapability(String xml) throws Exception
readCapability
in interface DataModelHelper
Exception
public Capability readCapability(Reader reader) throws Exception
readCapability
in interface DataModelHelper
Exception
public Requirement readRequirement(String xml) throws Exception
readRequirement
in interface DataModelHelper
Exception
public Requirement readRequirement(Reader reader) throws Exception
readRequirement
in interface DataModelHelper
Exception
public Property readProperty(String xml) throws Exception
readProperty
in interface DataModelHelper
Exception
public Property readProperty(Reader reader) throws Exception
readProperty
in interface DataModelHelper
Exception
Copyright © 2018. All rights reserved.