Class DataModelHelperImpl

    • Constructor Detail

      • DataModelHelperImpl

        public DataModelHelperImpl()
    • Method Detail

      • requirement

        public Requirement requirement​(java.lang.String name,
                                       java.lang.String filter)
        Description copied from interface: DataModelHelper
        Create a simple requirement to be used for selection
        Specified by:
        requirement in interface DataModelHelper
        Returns:
      • filter

        public org.osgi.framework.Filter filter​(java.lang.String filter)
        Description copied from interface: DataModelHelper
        Create an extender filter supporting the SUBSET, SUPERSET and other extensions
        Specified by:
        filter in interface DataModelHelper
        Parameters:
        filter - the string filter
        Returns:
      • repository

        public Repository repository​(java.net.URL url)
                              throws java.lang.Exception
        Description copied from interface: DataModelHelper
        Create a repository from the specified URL.
        Specified by:
        repository in interface DataModelHelper
        Returns:
        Throws:
        java.lang.Exception
      • repository

        public RepositoryImpl repository​(java.io.InputStream is,
                                         java.lang.String uri)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • repository

        public Repository repository​(Resource[] resources)
        Description copied from interface: DataModelHelper
        Create a repository for the given set of resources. Such repositories can be used to create a resolver that would resolve on a subset of available resources instead of all of them.
        Specified by:
        repository in interface DataModelHelper
        Parameters:
        resources - an array of resources
        Returns:
        a repository containing the given resources
      • capability

        public Capability capability​(java.lang.String name,
                                     java.util.Map properties)
        Description copied from interface: DataModelHelper
        Create a capability
        Specified by:
        capability in interface DataModelHelper
        Parameters:
        name - name of this capability
        properties - the properties
        Returns:
        a new capability with the specified name and properties
      • writeRepository

        public void writeRepository​(Repository repository,
                                    java.io.Writer writer)
                             throws java.io.IOException
        Specified by:
        writeRepository in interface DataModelHelper
        Throws:
        java.io.IOException
      • writeResource

        public void writeResource​(Resource resource,
                                  java.io.Writer writer)
                           throws java.io.IOException
        Specified by:
        writeResource in interface DataModelHelper
        Throws:
        java.io.IOException
      • writeCapability

        public void writeCapability​(Capability capability,
                                    java.io.Writer writer)
                             throws java.io.IOException
        Specified by:
        writeCapability in interface DataModelHelper
        Throws:
        java.io.IOException
      • writeRequirement

        public void writeRequirement​(Requirement requirement,
                                     java.io.Writer writer)
                              throws java.io.IOException
        Specified by:
        writeRequirement in interface DataModelHelper
        Throws:
        java.io.IOException
      • writeProperty

        public void writeProperty​(Property property,
                                  java.io.Writer writer)
                           throws java.io.IOException
        Specified by:
        writeProperty in interface DataModelHelper
        Throws:
        java.io.IOException
      • createResource

        public Resource createResource​(org.osgi.framework.Bundle bundle)
        Description copied from interface: DataModelHelper
        Create a resource corresponding to the given bundle.
        Specified by:
        createResource in interface DataModelHelper
        Parameters:
        bundle - the bundle
        Returns:
        the corresponding resource
      • createResource

        public Resource createResource​(java.net.URL bundleUrl)
                                throws java.io.IOException
        Description copied from interface: DataModelHelper
        Create a resource for the bundle located at the given location.
        Specified by:
        createResource in interface DataModelHelper
        Parameters:
        bundleUrl - the location of the bundle
        Returns:
        the corresponding resource
        Throws:
        java.io.IOException
      • createResource

        public Resource createResource​(java.util.jar.Attributes attributes)
        Description copied from interface: DataModelHelper
        Create a resource corresponding to the given manifest entries.
        Specified by:
        createResource in interface DataModelHelper
        Parameters:
        attributes - the manifest headers
        Returns:
        the corresponding resource
      • createResource

        public ResourceImpl createResource​(org.apache.felix.bundlerepository.impl.DataModelHelperImpl.Headers headers)
      • readResource

        public Resource readResource​(java.lang.String xml)
                              throws java.lang.Exception
        Specified by:
        readResource in interface DataModelHelper
        Throws:
        java.lang.Exception
      • readResource

        public Resource readResource​(java.io.Reader reader)
                              throws java.lang.Exception
        Specified by:
        readResource in interface DataModelHelper
        Throws:
        java.lang.Exception
      • readProperty

        public Property readProperty​(java.lang.String xml)
                              throws java.lang.Exception
        Specified by:
        readProperty in interface DataModelHelper
        Throws:
        java.lang.Exception
      • readProperty

        public Property readProperty​(java.io.Reader reader)
                              throws java.lang.Exception
        Specified by:
        readProperty in interface DataModelHelper
        Throws:
        java.lang.Exception