Map<String, String> attributes = new HashMap<String, String>();
attributes.put(Attribute.NAME.getLocalName(), getRepository().getName());
attributes.put(Attribute.INCREMENT.getLocalName(), increment.toString());
writer.writeRepositoryElement(attributes);
RepositoryReader reader = getRepositoryReader();
Resource resource = reader.nextResource();
while (resource != null) {
writer.writeResource(resource);
resource = reader.nextResource();
}
writer.close();