Class XMLResourceGenerator


  • public class XMLResourceGenerator
    extends java.lang.Object
    Can turn an OSGi repository into an http://www.osgi.org/xmlns/repository/v1.0.0 XML file. See the Repository spec in OSGi.
    • Constructor Detail

      • XMLResourceGenerator

        public XMLResourceGenerator()
    • Method Detail

      • save

        public void save​(java.io.File location)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • save

        public void save​(java.io.OutputStream out)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • name

        public XMLResourceGenerator name​(java.lang.String name)
        Note that calling name(String) sets increment to System.currentTimeMillis(). In order to retain backward compatibility that is not change. Therefore, in order to specify a value increment(long) should be called after.
        Parameters:
        name -
        Returns:
        this
      • increment

        public XMLResourceGenerator increment​(long increment)
        Note that calling name(String) sets increment to System.currentTimeMillis(). In order to retain backward compatibility that is not change. Therefore, in order to specify a value increment(long) should be called after.
        Parameters:
        increment -
        Returns:
        this
      • repository

        public XMLResourceGenerator repository​(org.osgi.service.repository.Repository repository)
      • resources

        public XMLResourceGenerator resources​(java.util.Collection<? extends org.osgi.resource.Resource> resources)
      • base

        public XMLResourceGenerator base​(java.net.URI base)
        Parameters:
        base - the base URI from which the index urls are relative