if (nodeInfo instanceof Serializable) {
return nodeInfo;
} else {
List<PropertyId> serRefs = new ArrayList<PropertyId>();
for (PropertyId ref : nodeInfo.getReferences()) {
NodeId parentId = ref.getParentId();
parentId = idFactory.createNodeId(
parentId.getUniqueID(), parentId.getPath());
serRefs.add(idFactory.createPropertyId(parentId, ref.getName()));
}
NodeId nodeId = nodeInfo.getId();
nodeId = idFactory.createNodeId(nodeId.getUniqueID(), nodeId.getPath());
final Iterator<PropertyId> propIds = nodeInfo.getPropertyIds();
final Iterator<ChildInfo> childInfos = nodeInfo.getChildInfos();
return new NodeInfoImpl(nodeInfo.getPath(), nodeId,
nodeInfo.getIndex(), nodeInfo.getNodetype(),
nodeInfo.getMixins(), serRefs.iterator(),
new Iterator<PropertyId>() {
public boolean hasNext() {
return propIds.hasNext();
}
public PropertyId next() {
PropertyId propId = propIds.next();
NodeId parentId = propId.getParentId();
idFactory.createNodeId(
parentId.getUniqueID(), parentId.getPath());
return idFactory.createPropertyId(
parentId, propId.getName());
}
public void remove() {
throw new UnsupportedOperationException();