/******************************************************************************************************************* * * ******************************************************************************************************************/ @ThreadConfined(type=NOT_UI) protected void createPresentationModels (final @Nonnull Taxon taxon) throws NotFoundException { log.info("createPresentationModels({})", taxon); // stillImages.addAll(taxon.as(Documentable).getFactSheet().getMultiple(FOAF_IMAGE)); for (final Media stillImage : taxon.as(Documentable).getFactSheet().getMultiple(FOAF_IMAGE)) { addPresentationModel(stillImage.with(ID, replacedId(stillImage.get(ID))).as(Presentable).createPresentationModel()); } }
@ThreadConfined(type=NOT_UI) protected void createPresentationModels (final @Nonnull Taxon taxon) { addPresentationModel(new TextPresentationModel(taxon.as(HtmlRenderable).render(HIERARCHY))); try { // FIXME: instead of tweaking h2, use a CSS addPresentationModel(new DocumentPresentationModel(taxon.as(Documentable).getFactSheet().get(DESCRIPTION).replaceAll(("h2>"), "h3>"))); } catch (AsException e) { addPresentationModel(new TextPresentationModel("No info")); // FIXME } catch (NotFoundException e) { addPresentationModel(new TextPresentationModel("No info")); // FIXME } } }