Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<!-- Copyright (c) 2011 Leibniz Institute of Plant Genetics and Crop Plant 
	Research (IPK), Gatersleben, Germany. All rights reserved. This program and 
	the accompanying materials are made available under the terms of the GNU 
	Lesser Public License v2.1 which accompanies this distribution, and is available 
	at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html Contributors: Leibniz 
	Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany 
	- initial API and implementation -->
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>Metadata - $entity.getVersionByDate($date).getName()</title>
	</head>
	<body marginwidth="50" marginheight="10">

		#parse("de/ipk_gatersleben/bit/bi/edal/primary_data/top.xml")

		#parse("de/ipk_gatersleben/bit/bi/edal/primary_data/data_description.xml")

		<b>PersistentIdentifiers:</b>
		<br />
		#foreach( $element in
		$entity.getCurrentVersion().getPublicReferences())
		<b>$element.getIdentifierType():</b>
		$element.getAssignedID()
		<br />
		#end

		<h3>Directory Content</h3>
		<hr />
		<table cellpadding="2" width="100%" align="left">
			<tr>
				<td align="left" width="15%">
					<b>
						<font size="3">Path:</font>
					</b>
				</td>
				<td align="left">
					#set ($a= $entity)
					$a.switchCurrentVersion($entity.getVersionByDate($date))
					$a.getPath()&#160;
					<a
						href="$serverURL/$identifierType/$internalId/$entity.getID()/$entity.getVersionByDate($date).getRevision()/ZIP">
						<img src="$serverURL/LOGO/zip_logo.png" width="20px" height="20px"
							title="download as zip" alt="zipLogo" />
					</a>
				</td>
			</tr>
			<tr>
				<td align="left" width="15%">
					<b>
						<font size="3">
							Parent Directory:
						</font>
					</b>
				</td>
				<td align="left">
					#if(!$entity.getParentDirectory()) <!-- show no Link -->
					#else
					<a
						href="$serverURL/$identifierType/$internalId/$entity.getParentDirectory().getID()/$entity.getParentDirectory().getVersionByDate($date).getRevision()">$entity.getParentDirectory().getVersionByDate($date).getName()
					</a>
					#end
				</td>
			</tr>
		</table>
		#parse("de/ipk_gatersleben/bit/bi/edal/primary_data/version_information.xml")
		#if($allobjects.isEmpty()!=true)
		<h3>Sub-Directories and -Files</h3>
		<hr />
		<table cellpadding="2" width="100%">
			<tr>
				<td>
					<b>
						<font size="3">Name</font>
					</b>
				</td>
				<td>
					<b>
						<font size="3">Type</font>
					</b>
				</td>
				<td>
					<b>
						<font size="3">Creation Date</font>
					</b>
				</td>
				<td>
					<b>
						<font size="3">Revision Date</font>
					</b>
				</td>
			</tr>
			#foreach( $object in $allobjects)
			<tr>
				<td>
					<a style="text-decoration:none;"
						href="$serverURL/$identifierType/$internalId/$object.getID()/$object.getVersionByDate($date).getRevision()">$object.getName()</a>
					&#160;
					#if($object.isDirectory())
					<a
						href="$serverURL/$identifierType/$internalId/$object.getID()/$object.getVersionByDate($date).getRevision()/ZIP">
						<img src="$serverURL/LOGO/zip_logo.png" width="20px" height="20px"
							title="download as zip" alt="zipLogo" />
						#else #end
					</a>
				</td>
				<td>#if($object.isDirectory()) Directory #else File #end
				</td>
				<td>$object.getVersionByDate($date).getCreationDate().getTime()
				</td>
				<td>$object.getVersionByDate($date).getRevisionDate().getTime()
				</td>
			</tr>
			#end
		</table>
		#else
		#end

		#parse("de/ipk_gatersleben/bit/bi/edal/primary_data/metadata_information.xml")

	</body>
</html>
New to GrepCode? Check out our FAQ X