Examples of DCSubjectI


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

    }

    public void testFeedDCSubject() throws Exception {
        List subjects = getDCModule().getSubjects();
        assertEquals(2, subjects.size());
        DCSubjectI subject = null;
        for (int i=0; i<subjects.size();i++) {
            subject = (DCSubjectI)subjects.get(i);
            assertEqualsStr("dc:subject[" + i +"]", subject.getValue());
            assertEqualsStr("dc:subject[" + i +"].taxo:topic^resource", subject.getTaxonomyUri());
        }
    }
View Full Code Here

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

     * @return the SyndCategory object that is being replaced, <b>null</b> if none.
     *
     */
    public Object set(int index,Object obj) {
        SyndCategory sCat = (SyndCategory) obj;
        DCSubjectI subject = (sCat!=null) ? sCat.getSubject() : null;
        subject = (DCSubjectI) _subjects.set(index,subject);
        return (subject!=null) ? new SyndCategory(subject) : null;
    }
View Full Code Here

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

    * @param obj the SyndCategory object to add.
     *
     */
    public void add(int index,Object obj) {
        SyndCategory sCat = (SyndCategory) obj;
        DCSubjectI subject = (sCat!=null) ? sCat.getSubject() : null;
        _subjects.add(index,subject);
    }
View Full Code Here

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

     * @param index position to remove the category from.
     * @return the SyndCategory being removed from position index, <b>null</b> if none.
     *
     */
    public Object remove(int index) {
        DCSubjectI subject = (DCSubjectI) _subjects.remove(index);
        return (subject!=null) ? new SyndCategory(subject) : null;
    }
View Full Code Here

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

        List sList = null;
        if (cList!=null) {
            sList = new ArrayList();
            for (int i=0;i<cList.size();i++) {
                SyndCategory sCat = (SyndCategory) cList.get(i);
                DCSubjectI subject = null;
                if (sCat!=null) {
                    subject = sCat.getSubject();
                }
                sList.add(subject);
            }
View Full Code Here

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

            if (eDesc!=null) {
                String taxonomy = getTaxonomy(eDesc);
                List eValues = eDesc.getChildren("value",Namespace.getNamespace(RDF_URI));
                for (int j=0;j<eValues.size();j++) {
                    Element eValue = (Element) eValues.get(j);
                    DCSubjectI subject = new DCSubject();
                    subject.setTaxonomyUri(taxonomy);;
                    subject.setValue(eValue.getText());
                    subjects.add(subject);
                }
            }
            else {
                DCSubjectI subject = new DCSubject();
                subject.setValue(eSubject.getText());
                subjects.add(subject);
            }
        }
        return subjects;
    }
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.