<%-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --%> <%@page import="java.util.List"%> <%@page import="org.apache.wink.common.model.synd.SyndLink"%> <%@page import="org.apache.wink.common.model.synd.SyndCategory"%> <%@page import="org.apache.wink.server.internal.providers.entity.html.ExpandableSectionHelper"%> <%@page import="org.apache.wink.server.internal.providers.entity.html.HtmlSyndEntryAdapter"%> <%@page import="org.apache.wink.server.internal.providers.entity.html.HtmlConstants"%> <%@page import="org.apache.wink.common.model.atom.AtomConstants"%> <% HtmlSyndEntryAdapter htmlRepresentationEntryAdapter = (HtmlSyndEntryAdapter)request.getAttribute(HtmlConstants.RESOURCE_ATTRIBUTE_NAME_REQUEST); String id = htmlRepresentationEntryAdapter.getId(); String title = htmlRepresentationEntryAdapter.getTitle(); String updated = htmlRepresentationEntryAdapter.getUpdated(); String author = htmlRepresentationEntryAdapter.getAuthor(); String summary = htmlRepresentationEntryAdapter.getSummary(); String published = htmlRepresentationEntryAdapter.getPublished(); List links = htmlRepresentationEntryAdapter.getLinks(); List categories = htmlRepresentationEntryAdapter.getCategories(); String content = htmlRepresentationEntryAdapter.getContent(); boolean isContentXml = htmlRepresentationEntryAdapter.isContentXml(); String borderSize = "0"; %>
<% if (links != null && links.size() > 0) { %> <% } %> <% if (categories != null && categories.size() > 0) { %> <% } %> <% if (content != null && !content.equals("")) { %> <% } %>
<%=title%>
<%=summary%>
<%=ExpandableSectionHelper.getFormHeaderHtml("Metadata", "metadata", false)%>
Id: <%=id%>   Updated: <%=updated%>  
Published: <%=published%>  
Author: <%=author%>  
<%=ExpandableSectionHelper.getFormFooterHtml("metadata", false)%>
<%=ExpandableSectionHelper.getFormHeaderHtml("Links", "linksId", true)%> <% String linkHref = ""; String linkRel = ""; for (int i = 0; i < links.size(); i++) { linkHref = links.get(i).getHref(); linkRel = links.get(i).getRel(); %> <% } %>
Rel Link Type
<%=linkRel%> <% //incase of edit link, don't display it linkable if (AtomConstants.ATOM_REL_EDIT.equals(linkRel)) { %> <%=linkHref%> <% } else { %> <%=linkHref%> <% } %> <% if (links.get(i).getType() != null) { %><%=links.get(i).getType()%> <% } %> 
<%=ExpandableSectionHelper.getFormFooterHtml("linksId", false)%>
<%=ExpandableSectionHelper.getFormHeaderHtml("Categories", "categoryId", true)%> <% for (int i = 0; i < categories.size(); i++) { %> <% } %>
scheme term
<%=categories.get(i).getScheme()%> <% if (categories.get(i).getTerm() != null) { %><%=categories.get(i).getTerm()%> <% } %> 
<%=ExpandableSectionHelper.getFormFooterHtml("categoryId", true)%>
<%=ExpandableSectionHelper.getFormHeaderHtml("Content", "contentId", true)%>
<%=content%>
<%=ExpandableSectionHelper.getFormFooterHtml("contentId", true)%>