[Minor] Added missing writing of Parameter attributes
This commit is contained in:
parent
c24e01cdc8
commit
5cb0982b2f
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue