public boolean canConvert(Class type) {
return ScheduledServicePropertyResource.class.equals(type);
}
public Object doUnmarshal(Object source, HierarchicalStreamReader reader, UnmarshallingContext context) {
ScheduledServicePropertyResource resource = (ScheduledServicePropertyResource) source;
while (reader.hasMoreChildren()) {
reader.moveDown();
if ("key".equals(reader.getNodeName())) {
resource.setKey((String) context.convertAnother(source, String.class));
}
else if ("value".equals(reader.getNodeName())) {
resource.setValue((String) context.convertAnother(source, String.class));
}
reader.moveUp();
}
return resource;
}