Changeset 2257


Ignore:
Timestamp:
09/27/12 10:06:46 (12 years ago)
Author:
olhsha
Message:

safari still duplicates an item

Location:
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestService.java

    r2255 r2257  
    10091009    public Rss getRssComponent(@QueryParam(USERSPACE_PARAM) @DefaultValue("false") boolean userspace, @QueryParam(NUMBER_OF_RSSITEMS) @DefaultValue("20") String limit) throws ComponentRegistryException, ParseException {
    10101010   
    1011         List<ComponentDescription> components = getRegistry(getStatus(userspace)).getComponentDescriptions();
     1011       List<ComponentDescription> components = getRegistry(getStatus(userspace)).getComponentDescriptions();
    10121012      Rss rss = getRss(userspace, limit, components, "components");
    10131013       
     
    10451045        /* grabbing all registered profile names from the register and outputting them  on the tomcat terminal */
    10461046        List<ProfileDescription> lprfaux = getRegisteredProfiles(userspace, true);
    1047 
    1048 
     1047       
    10491048        for (ProfileDescription currentProfile : lprfaux) {
    1050 
    1051             String currentProfileId = currentProfile.getId();
     1049            String currentProfileId = currentProfile.getId();
    10521050            LOG.debug(currentProfileId);
    1053 
    10541051        }
    10551052        /* end of grabbing */
     
    10621059
    10631060        String baseUri = getApplicationBaseURI()+"/";
    1064        
    10651061        LOG.debug("Basis uri "+baseUri);
    10661062       
     
    10761072        instance.setFlagIsFromProfile(true);
    10771073        instance.setDescription("Update of comments for current profile");
    1078         instance.setTitle("Comments feed for the profile "+profileId);
     1074        instance.setTitle("Comments feed for the profile \""+
     1075                getRegistry(getStatus(userspace)).getProfileDescription(profileId).getName()+
     1076                "\" ");
     1077        instance.setLink(baseUri+"profiles/rss");
    10791078       
    10801079        Rss result = instance.makeRss(sublist);
     
    10861085        String os = MDMarshaller.marshalToString(result);
    10871086        writeStringToFile(os, path + "testRssResl.xml");
    1088        
    1089        
    1090        
     1087        //end of testing stuff
     1088       
     1089        // debugging stuff
    10911090        LOG.debug("The amount of items: "+Integer.toString(result.getChannel().getItem().size()));
    10921091        LOG.debug("The amount of comments: "+Integer.toString(comments.size()));
    1093         // end of testing stuff
     1092        // end of debugging stuff
    10941093       
    10951094
  • ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/RssMarshallingTest.java

    r2247 r2257  
    4141        MDMarshaller.marshal(rss, os);
    4242        String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
    43                 + "<rss version=\"2.0\" xmlns:ns2=\"http://purl.org/dc/elements/1.1/\""
     43                + "<rss version=\"2.0\""
    4444                + ">\n"
    4545                + "    <channel>\n"
Note: See TracChangeset for help on using the changeset viewer.