A search interface for data from the Politics of Patents case study (part of Copim WP6): this parses data from the archive of RTF files and provides additional data from the European Patent Office API. https://patents.copim.ac.uk
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #set($docId = $doc.getFirstValue($request.schema.uniqueKeyField.name))
  2. ## Load Mime-Type List and Mapping
  3. #parse('mime_type_lists.vm')
  4. ## Title
  5. #if($doc.getFieldValue('title'))
  6. #set($title = $esc.html($doc.getFirstValue('title')))
  7. #else
  8. #set($title = "$doc.getFirstValue('id').substring($math.add(1,$doc.getFirstValue('id').lastIndexOf('/')))")
  9. #end
  10. ## Date
  11. #if($doc.getFieldValue('attr_meta_creation_date'))
  12. #set($date = $esc.html($doc.getFirstValue('attr_meta_creation_date')))
  13. #else
  14. #set($date = "No date found")
  15. #end
  16. ## URL
  17. #if($doc.getFieldValue('url'))
  18. #set($url = $doc.getFieldValue('url'))
  19. #elseif($doc.getFieldValue('resourcename'))
  20. #set($url = "file:///$doc.getFirstValue('resourcename')")
  21. #else
  22. #set($url = "$doc.getFieldValue('id')")
  23. #end
  24. ## Sort out Mime-Type
  25. #set($ct = $doc.getFirstValue('content_type').split(";").get(0))
  26. #set($filename = $doc.getFirstValue('resourcename'))
  27. #set($filetype = false)
  28. #set($filetype = $mimeExtensionsMap.get($ct))
  29. #if(!$filetype)
  30. #set($filetype = $filename.substring($filename.lastIndexOf(".")).substring(1))
  31. #end
  32. #if(!$filetype)
  33. #set($filetype = "file")
  34. #end
  35. #if(!$supportedMimeTypes.contains($filetype))
  36. #set($filetype = "file")
  37. #end
  38. <div class="result-document">
  39. <span class="result-title">
  40. <img src="#{url_root}/img/filetypes/${filetype}.png" align="center">
  41. <b>$title</b>
  42. </span>
  43. <div>
  44. id: $docId </br>
  45. </div>
  46. #set($pad = "")
  47. #foreach($v in $response.response.highlighting.get($docId).get("content"))
  48. $pad$esc.html($v).replace("HL_START","<em>").replace("HL_END","</em>")
  49. #set($pad = " ... ")
  50. #end
  51. </div>
  52. <a href="#" class="debug" onclick='jQuery(this).next().toggle(); return false;'>toggle explain</a>
  53. <pre style="display: none;">
  54. $esc.html($response.getExplainMap().get($doc.getFirstValue('id')))
  55. </pre>
  56. <a href="#" class="debug" onclick='jQuery(this).next().toggle(); return false;'>show all fields</a>
  57. <pre style="display:none;">
  58. #foreach($fieldname in $doc.fieldNames)
  59. <span>$fieldname :</span>
  60. <span>#foreach($value in $doc.getFieldValues($fieldname))$esc.html($value)#end</span>
  61. #end
  62. </pre>