Package com.rometools.rome.feed.module

Examples of com.rometools.rome.feed.module.SyModuleImpl


    @Override
    public Module parse(final Element syndRoot, final Locale locale) {

        boolean foundSomething = false;

        final SyModule sm = new SyModuleImpl();

        final Element updatePeriod = syndRoot.getChild("updatePeriod", getDCNamespace());
        if (updatePeriod != null) {
            foundSomething = true;
            sm.setUpdatePeriod(updatePeriod.getText());
        }

        final Element updateFrequency = syndRoot.getChild("updateFrequency", getDCNamespace());
        if (updateFrequency != null) {
            foundSomething = true;
            sm.setUpdateFrequency(Integer.parseInt(updateFrequency.getText().trim()));
        }

        final Element updateBase = syndRoot.getChild("updateBase", getDCNamespace());
        if (updateBase != null) {
            foundSomething = true;
            sm.setUpdateBase(DateParser.parseDate(updateBase.getText(), locale));
        }

        if (foundSomething) {
            return sm;
        } else {
View Full Code Here

TOP

Related Classes of com.rometools.rome.feed.module.SyModuleImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.