Changeset 2252


Ignore:
Timestamp:
09/25/12 16:35:46 (12 years ago)
Author:
olhsha
Message:

simplifying rss-structure, no name spaces, push all the stuff in the titles or so. Test on comments fails.

Location:
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/pom.xml

    r2248 r2252  
    342342                            <!-- <bindingDirectory>${basedir}/src/generated/jaxb/rss</bindingDirectory> -->
    343343                            <bindingDirectory>src/main/binding/rss</bindingDirectory>
    344                             <bindingIncludes>
    345                                 <include>bindings.xml
    346                                 </include>
    347                             </bindingIncludes>
    348344                           
    349                             <args>
    350                                 <arg>-extension</arg>
    351                                 <arg>-Xnamespace-prefix</arg>
    352                             </args>
    353                             <!-- <extension>true</extension> -->
    354345                            <generateDirectory>${basedir}/src/generated/jaxb/rss</generateDirectory>
    355346                            <generatePackage>clarin.cmdi.componentregistry.rss</generatePackage>
     
    360351                    </execution>
    361352                </executions>
    362                 <dependencies>
    363                     <dependency>
    364                         <groupId>org.jvnet.jaxb2_commons</groupId>
    365                         <artifactId>jaxb2-namespace-prefix</artifactId>
    366                         <version>1.1</version>
    367                     </dependency>
    368                     <dependency> 
    369                         <groupId>com.sun.xml.bind</groupId> 
    370                         <artifactId>jaxb-impl</artifactId> 
    371                         <version>2.2.6</version> 
    372                     </dependency> 
    373                 </dependencies>
    374353            </plugin>
    375354            <plugin>
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/main/binding/rss/rss-2_0.xsd

    r2248 r2252  
    4040-->
    4141<xs:schema
    42     xmlns:dc="http://purl.org/dc/elements/1.1/"
    43     xmlns:atom="http://www.w3.org/2005/Atom"
    4442    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    4543    elementFormDefault="unqualified"
     
    5755 
    5856 
    59     <xs:import  namespace="http://purl.org/dc/elements/1.1/"
    60               schemaLocation="http://dublincore.org/schemas/xmls/simpledc20021212.xsd"/>
    61  
    62     <xs:import namespace="http://www.w3.org/2005/Atom"
    63              schemaLocation="http://dataconnector.eea.europa.eu/wise/bwqd/atom.xsd"/>
    64     <!--   Possible schemaLocation for Atom:
    65  "http://www.w3.org/2005/Atom http://www.openarchives.org/OAI/2.0/atom_entry.xsd" : was not found
    66   "http://dataconnector.eea.europa.eu/wise/bwqd/atom.xsd" - currently it is there
    67     http://dataconnector.eea.europa.eu/wise/bwqd/atom.xsd - not checked -->
    68  
    69  
     57   
    7058    <xs:element name="rss">
    7159        <xs:complexType>
     
    9583            <xs:element name="link" type="xs:anyURI" minOccurs="0">
    9684            </xs:element>
    97             <xs:element ref="dc:creator"></xs:element>
    98             <!--
    99               The value for "author" must be an e-mail,
    100               otherwise the rss-feed will not be validated.
    101               Sunce we want to have just the author's name there,
    102               we must use the element
    103               dc:creator
    104               <xs:element name="author" type="xs:string" minOccurs="0" nillable="false">
    105               <xs:annotation>
    106                 <xs:documentation>The name of the author of the item.</xs:documentation>
    107               </xs:annotation>
    108             </xs:element> -->
    10985            <xs:element name="category" type="Category" minOccurs="0">
    11086                <xs:annotation>
     
    130106                <xs:annotation>
    131107                    <xs:documentation>Indicates when the item was published.</xs:documentation>
    132                 </xs:annotation>
    133             </xs:element>
    134             <xs:element name="source" type="Source" minOccurs="0">
    135                 <xs:annotation>
    136                     <xs:documentation>The RSS channel that the item came from.</xs:documentation>
    137108                </xs:annotation>
    138109            </xs:element>
     
    152123                </xs:annotation>
    153124            </xs:element>
    154             <!-- <xs:element name="link" type="xs:anyURI">
     125            <xs:element name="link" type="xs:anyURI">
    155126                <xs:annotation>
    156127                    <xs:documentation>The URL to the HTML website corresponding to the channel.</xs:documentation>
    157128                </xs:annotation>
    158             </xs:element> -->
     129            </xs:element>
    159130            <xs:element name="description" type="xs:string">
    160131                <xs:annotation>
     
    242213                </xs:annotation>
    243214            </xs:element> 
    244             <xs:element ref="atom:link" ></xs:element>
    245215            <xs:element name="item" type="RssItem" minOccurs="1" maxOccurs="unbounded">
    246216                <!--
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/RssCreator.java

    r2247 r2252  
    33import clarin.cmdi.componentregistry.rss.Category;
    44import clarin.cmdi.componentregistry.rss.Cloud;
    5 import clarin.cmdi.componentregistry.rss.ElementType;
    65import clarin.cmdi.componentregistry.rss.Guid;
    76import clarin.cmdi.componentregistry.rss.Image;
    8 import clarin.cmdi.componentregistry.rss.Link;
    97import clarin.cmdi.componentregistry.rss.Rss;
    108import clarin.cmdi.componentregistry.rss.RssChannel;
     
    3028    // all the fields below are not mandatory, no crashes will happen if they are not set
    3129    private String title;
    32     private String href;
     30    private String link;
    3331    private String description;
    3432    private String language;
     
    7977     */
    8078    public void setLink(String value) {
    81         this.href = value;
     79        this.link = value;
    8280    }
    8381
     
    270268        channel.setLanguage(language);
    271269        channel.setLastBuildDate(lastBuildDate);
    272         channel.setLink(makeLink(href));
     270        channel.setLink(link);
    273271        channel.setManagingEditor(managingEditor);
    274272        channel.setPubDate(pubDate);
     
    288286
    289287
    290         // QName x= new QName("xmlns:dc");
    291 
    292 
    293         // rss.getOtherAttributes().put(x, "http://purl.org/dc/elements/1.1");
    294 
    295 
    296288
    297289        for (RssItem currentItem : rssItems) {
     
    318310        return (makeRssChannel(makeListOfRssItems(objs)));
    319311    }
     312   
    320313
    321314    protected String getRFCDateTime(String datestring) throws ParseException {
     
    326319    }
    327320
    328     protected ElementType makeElementType(String username) {
    329         ElementType result = new ElementType();
    330         result.setValue(username);
    331         result.setLang(null);
    332         return result;
    333     }
    334321   
    335     protected Guid makeGuid(String id){
     322   protected Guid makeGuid(String id){
    336323        Guid result = new Guid();
    337324        result.setIsPermaLink(null);
     
    340327    }
    341328   
    342     protected Link makeLink(String href){
    343        
    344         Link lnk = new Link();
    345         lnk.setHref(href);
    346         //rel="self" type="application/rss+xml
    347         lnk.setRel("self");
    348         return lnk;
    349        
    350        
    351     }
    352329}
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/RssCreatorDescriptions.java

    r2247 r2252  
    66
    77import clarin.cmdi.componentregistry.model.AbstractDescription;
    8 import clarin.cmdi.componentregistry.rss.ElementType;
    98import clarin.cmdi.componentregistry.rss.RssItem;
    109
     
    2322        RssItem retval = new RssItem();
    2423       
     24        //Description (blah-blah)
     25        retval.setDescription(desc.getDescription());
    2526       
     27       
     28        //guid
     29        retval.setGuid(makeGuid(desc.getHref()));
    2630       
    27         retval.setCreator(makeElementType(desc.getCreatorName()));
    28         // retval.setCategory(desc.???);
    29         // retval.setComments(desc.???);
    30         retval.setDescription(desc.getDescription());
    31         //retval.setEnclosure(desc.???);
     31        //time-date
     32        retval.setPubDate(desc.getRegistrationDate());
    3233       
    33         String message ="The is of the";
    34         if (desc.isProfile()) {message =  message +"profile is ";}
    35             else {message =  message +"component is ";}
    36         retval.setGuid(makeGuid(message+desc.getId()));
    37        
    38         retval.setLink(desc.getHref());
    39         retval.setPubDate(desc.getRegistrationDate());
    40         //retval.setSource(desc.???);
    41         retval.setTitle(desc.getName());
     34        //Title
     35        retval.setTitle(makeDescriptionTitle(desc.getName(),desc.getCreatorName(), desc.getGroupName(),desc.getDomainName()));
    4236
    4337       
     
    4640    }
    4741
    48    
     42    protected String makeDescriptionTitle(String name, String creatorname, String group, String domain){
     43        String retval =  name+"by user"+creatorname+", group "+group+",domain "+domain;
     44       
     45        return retval;
     46    }
    4947}
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestService.java

    r2248 r2252  
    77import clarin.cmdi.componentregistry.ComponentStatus;
    88import clarin.cmdi.componentregistry.DeleteFailedException;
     9import clarin.cmdi.componentregistry.ExtendedComment;
    910import clarin.cmdi.componentregistry.MDMarshaller;
    1011import clarin.cmdi.componentregistry.Owner;
     
    983984        RssCreatorDescriptions rssCreator = new RssCreatorDescriptions();
    984985        rssCreator.setVersion(2.0);
     986       
     987       
    985988        int limitInt = Integer.parseInt(limit);
    986989       
     
    10551058       
    10561059       
    1057         // TODO: add sorting and limiting items per page!
     1060        // TODO: add sorting !
    10581061       
    10591062        final Principal principal = security.getUserPrincipal();
    10601063        List<Comment> comments = getRegistry(getStatus(userspace)).getCommentsInProfile(profileId, principal);
    1061        
     1064
     1065       
    10621066        int limitInt = Integer.parseInt(limit);
    10631067       
    10641068        if (comments.size()<limitInt) {limitInt = comments.size();};
    1065         List<Comment> sublist = comments.subList(0, limitInt);
     1069        List<Comment> sublistAux = comments.subList(0, limitInt);
     1070       
     1071        String href = getRegistry(getStatus(userspace)).getProfileDescription(profileId).getHref();
     1072       
     1073        List<ExtendedComment> sublist = new ArrayList<ExtendedComment>();
     1074        for (Comment currentcom : sublistAux) {
     1075            ExtendedComment currentextcom = new ExtendedComment();
     1076            currentextcom.setCom(currentcom);
     1077            currentextcom.setHref(href);
     1078            sublist.add(currentextcom);
     1079        }
    10661080       
    10671081         
     
    10691083        instance.setFlagIsFromProfile(true);
    10701084        instance.setDescription("Update of comments for current profile");
    1071         instance.setLink("http://www.clarin.eu/cmdi/profiles/");
    1072         instance.setTitle("Comments feed for the profile"+profileId);
    1073        
    1074        
     1085        instance.setTitle("Comments feed for the profile "+profileId);
     1086       
     1087        Rss result = instance.makeRss(sublist);
    10751088       
    10761089         //this is a testing piece testing piece: prints out on tomcat's output terminal the comments
     
    10801093        System.out.println("Name: "+ registry.getName());
    10811094        System.out.println("Owner: "+ registry.getOwner());
    1082         for (Comment comment : sublist){
     1095        for (Comment comment : sublistAux){
    10831096           System.out.println(comment.getComment());
    10841097           System.out.println(comment.getCommentDate());
     
    10941107       
    10951108       
    1096         Rss result = instance.makeRss(comments);
     1109       
    10971110       
    10981111        // testing stuff
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/RssCreatorCommentsTest.java

    r2247 r2252  
    2222   
    2323   
    24     private Comment makeTestComment(boolean flag, String comtext, String date, String commentDescrId,
    25             String id, String profileDescrId, String userId, String userName){
     24    private Comment makeTestComment(boolean canDelete, boolean isFromProfile, String comtext, String date, String commentId,
     25            String descrId, String userName){
    2626       
    2727        Comment comm =new Comment();
    2828       
    29         comm.setCanDelete(flag);
     29        comm.setCanDelete(canDelete);
    3030        comm.setComment(comtext);
    3131        comm.setCommentDate(date);
    32         comm.setComponentDescriptionId(commentDescrId);
    33         comm.setId(id);
    34         comm.setProfileDescriptionId(profileDescrId);
    35         comm.setUserId(userId);
     32        if (isFromProfile) {comm.setComponentDescriptionId(descrId);}
     33                else {comm.setProfileDescriptionId(descrId);}
     34        comm.setId(commentId);
    3635        comm.setUserName(userName);
    3736       
     
    4443     */
    4544   
    46     private void compareInputsVsRssItems(String userName, String commtext, String date, String title, RssItem rssItem){
     45    private void compareInputsVsRssItems(String href, String commtext, String date, String title, RssItem rssItem){
    4746       
    4847       
    49         assertEquals(userName, rssItem.getCreator().getValue()); 
     48        assertEquals(href, rssItem.getGuid().getValue());
    5049        assertEquals(commtext, rssItem.getDescription());
    5150        assertEquals(date, rssItem.getPubDate());
     
    5958    public void testMakeRss() throws ParseException{
    6059       
     60        String href = "http";
     61        Boolean isFromProfile = true;
    6162         
    62         Comment comm1 = makeTestComment(true, "this is comment # 1", "2012-04-02T11:38:23+00:00", "DescrId1",
    63                 "Id1", "ProfileDescId1", "us1", "userello");
     63        Comment comm1 = makeTestComment(true, isFromProfile, "this is comment # 1", "2012-04-02T11:38:23+00:00", "commentId1", "DescrId1",
     64             "userello");
    6465       
    65         Comment comm2 = makeTestComment(false, "this is comment # 2", "2012-05-02T12:38:23+00:00", "DescrId2",
    66                 "Id2", "ProfileDescId2", "us2", "userino");
     66        Comment comm2 = makeTestComment(false, isFromProfile, "this is comment # 2", "2011-04-02T11:38:22+00:00", "commentId2", "DescrId2",
     67             "userino");
    6768       
    68         Comment comm3 = makeTestComment(true, "this is comment # 3", "2012-04-07T11:38:23+01:00", "DescrId3",
    69                 "Id3", "ProfileDescId3", "us3", "userito");
     69         Comment comm3 = makeTestComment(true, isFromProfile, "this is comment # 3", "2010-05-02T11:38:22+00:00", "commentId3", "DescrId3",
     70             "userito");
    7071       
    7172        Comment[] commar = {comm1, comm2, comm3};
    7273        List<Comment> comms = new ArrayList<Comment>(Arrays.asList(commar));
    7374       
     75        List<ExtendedComment> extcomms = new ArrayList<ExtendedComment>();
     76        for (Comment currentcom : comms){
     77            ExtendedComment currentextcom = new ExtendedComment();
     78            currentextcom.setCom(currentcom);
     79            currentextcom.setHref(href);
     80            extcomms.add(currentextcom);
     81        }
     82       
    7483        RssCreatorComments instance = new RssCreatorComments();
    7584        assertEquals(Double.toString(instance.getVersion()) , "2.0"); // check if the default version is set properly
    7685       
    77         instance.setFlagIsFromProfile(true);
     86        instance.setFlagIsFromProfile(isFromProfile);
    7887        instance.setVersion(3.0);
    7988       
    80         Rss result = instance.makeRss(comms);
     89        Rss result = instance.makeRss(extcomms);
    8190       
    8291        assertEquals(Double.toString(result.getVersion()), "3.0"); // now, check if updating version has taken place
    8392       
    8493        String rfcdate1 = instance.getRFCDateTime("2012-04-02T11:38:23+00:00");
    85         String rfcdate2 = instance.getRFCDateTime("2012-05-02T12:38:23+00:00");
    86         String rfcdate3 = instance.getRFCDateTime("2012-04-07T11:38:23+01:00");
     94        String rfcdate2 = instance.getRFCDateTime("2011-04-02T11:38:22+00:00");
     95        String rfcdate3 = instance.getRFCDateTime("2010-05-02T11:38:22+00:00");
    8796       
    8897        List<RssItem> resitems = result.getChannel().getItem();
    89         compareInputsVsRssItems("userello", "this is comment # 1", rfcdate1 , "The comment in ProfileDescId1.", resitems.get(0));
    90         compareInputsVsRssItems("userino", "this is comment # 2", rfcdate2, "The comment in ProfileDescId2.", resitems.get(1));
    91         compareInputsVsRssItems("userito", "this is comment # 3", rfcdate3, "The comment in ProfileDescId3.", resitems.get(2));
     98        compareInputsVsRssItems(href, "this is comment # 1", rfcdate1,
     99                 instance.makeCommentTitle("commentId1", "descrId1", "userello"), resitems.get(0));
     100        compareInputsVsRssItems(href, "this is comment # 2", rfcdate2,
     101                instance.makeCommentTitle("commentId2", "descrId2", "userino"),
     102                resitems.get(1));
     103        compareInputsVsRssItems(href, "this is comment # 3", rfcdate3,
     104                instance.makeCommentTitle("commentId3", "descrId3", "userito")
     105                , resitems.get(2));
    92106       
    93107       
    94         System.out.println(resitems.get(0).getPubDate());
    95         System.out.println("hallo");
     108       
    96109    }
    97110   
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/RssCreatorDescriptionsTest.java

    r2247 r2252  
    4747
    4848    private void createTestDescription(AbstractDescription desc, int commentcount, String creatorname,
    49             String description, String domainname, String groupname, String href,
    50             String name, String uid, String date) {
     49            String description, String domainname, String groupname,
     50            String name, String date, String href) {
    5151
    5252        desc.setCommentsCount(commentcount);
     
    5555        desc.setDomainName(domainname);
    5656        desc.setGroupName(groupname);
     57        desc.setName(name);
     58        desc.setRegistrationDate(date);
    5759        desc.setHref(href);
    58         desc.setName(name);
    59         desc.setUserId(uid);
    60         desc.setRegistrationDate(date);
    6160
    6261    }
    6362
    6463    private ProfileDescription createTestProfileDescription(int commentcount, String creatorname,
    65             String description, String domainname, String groupname, String href,
    66             String name, boolean editorFlag, String uid, String date) {
     64            String description, String domainname, String groupname,
     65            String name, boolean editorFlag, String date, String href) {
    6766
    6867        ProfileDescription pdesc = ProfileDescription.createNewDescription();
    6968
    70         createTestDescription(pdesc, commentcount, creatorname, description, domainname, groupname, href, name, uid, date);
     69        createTestDescription(pdesc, commentcount, creatorname, description, domainname, groupname, name, date, href);
    7170
    7271        pdesc.setShowInEditor(editorFlag);
     
    7877
    7978    private ComponentDescription createTestComponentDescription(int commentcount, String creatorname,
    80             String description, String domainname, String groupname, String href,
    81             String name, String uid, String date) {
     79            String description, String domainname, String groupname,
     80            String name, String date, String href) {
    8281
    8382        ComponentDescription cdesc = ComponentDescription.createNewDescription();
    8483
    85         createTestDescription(cdesc, commentcount, creatorname, description, domainname, groupname, href, name, uid, date);
     84        createTestDescription(cdesc, commentcount, creatorname, description, domainname, groupname, name, date, href);
    8685
    8786        return cdesc;
     
    9190
    9291    //////////////////////////////////////
    93     private void compareRssVsValues(String creatorname, String description, String href, String date, String nametitle, RssItem item) {
    94         assertEquals(creatorname, item.getCreator().getValue());
     92    private void compareRssVsValues(String description, String href, String date, String title, RssItem item) {
     93       
    9594        assertEquals(description, item.getDescription());
    96         assertEquals(href, item.getLink());
     95        assertEquals(href, item.getGuid().getValue()  );
    9796        assertEquals(date, item.getPubDate());
    98         assertEquals(nametitle, item.getTitle());
     97        assertEquals(title, item.getTitle());
    9998    }
    10099
     
    106105    public void testMakeRss() throws JAXBException, UnsupportedEncodingException, IOException, ParseException{
    107106
     107        String href="http";
    108108       
    109        
    110         ProfileDescription desc1 = createTestProfileDescription(23, "Joe Unit",
    111                 "description-1", "domainname-1", "groupname-1", "href-1", "titlename-1", true, "uid1", "2001-01-01");
     109        ProfileDescription desc1 = createTestProfileDescription(23, "Creator 1",
     110                "description-1", "domainname-1", "groupname-1", "name-1", true, "2001-01-01", href);
    112111
    113         ProfileDescription desc2 = createTestProfileDescription(23, "Joe Unit",
    114                 "description-2", "domainname-2", "groupname-2", "href-2", "titlename-2", false, "uid-2", "2001-01-02");
     112        ProfileDescription desc2 = createTestProfileDescription(23, "Creator 2",
     113                "description-2", "domainname-2", "groupname-2", "name-2", false, "2001-01-02", href);
    115114
    116         ProfileDescription desc3 = createTestProfileDescription(23, "Terminator",
    117                 "description-3", "domainname-3", "groupname-3", "href-3", "titlename-3", true, "uid-3", "2001-01-03");
     115        ProfileDescription desc3 = createTestProfileDescription(23, "Creator 3",
     116                "description-3", "domainname-3", "groupname-3", "name-3", true, "2001-01-03", href);
    118117
    119118        List<ProfileDescription> descriptions = Arrays.asList(desc1, desc2, desc3);
     
    126125        instance.setVersion(2.0);
    127126       
     127        instance.setLink(href);
    128128        instance.setCategory(null);
    129129        instance.setCloud(null);
     
    135135        instance.setLanguage("engl");
    136136        instance.setLastBuildDate("today");
    137         instance.setLink("link");
    138137        instance.setManagingEditor("twan");
    139138        instance.setPubDate("publication date");
     
    154153
    155154        // String creatorname, String description, String href, String date, String nametitle, RssItem item
    156         compareRssVsValues("Joe Unit",
    157                 "description-1", "href-1", "2001-01-01", "titlename-1", items.get(0));
     155        compareRssVsValues("description-1", href, "2001-01-01",
     156                   instance.makeDescriptionTitle("name-1", "Creator-1", "groupname-1","domainname-1"), items.get(0));
    158157
    159         compareRssVsValues("Joe Unit",
    160                 "description-2", "href-2", "2001-01-02", "titlename-2", items.get(1));
     158        compareRssVsValues("description-2", href, "2001-01-02",
     159                instance.makeDescriptionTitle("name-2", "Creator-2", "groupname-2","domainname-2"), items.get(1));
    161160
    162         compareRssVsValues("Terminator",
    163                 "description-3", "href-3", "2001-01-03", "titlename-3", items.get(2));
     161        compareRssVsValues("description-3", href, "2001-01-03",
     162                instance.makeDescriptionTitle("name-3", "Creator-3", "groupname-3","domainname-3"), items.get(2));
    164163
    165164       
     
    176175        assertEquals("engl", result.getChannel().getLanguage());
    177176        assertEquals("today", result.getChannel().getLastBuildDate());
    178         assertEquals("link", result.getChannel().getLink());
     177        assertEquals(href, result.getChannel().getLink());
    179178        assertEquals("twan", result.getChannel().getManagingEditor());
    180179        assertEquals("publication date", result.getChannel().getPubDate());
     
    192191    }
    193192   
    194    
    195     // the test below shows that if we do not set parameters for the channel or no version for Rss
    196     // then nothing wrong happen, no null pointer exception, etc.
    197     @Test
    198     public void testMakeRssNoChannelSet() throws JAXBException, UnsupportedEncodingException, IOException, ParseException{
    199 
    200        
    201         ProfileDescription desc1 = createTestProfileDescription(23, "Joe Unit",
    202                 "description-1", "domainname-1", "groupname-1", "href-1", "titlename-1", true, "uid1", "2001-01-01");
    203 
    204         List<ProfileDescription> descriptions = Arrays.asList(desc1);
    205 
    206         RssCreatorDescriptions instance = new RssCreatorDescriptions();
    207         Rss result = instance.makeRss(descriptions);
    208        
    209 
    210         List<RssItem> items = result.getChannel().getItem();
    211 
    212         assertEquals(1, result.getChannel().getItem().size());
    213 
    214         // String creatorname, String description, String href, String date, String nametitle, RssItem item
    215         compareRssVsValues("Joe Unit",
    216                 "description-1", "href-1", "2001-01-01", "titlename-1", items.get(0));
    217 
    218        
    219         //write the Rss chaneel into the file, so you can see  how it looks like in the browser
    220         String path=RegistryTestHelper.openTestDir("testRss");
    221         String os = MDMarshaller.marshalToString(result);
    222         RegistryTestHelper.writeStringToFile(os, path + "testRssNoChannelSet.xml");
    223     }
    224 
    225  
     193   
    226194}
    227 // String comp1 = "Component1.xml";
    228 // String path = RegistryTestHelper.openTestDir("MyTestXmls");
    229 // FileInputStream is1 = new FileInputStream(path + comp1);
    230 // ComponentDescription desc1 = MDMarshaller.unmarshal(ComponentDescription.class, is1, null);
Note: See TracChangeset for help on using the changeset viewer.