}
if (xmlCharactersProperty != null)
{
xmlCharactersPropertyValue += text.toString();
xmlCharactersProperty.setValue(new TransientValueData(xmlCharactersPropertyValue));
}
else
{
TransientNodeData nodeData =
TransientNodeData.createNodeData(getParent(), Constants.JCR_XMLTEXT, Constants.NT_UNSTRUCTURED,
getNodeIndex(getParent(), Constants.JCR_XMLTEXT, null), getNextChildOrderNum(getParent()));
changesLog.add(new ItemState(nodeData, ItemState.ADDED, true, getAncestorToSave()));
if (log.isDebugEnabled())
{
log.debug("New node " + nodeData.getQPath().getAsString());
}
ImportPropertyData newProperty =
new ImportPropertyData(QPath.makeChildPath(nodeData.getQPath(), Constants.JCR_PRIMARYTYPE),
IdGenerator.generate(), -1, PropertyType.NAME, nodeData.getIdentifier(), false);
newProperty.setValue(new TransientValueData(Constants.NT_UNSTRUCTURED));
changesLog.add(new ItemState(newProperty, ItemState.ADDED, true, getAncestorToSave()));
newProperty =
new ImportPropertyData(QPath.makeChildPath(nodeData.getQPath(), Constants.JCR_XMLCHARACTERS),
IdGenerator.generate(), -1, PropertyType.STRING, nodeData.getIdentifier(), false);
newProperty.setValue(new TransientValueData(text.toString()));
changesLog.add(new ItemState(newProperty, ItemState.ADDED, true, getAncestorToSave()));
xmlCharactersProperty = newProperty;
xmlCharactersPropertyValue = text.toString();
}