PERIODS.put(SyModule.YEARLY.toString(),SyModule.YEARLY);
}
public Module parse(Element syndRoot) {
boolean foundSomething = false;
SyModule sm = new SyModuleImpl();
Element e = syndRoot.getChild("updatePeriod",getDCNamespace());
if (e!=null) {
foundSomething = true;
sm.setUpdatePeriod((SyModule.Period)PERIODS.get(e.getText()));
}
e = syndRoot.getChild("updateFrequency",getDCNamespace());
if (e!=null) {
foundSomething = true;
sm.setUpdateFrequency(Integer.parseInt(e.getText()));
}
e = syndRoot.getChild("updateBase",getDCNamespace());
if (e!=null) {
foundSomething = true;
sm.setUpdateBase(DateParser.parseW3CDateTime(e.getText()));
}
return (foundSomething) ? sm : null;
}