Beispiel #1
0
 public String changeTemplate() throws Exception {
   profile.getStatements().clear();
   MetadataProfile tp = ObjectLoader.loadProfile(URI.create(this.template), sessionBean.getUser());
   if (!tp.getStatements().isEmpty()) {
     profile.setStatements(tp.getStatements());
   } else {
     profile.getStatements().add(ImejiFactory.newStatement());
   }
   for (Statement s : profile.getStatements()) {
     s.setId(
         URI.create(
             s.getId().toString().replace(tp.getId().toString(), profile.getId().toString())));
   }
   collectionSession.setProfile(profile);
   initBeanObjects(profile);
   return getNavigationString();
 }