Package aQute.bnd.osgi.repository
Class XMLResourceGenerator
- java.lang.Object
-
- aQute.bnd.osgi.repository.XMLResourceGenerator
-
public class XMLResourceGenerator extends java.lang.Object
Can turn an OSGi repository into anhttp://www.osgi.org/xmlns/repository/v1.0.0
XML file. See the Repository spec in OSGi.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
compress
private int
indent
private Tag
repository
private java.util.Set<org.osgi.resource.Resource>
visited
-
Constructor Summary
Constructors Constructor Description XMLResourceGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
attributes(Tag cr, java.util.Map<java.lang.String,java.lang.Object> atrributes)
XMLResourceGenerator
compress()
private void
directives(Tag cr, java.util.Map<java.lang.String,java.lang.String> directives)
XMLResourceGenerator
indent(int n)
XMLResourceGenerator
name(java.lang.String name)
XMLResourceGenerator
referral(java.net.URI reference, int depth)
XMLResourceGenerator
repository(org.osgi.service.repository.Repository repository)
XMLResourceGenerator
resource(org.osgi.resource.Resource resource)
XMLResourceGenerator
resources(java.util.Collection<? extends org.osgi.resource.Resource> resources)
void
save(java.io.File location)
void
save(java.io.OutputStream out)
-
-
-
Field Detail
-
repository
private Tag repository
-
visited
private java.util.Set<org.osgi.resource.Resource> visited
-
indent
private int indent
-
compress
private boolean compress
-
-
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)
-
referral
public XMLResourceGenerator referral(java.net.URI reference, int depth)
-
repository
public XMLResourceGenerator repository(org.osgi.service.repository.Repository repository) throws java.lang.Exception
- Throws:
java.lang.Exception
-
resources
public XMLResourceGenerator resources(java.util.Collection<? extends org.osgi.resource.Resource> resources) throws java.lang.Exception
- Throws:
java.lang.Exception
-
resource
public XMLResourceGenerator resource(org.osgi.resource.Resource resource) throws java.lang.Exception
- Throws:
java.lang.Exception
-
directives
private void directives(Tag cr, java.util.Map<java.lang.String,java.lang.String> directives)
-
attributes
private void attributes(Tag cr, java.util.Map<java.lang.String,java.lang.Object> atrributes) throws java.lang.Exception
- Throws:
java.lang.Exception
-
indent
public XMLResourceGenerator indent(int n)
-
compress
public XMLResourceGenerator compress()
-
-