[Minor] Added missing writing of Parameter attributes

This commit is contained in:
Robert von Burg 2014-03-27 18:52:57 +01:00
parent c24e01cdc8
commit 5cb0982b2f
3 changed files with 128 additions and 108 deletions

View File

@ -38,6 +38,7 @@ public class OrderToSaxWriterVisitor extends AbstractToSaxWriterVisitor implemen
public void visit(Order order) {
try {
writeElement(Tags.ORDER, order);
this.writer.flush();
} catch (XMLStreamException e) {
String msg = "Failed to write Order {0} due to {1}"; //$NON-NLS-1$
msg = MessageFormat.format(msg, order.getLocator(), e.getMessage());

View File

@ -38,6 +38,7 @@ public class ResourceToSaxWriterVisitor extends AbstractToSaxWriterVisitor imple
public void visit(Resource resource) {
try {
writeElement(Tags.RESOURCE, resource);
this.writer.flush();
} catch (XMLStreamException e) {
String msg = "Failed to write Resource {0} due to {1}"; //$NON-NLS-1$
msg = MessageFormat.format(msg, resource.getLocator(), e.getMessage());

View File

@ -206,6 +206,24 @@ public class XmlModelSaxReader extends DefaultHandler {
public int nrOfResources;
public int nrOfOrders;
/**
* @return the nrOfOrders
*/
public int getNrOfOrders() {
return this.nrOfOrders;
}
/**
* @return the nrOfResources
*/
public int getNrOfResources() {
return this.nrOfResources;
}
public long getNrOfElements() {
return this.nrOfOrders + this.nrOfResources;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();