Examples of SyModule


Examples of com.sun.syndication.feed.module.SyModule

        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;
    }
View Full Code Here

Examples of com.sun.syndication.feed.module.SyModule

    }

    public void testModules() throws Exception {
        DCModule dc = (DCModule) getCachedSyndFeed().getModule(DCModule.URI);
        assertNotNull(dc);
        SyModule sy = (SyModule) getCachedSyndFeed().getModule(SyModule.URI);
        assertNotNull(sy);
    }
View Full Code Here

Examples of com.sun.syndication.feed.module.SyModule

            assertProperty(dc.getRights(),prefix+"copyright"); // in header is convenience method
        }
    }

    public void testFeedSyModule() throws Exception {
        SyModule sy = (SyModule) getCachedSyndFeed().getModule(SyModule.URI);
        assertNotNull(sy);
        assertEquals(sy.getUpdatePeriod(),SyModule.HOURLY);
        assertEquals(sy.getUpdateFrequency(),100);
        Date date = DateParser.parseW3CDateTime("2001-01-01T01:00+00:00");
        assertEquals(sy.getUpdateBase(),date);
    }
View Full Code Here

Examples of com.sun.syndication.feed.module.SyModule

        return Namespace.getNamespace(SyModule.URI);
    }

    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(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;
    }
View Full Code Here

Examples of com.sun.syndication.feed.module.SyModule

        PERIODS.put(SyModuleI.YEARLY.toString(),SyModuleI.YEARLY);
    }

    public ModuleI parse(Element syndRoot) {
        boolean foundSomething = false;
        SyModuleI sm = new SyModule();

        Element e = syndRoot.getChild("updatePeriod",getDCNamespace());
        if (e!=null) {
            foundSomething = true;
            sm.setUpdatePeriod((SyModuleI.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;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.