Changeset 2257
- Timestamp:
- 09/27/12 10:06:46 (12 years ago)
- 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 1009 1009 public Rss getRssComponent(@QueryParam(USERSPACE_PARAM) @DefaultValue("false") boolean userspace, @QueryParam(NUMBER_OF_RSSITEMS) @DefaultValue("20") String limit) throws ComponentRegistryException, ParseException { 1010 1010 1011 1011 List<ComponentDescription> components = getRegistry(getStatus(userspace)).getComponentDescriptions(); 1012 1012 Rss rss = getRss(userspace, limit, components, "components"); 1013 1013 … … 1045 1045 /* grabbing all registered profile names from the register and outputting them on the tomcat terminal */ 1046 1046 List<ProfileDescription> lprfaux = getRegisteredProfiles(userspace, true); 1047 1048 1047 1049 1048 for (ProfileDescription currentProfile : lprfaux) { 1050 1051 String currentProfileId = currentProfile.getId(); 1049 String currentProfileId = currentProfile.getId(); 1052 1050 LOG.debug(currentProfileId); 1053 1054 1051 } 1055 1052 /* end of grabbing */ … … 1062 1059 1063 1060 String baseUri = getApplicationBaseURI()+"/"; 1064 1065 1061 LOG.debug("Basis uri "+baseUri); 1066 1062 … … 1076 1072 instance.setFlagIsFromProfile(true); 1077 1073 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"); 1079 1078 1080 1079 Rss result = instance.makeRss(sublist); … … 1086 1085 String os = MDMarshaller.marshalToString(result); 1087 1086 writeStringToFile(os, path + "testRssResl.xml"); 1088 1089 1090 1087 //end of testing stuff 1088 1089 // debugging stuff 1091 1090 LOG.debug("The amount of items: "+Integer.toString(result.getChannel().getItem().size())); 1092 1091 LOG.debug("The amount of comments: "+Integer.toString(comments.size())); 1093 // end of testing stuff1092 // end of debugging stuff 1094 1093 1095 1094 -
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/RssMarshallingTest.java
r2247 r2257 41 41 MDMarshaller.marshal(rss, os); 42 42 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\"" 44 44 + ">\n" 45 45 + " <channel>\n"
Note: See TracChangeset
for help on using the changeset viewer.