comparison src/de/mpiwg/itgroup/escidoc/MPIWGServices/Restlet/services/redirect/DocuviewerRedirector.java @ 4:938e45fabd7c default tip

version f?r escidoc produktionsversion
author dwinter
date Wed, 25 Jul 2012 12:36:25 +0200
parents 498b68667ff3
children
comparison
equal deleted inserted replaced
3:498b68667ff3 4:938e45fabd7c
160 try { 160 try {
161 XPath xp= EScidocTools.getESciDocXpath("//metadataRecords:md-record[@xlink:title='mpiwg-admin']/mpiwg:admin/mpiwg:imageFolder"); 161 XPath xp= EScidocTools.getESciDocXpath("//metadataRecords:md-record[@xlink:title='mpiwg-admin']/mpiwg:admin/mpiwg:imageFolder");
162 Element item = (Element)xp.selectSingleNode(doc); 162 Element item = (Element)xp.selectSingleNode(doc);
163 String path = item.getTextTrim(); 163 String path = item.getTextTrim();
164 path= ECHORessource.correct(path); // nur pfad nach online 164 path= ECHORessource.correct(path); // nur pfad nach online
165 if (path.equals("")){
166 xp= EScidocTools.getESciDocXpath("//metadataRecords:md-record[@xlink:title='mpiwg-admin']/mpiwg:admin/mpiwg:archivePath");
167 item = (Element)xp.selectSingleNode(doc);
168 path = item.getTextTrim();
169 path= ECHORessource.correct(path); // nur pfad nach online
170 path=path+"/pageimg";
171 }
165 viewerUrl=String.format(viewerWithImagePathFormatString, path); 172 viewerUrl=String.format(viewerWithImagePathFormatString, path);
166 } catch (Exception e) { 173 } catch (Exception e) {
167 setStatus(Status.SERVER_ERROR_INTERNAL); 174 setStatus(Status.SERVER_ERROR_INTERNAL);
168 return new StringRepresentation("<html><body>error3</body></html>"); 175 return new StringRepresentation("<html><body>error3</body></html>");
169 } 176 }