Package org.rometools.feed.module.mediarss.types

Examples of org.rometools.feed.module.mediarss.types.Time


            ArrayList values = new ArrayList();
           
            for (int i = 0; (texts != null) && (i < texts.size()); i++) {
                try {
                    Element text = (Element) texts.get(i);
                    Time start = (text.getAttributeValue("start") == null)
                    ? null : new Time(text.getAttributeValue("start"));
                    Time end = (text.getAttributeValue("end") == null) ? null
                            : new Time(text.getAttributeValue(
                            "end"));
                    values.add(new Text(text.getAttributeValue("type"),
                            text.getTextTrim(), start, end));
                } catch (Exception ex) {
                    LOG.log(Level.WARNING, "Exception parsing text tag.", ex);
                }
            }
           
            md.setText((Text[]) values.toArray(new Text[values.size()]));
        }
        // thumbnails
        {
            List thumbnails = e.getChildren("thumbnail", getNS());
            ArrayList values = new ArrayList();
           
            for (int i = 0; (thumbnails != null) && (i < thumbnails.size());
            i++) {
                try {
                    Element thumb = (Element) thumbnails.get(i);
                    Time t = (thumb.getAttributeValue("time") == null) ? null
                            : new Time(thumb.getAttributeValue(
                            "time"));
                    Integer width = (thumb.getAttributeValue("width") == null)
                    ? null : new Integer(thumb.getAttributeValue("width"));
                    Integer height = (thumb.getAttributeValue("height") == null)
                    ? null : new Integer(thumb.getAttributeValue("height"));
View Full Code Here

TOP

Related Classes of org.rometools.feed.module.mediarss.types.Time

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.