return writtenRows > 0;
}
public void readRow(XMLStreamReader reader, AbstractAttributeModel model, AttributeTableImpl table, AttributeRowImpl row) throws XMLStreamException {
row.setRowVersion(Integer.parseInt(reader.getAttributeValue(null, "version")));
AttributeColumnImpl col = null;
String value = "";
boolean end = false;
while (reader.hasNext() && !end) {
int t = reader.next();
switch (t) {
case XMLStreamReader.START_ELEMENT:
String name = reader.getLocalName();
if (ELEMENT_VALUE.equalsIgnoreCase(name)) {
col = (AttributeColumnImpl) table.getColumn(Integer.parseInt(reader.getAttributeValue(null, "index")));
}
break;
case XMLStreamReader.CHARACTERS:
if (!reader.isWhiteSpace() && col != null) {
value += reader.getText();
}
break;
case XMLStreamReader.END_ELEMENT:
if (ELEMENT_NODE_ROW.equalsIgnoreCase(reader.getLocalName()) || ELEMENT_EDGE_ROW.equalsIgnoreCase(reader.getLocalName())) {
end = true;
}
if (!value.isEmpty() && col != null) {
AttributeType type = col.getType();
Object v = type.parse(value);
v = model.getManagedValue(v, type);
row.setValue(col, value);
}
value = "";