|
@@ -166,11 +166,11 @@ public class PropertySet extends DataType { |
|
|
* @param to output pattern. |
|
|
* @param to output pattern. |
|
|
*/ |
|
|
*/ |
|
|
public void setMapper(String type, String from, String to) { |
|
|
public void setMapper(String type, String from, String to) { |
|
|
Mapper mapper = createMapper(); |
|
|
|
|
|
|
|
|
Mapper m = createMapper(); |
|
|
Mapper.MapperType mapperType = new Mapper.MapperType(); |
|
|
Mapper.MapperType mapperType = new Mapper.MapperType(); |
|
|
mapperType.setValue(type); |
|
|
mapperType.setValue(type); |
|
|
mapper.setFrom(from); |
|
|
|
|
|
mapper.setTo(to); |
|
|
|
|
|
|
|
|
m.setFrom(from); |
|
|
|
|
|
m.setTo(to); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@@ -302,19 +302,19 @@ public class PropertySet extends DataType { |
|
|
} else { |
|
|
} else { |
|
|
names = cachedNames; |
|
|
names = cachedNames; |
|
|
} |
|
|
} |
|
|
FileNameMapper mapper = null; |
|
|
|
|
|
|
|
|
FileNameMapper m = null; |
|
|
Mapper myMapper = getMapper(); |
|
|
Mapper myMapper = getMapper(); |
|
|
if (myMapper != null) { |
|
|
if (myMapper != null) { |
|
|
mapper = myMapper.getImplementation(); |
|
|
|
|
|
|
|
|
m = myMapper.getImplementation(); |
|
|
} |
|
|
} |
|
|
Properties properties = new Properties(); |
|
|
Properties properties = new Properties(); |
|
|
//iterate through the names, get the matching values |
|
|
//iterate through the names, get the matching values |
|
|
for (Iterator iter = names.iterator(); iter.hasNext();) { |
|
|
for (Iterator iter = names.iterator(); iter.hasNext();) { |
|
|
String name = (String) iter.next(); |
|
|
String name = (String) iter.next(); |
|
|
String value = (String) props.get(name); |
|
|
String value = (String) props.get(name); |
|
|
if (mapper != null) { |
|
|
|
|
|
|
|
|
if (m != null) { |
|
|
//map the names |
|
|
//map the names |
|
|
String[] newname = mapper.mapFileName(name); |
|
|
|
|
|
|
|
|
String[] newname = m.mapFileName(name); |
|
|
if (newname != null) { |
|
|
if (newname != null) { |
|
|
name = newname[0]; |
|
|
name = newname[0]; |
|
|
} |
|
|
} |
|
|