}
private void readInTargets(Mapping m) throws TreeMapperException {
NodeMapping nodeMapping = treeMapper.getNodeMappingFactory().newMapping(m);
String targetDE = m.getTargetPath().toString();
Node node = targetTreeComponent.findNode(targetDE);
if(node==null){
String path=targetDE;
if(path.endsWith("xsi:nil")){
path=path.substring(0,path.length()-7);
Node targetEVNode=targetTreeComponent.findNode(path);
node=targetEVNode.createNilNodeToMap();
}
}
if (node == null) {
// if recursive, append new node
node = targetTreeComponent.expandTreeAndLookForNode(targetDE);
// node may be null if the structure has been edited and a mapped LDAP attribute
// has been removed
if (node != null && LdapUtils.isLdapAttributeCommand(targetTreeComponent, node)) {
LdapUtils.setLdapAttributeType(targetTreeComponent, node, m.getExpression());
}
targetTreeComponent.setDirty();
}
if (node == null) {
throw new TreeMapperException("Cannot find the target node " + targetDE + " in the target tree.");
}
if (targetDE.charAt(0) == '[') {
String expr = m.getExpression();
String fixed = "Fixed ";
if (expr != null && expr.startsWith(fixed)) {
String expr1 = StringUtils.removeStart(expr, fixed);
Node source_generator = treeMapper.m_sourceTreeComponent.expandTreeAndLookForNode(expr1);
if (source_generator != null) {
addMapping(nodeMapping);
int k1 = fixed.length(), k2 = expr.length();
try {
// remove "Fixed [" and "]" from the expr