Examples of SyndEnclosureImpl


Examples of com.sun.syndication.feed.synd.SyndEnclosureImpl

                        if (bunds[0] != null) {
                            Bitstream[] bits = bunds[0].getBitstreams();
                            for (int i = 0; (i < bits.length); i++) {
                                String mime = bits[i].getFormat().getMIMEType();
                                if(podcastableMIMETypes.contains(mime)) {
                                    SyndEnclosure enc = new SyndEnclosureImpl();
                                    enc.setType(bits[i].getFormat().getMIMEType());
                                    enc.setLength(bits[i].getSize());
                                    enc.setUrl(urlOfBitstream(request, bits[i]));
                                    enclosures.add(enc);
                                } else {
                                    continue;
                                }
                            }
                        }
                        //Also try to add an external value from dc.identifier.other
                        // We are assuming that if this is set, then it is a media file
                        Metadatum[] externalMedia = item.getMetadataByMetadataString(externalSourceField);
                        if(externalMedia.length > 0)
                        {
                            for(int i = 0; i< externalMedia.length; i++)
                            {
                                SyndEnclosure enc = new SyndEnclosureImpl();
                                enc.setType("audio/x-mpeg");        //We can't determine MIME of external file, so just picking one.
                                enc.setLength(1);
                                enc.setUrl(externalMedia[i].value);
                                enclosures.add(enc);
                            }
                        }

                    } catch (Exception e) {
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEnclosureImpl

        return syndEntry;
    }

    public SyndEnclosure createSyndEnclosure(Feed feed, Entry entry,
            Link link) {
        SyndEnclosure syndEncl = new SyndEnclosureImpl();
        syndEncl.setUrl(link.getHrefResolved());
        syndEncl.setType(link.getType());
        syndEncl.setLength(link.getLength());
        return syndEncl;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEnclosureImpl

        return syndEntry;
    }

    public SyndEnclosure createSyndEnclosure(Entry entry, Link link) {
        SyndEnclosure syndEncl = new SyndEnclosureImpl();
        syndEncl.setUrl(link.getHrefResolved());
        syndEncl.setType(link.getType());
        syndEncl.setLength(link.getLength());
        return syndEncl;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEnclosureImpl

        return syndEntry;
    }

    public SyndEnclosure createSyndEnclosure(Feed feed, Entry entry,
            Link link) {
        SyndEnclosure syndEncl = new SyndEnclosureImpl();
        syndEncl.setUrl(link.getHref());
        syndEncl.setType(link.getType());
        syndEncl.setLength(link.getLength());
        return syndEncl;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEnclosureImpl

        return syndEntry;
    }

    public SyndEnclosure createSyndEnclosure(Entry entry, Link link) {
        SyndEnclosure syndEncl = new SyndEnclosureImpl();
        syndEncl.setUrl(link.getHrefResolved());
        syndEncl.setType(link.getType());
        syndEncl.setLength(link.getLength());
        return syndEncl;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndEnclosureImpl

        return syndEntry;
    }

    public SyndEnclosure createSyndEnclosure(Feed feed, Entry entry,
            Link link) {
        SyndEnclosure syndEncl = new SyndEnclosureImpl();
        syndEncl.setUrl(link.getHrefResolved());
        syndEncl.setType(link.getType());
        syndEncl.setLength(link.getLength());
        return syndEncl;
    }
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.