[24556] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 2 | <CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
[24945] | 3 | <metadataList><metadata lang="en" name="creator"></metadata><metadata lang="en" name="maintainer"></metadata><metadata lang="en" name="public">true</metadata></metadataList><displayItemList><displayItem assigned="true" lang="en" name="name">Pei-Jones-Flat</displayItem></displayItemList><search type="mgpp"><level name="document"><displayItem lang="en" name="name">document</displayItem></level><level name="section"><displayItem lang="en" name="name">section</displayItem></level><defaultLevel name="document"/><index name="text"><displayItem lang="en" name="name">text</displayItem></index><index name="Title"><displayItem lang="en" name="name">titles</displayItem></index><index name="Source"><displayItem lang="en" name="name">filenames</displayItem></index><index name="Plugin"/><index name="gsimg.photoNote"><displayItem lang="en" name="name">photo annotations</displayItem></index><index name="gstext.tags"><displayItem lang="en" name="name">text annotations (tags)</displayItem></index><index name="gstext.text"><displayItem lang="en" name="name">text annotations (text)</displayItem></index><index name="gstext.user"><displayItem lang="en" name="name">text annotations (user)</displayItem></index><defaultIndex name="text"/><indexOption><option name="accentfold"/><option name="casefold"/><option name="stem"/></indexOption><searchType name="plain"/><searchType name="simpleform"/><searchType name="advancedform"/><format>
|
---|
| 4 | <gsf:template match="documentNode">
|
---|
| 5 | <td valign="top">
|
---|
| 6 | <gsf:link type="document">
|
---|
| 7 | <gsf:icon type="document"/>
|
---|
| 8 | </gsf:link>
|
---|
| 9 | </td>
|
---|
| 10 | <td>
|
---|
| 11 | <gsf:switch>
|
---|
| 12 | <gsf:metadata name="Title" select="ancestors" separator=": "/>
|
---|
| 13 | <gsf:when test="exists"><gsf:metadata name="Title" select="ancestors" separator=": "/>:</gsf:when>
|
---|
| 14 | </gsf:switch>
|
---|
| 15 | <gsf:link type="document">
|
---|
| 16 | <gsf:metadata name="Title"/>
|
---|
| 17 | </gsf:link>
|
---|
| 18 | </td>
|
---|
| 19 | </gsf:template>
|
---|
| 20 | </format></search><infodb type="gdbm"/><import><pluginList><plugin name="ZIPPlugin"/><plugin name="GreenstoneXMLPlugin"/><plugin name="TextPlugin"/><plugin name="HTMLPlugin"><option name="-process_exp" value="(timeglider.*)(?i)(\.html?)$"/><option name="-block_exp" value="(timeglider.*)(?i)(\.jpe?g|\.png|\.gif)$"/><option name="-keep_head"/></plugin><plugin name="EmailPlugin"/><plugin name="PDFPlugin"/><plugin name="RTFPlugin"/><plugin name="WordPlugin"/><plugin name="PostScriptPlugin"/><plugin name="PowerPointPlugin"/><plugin name="ExcelPlugin"/><plugin name="PagedImagePlugin"/><plugin name="ImagePlugin"/><plugin name="ISISPlugin"/><plugin name="NulPlugin"/><plugin name="OAIPlugin"/><plugin name="HTMLImagePlugin"/><plugin name="MetadataXMLPlugin"/><plugin name="ArchivesInfPlugin"/><plugin name="DirectoryPlugin"/></pluginList></import><browse><classifier name="List"><option name="-metadata" value="dc.Title;Title"/><option name="-partition_type_within_level" value="approximate_size"/><option name="-bookshelf_type" value="never"/></classifier><classifier name="AZCompactList"><option name="-metadata" value="Source"/><option name="-removesuffix" value="(?i)\\..*"/><option name="-buttonname" value="Source"/></classifier><format>
|
---|
| 21 | <gsf:template match="documentNode">
|
---|
| 22 | <td valign="top">
|
---|
| 23 | <gsf:link type="document">
|
---|
| 24 | <gsf:icon type="document"/>
|
---|
| 25 | </gsf:link>
|
---|
| 26 | </td>
|
---|
| 27 | <td valign="top">
|
---|
| 28 | <gsf:link type="source">
|
---|
| 29 | <gsf:choose-metadata>
|
---|
| 30 | <gsf:metadata name="thumbicon"/>
|
---|
| 31 | <gsf:metadata name="srcicon"/>
|
---|
| 32 | </gsf:choose-metadata>
|
---|
| 33 | </gsf:link>
|
---|
| 34 | </td>
|
---|
| 35 | <td valign="top">
|
---|
| 36 | <gsf:choose-metadata>
|
---|
| 37 | <gsf:metadata name="dc.Title"/>
|
---|
| 38 | <gsf:metadata name="exp.Title"/>
|
---|
| 39 | <gsf:metadata name="Title"/>
|
---|
| 40 | <gsf:default>Untitled</gsf:default>
|
---|
| 41 | </gsf:choose-metadata>
|
---|
| 42 | <gsf:switch>
|
---|
| 43 | <gsf:metadata name="Source"/>
|
---|
| 44 | <gsf:when test="exists">
|
---|
| 45 | <br/>
|
---|
| 46 | <i>(<gsf:metadata name="Source"/>)</i>
|
---|
| 47 | </gsf:when>
|
---|
| 48 | </gsf:switch>
|
---|
| 49 | </td>
|
---|
| 50 | </gsf:template>
|
---|
| 51 | <gsf:template match="classifierNode">
|
---|
| 52 | <td valign="top">
|
---|
| 53 | <gsf:link type="classifier">
|
---|
| 54 | <gsf:icon type="classifier"/>
|
---|
| 55 | </gsf:link>
|
---|
| 56 | </td>
|
---|
| 57 | <td valign="top">
|
---|
| 58 | <gsf:metadata name="srclink"/>
|
---|
| 59 | <gsf:choose-metadata>
|
---|
| 60 | <gsf:metadata name="thumbicon"/>
|
---|
| 61 | <gsf:metadata name="srcicon"/>
|
---|
| 62 | </gsf:choose-metadata>
|
---|
| 63 | <gsf:metadata name="/srclink"/>
|
---|
| 64 | </td>
|
---|
| 65 | <td valign="top">
|
---|
| 66 | <gsf:choose-metadata>
|
---|
| 67 | <gsf:metadata name="dc.Title"/>
|
---|
| 68 | <gsf:metadata name="exp.Title"/>
|
---|
| 69 | <gsf:metadata name="Title"/>
|
---|
| 70 | <gsf:default>Untitled</gsf:default>
|
---|
| 71 | </gsf:choose-metadata>
|
---|
| 72 | <gsf:switch>
|
---|
| 73 | <gsf:metadata name="Source"/>
|
---|
| 74 | <gsf:when test="exists">
|
---|
| 75 | <br/>
|
---|
| 76 | <i>(<gsf:metadata name="Source"/>)</i>
|
---|
| 77 | </gsf:when>
|
---|
| 78 | </gsf:switch>
|
---|
| 79 | </td>
|
---|
| 80 | </gsf:template>
|
---|
| 81 | <gsf:template match="classifierNode" mode="horizontal">
|
---|
| 82 | <gsf:link type="horizontal">
|
---|
| 83 | <gsf:metadata name="Title"/>
|
---|
| 84 | </gsf:link>
|
---|
| 85 | </gsf:template>
|
---|
| 86 | </format></browse><display><format>
|
---|
| 87 | <gsf:option name="sideBar" value="false"/>
|
---|
| 88 | <xsl:template name="additionalHeaderContent">
|
---|
| 89 | <!-- jQuery must be included before Annotator -->
|
---|
| 90 | <script src="sites/localsite/collect/peijones/js/annotator/lib/vendor/jquery.js">
|
---|
| 91 | <xsl:text> </xsl:text>
|
---|
| 92 | </script>
|
---|
| 93 | <!-- If you're sure your users will only be using browsers modern
|
---|
[24730] | 94 | enough to have their own JSON.parse and JSON.stringify
|
---|
| 95 | implementations you can skip this -->
|
---|
[24945] | 96 | <script src="sites/localsite/collect/peijones/js/annotator/lib/vendor/json2.js">
|
---|
| 97 | <xsl:text> </xsl:text>
|
---|
| 98 | </script>
|
---|
| 99 | <script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator-full.min.js">
|
---|
| 100 | <xsl:text> </xsl:text>
|
---|
| 101 | </script>
|
---|
| 102 | <!-- The main Annotator script -->
|
---|
| 103 | <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.min.js"><xsl:text> </xsl:text></script> -->
|
---|
| 104 | <!-- Annotator's styling and images -->
|
---|
| 105 | <link href="sites/localsite/collect/peijones/js/annotator/pkg/annotator.min.css" rel="stylesheet" type="text/css"/>
|
---|
| 106 | <!-- The following plugins are entirely optional -->
|
---|
| 107 | <!-- The Store plugin. Saves annotations to a remote backend -->
|
---|
| 108 | <!-- <script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.store.min.js"><xsl:text> </xsl:text></script> -->
|
---|
| 109 | <!-- The Auth plugin. Allows users of Annotator to authenticate themselves
|
---|
[24730] | 110 | to the remote backend -->
|
---|
[24945] | 111 | <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.auth.min.js"><xsl:text> </xsl:text></script> -->
|
---|
| 112 | <!-- The Permissions plugin. See who created which annotation and create
|
---|
[24730] | 113 | annotations as a specified user -->
|
---|
[24945] | 114 | <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.permissions.min.js"><xsl:text> </xsl:text></script> -->
|
---|
| 115 | <!-- The Tags plugin. Edit and display tag keywords on annotations -->
|
---|
| 116 | <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.tags.min.js"><xsl:text> </xsl:text></script> -->
|
---|
| 117 | <!-- The Markdown plugin. Treat annotation text as Markdown -->
|
---|
| 118 | <!-- <script src="sites/localsite/collect/peijones/js/annotator/lib/vendor/showdown.js"><xsl:text> </xsl:text></script> -->
|
---|
| 119 | <!-- <script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.markdown.min.js"><xsl:text> </xsl:text></script> -->
|
---|
| 120 | <!-- Photo note scripts -->
|
---|
| 121 | <script src="sites/localsite/collect/peijones/js/documentmaker/BrowserDetect.js" type="text/javascript">
|
---|
| 122 | <xsl:text> </xsl:text>
|
---|
| 123 | </script>
|
---|
| 124 | <script src="sites/localsite/collect/peijones/js/documentmaker/PhotoNotes-1.5.js" type="text/javascript">
|
---|
| 125 | <xsl:text> </xsl:text>
|
---|
| 126 | </script>
|
---|
| 127 | <link href="sites/localsite/collect/peijones/style/PhotoNotes-1.5.css" rel="stylesheet" type="text/css"/>
|
---|
| 128 | <!-- Zoom scripts -->
|
---|
| 129 | <!--<script src="interfaces/{$interface_name}/js/jquery-1.4.2.js" type="text/javascript"><xsl:text> </xsl:text></script>-->
|
---|
| 130 | <script src="sites/localsite/collect/peijones/js/documentmaker/zoomer.jquery.js" type="text/javascript">
|
---|
| 131 | <xsl:text> </xsl:text>
|
---|
| 132 | </script>
|
---|
| 133 | <link href="sites/localsite/collect/peijones/style/style.css" rel="stylesheet" type="text/css"/>
|
---|
| 134 | <script type="text/javascript">
|
---|
| 135 | <xsl:text disable-output-escaping="yes">
|
---|
[24769] | 136 | _zoomEnabled = true;
|
---|
[24730] | 137 | function readyImagesForZoom()
|
---|
[24769] | 138 | {
|
---|
| 139 | var noZoom = document.getElementById("noZoom");
|
---|
| 140 | var wrap = document.getElementById("wrap");
|
---|
| 141 | if(!noZoom || !wrap)
|
---|
| 142 | {
|
---|
| 143 | return;
|
---|
| 144 | }
|
---|
[24730] | 145 | var smallImageDiv = document.getElementById("small");
|
---|
| 146 | var smallImage = smallImageDiv.getElementsByTagName("img")[0];
|
---|
[24769] | 147 | smallImageDiv.style.width = smallImageWidth + "px";
|
---|
| 148 | smallImageDiv.style.height = smallImageHeight + "px";
|
---|
| 149 | var multiplier = largeImageHeight / smallImageHeight;
|
---|
[24730] | 150 | $("#wrap").anythingZoomer({
|
---|
| 151 | expansionSize:50,
|
---|
| 152 | speedMultiplier:multiplier
|
---|
[24769] | 153 | });
|
---|
| 154 |
|
---|
| 155 | noZoom.onclick = function(){addZoom();}
|
---|
| 156 | document.getElementById("overlay").onclick = function(){removeZoom();}
|
---|
| 157 |
|
---|
| 158 | removeZoom();
|
---|
[24730] | 159 | }
|
---|
| 160 | function addZoom()
|
---|
[24769] | 161 | {
|
---|
| 162 | if(!_zoomEnabled)
|
---|
| 163 | {
|
---|
| 164 | return;
|
---|
| 165 | }
|
---|
| 166 |
|
---|
[24730] | 167 | var wrapper = document.getElementById("wrap");
|
---|
| 168 | var noZoom = document.getElementById("noZoom");
|
---|
[24769] | 169 |
|
---|
| 170 | if(!noZoom || !wrapper)
|
---|
| 171 | {
|
---|
| 172 | return;
|
---|
| 173 | }
|
---|
| 174 |
|
---|
[24730] | 175 | noZoom.style.display = "none";
|
---|
| 176 | wrapper.style.display = "block";
|
---|
| 177 | var option = document.getElementById("zoomOption");
|
---|
[24769] | 178 | if(option)
|
---|
| 179 | {
|
---|
| 180 | option.setAttribute("onclick", "removeZoom();");
|
---|
| 181 | }
|
---|
[24730] | 182 | }
|
---|
| 183 | function removeZoom()
|
---|
| 184 | {
|
---|
[24769] | 185 | if(!_zoomEnabled)
|
---|
| 186 | {
|
---|
| 187 | return;
|
---|
| 188 | }
|
---|
| 189 |
|
---|
[24730] | 190 | var wrapper = document.getElementById("wrap");
|
---|
| 191 | var noZoom = document.getElementById("noZoom");
|
---|
[24769] | 192 |
|
---|
| 193 | if(!noZoom || !wrapper)
|
---|
| 194 | {
|
---|
| 195 | return;
|
---|
| 196 | }
|
---|
| 197 |
|
---|
[24730] | 198 | wrapper.style.display = "none";
|
---|
| 199 | noZoom.style.display = "block";
|
---|
| 200 | var option = document.getElementById("zoomOption");
|
---|
[24769] | 201 | if(option)
|
---|
| 202 | {
|
---|
| 203 | option.setAttribute("onclick", "addZoom();");
|
---|
| 204 | }
|
---|
| 205 | }
|
---|
[24945] | 206 | </xsl:text>
|
---|
| 207 | </script>
|
---|
| 208 | <script text="text/javascript">
|
---|
[24948] | 209 | <xsl:text disable-output-escaping="yes">
|
---|
[24769] | 210 |
|
---|
| 211 | var _posCount = 0;
|
---|
| 212 | var _notes;
|
---|
| 213 | function initNotes()
|
---|
[24730] | 214 | {
|
---|
[24769] | 215 | /* create the Photo Note Container */
|
---|
| 216 | _notes = new PhotoNoteContainer(document.getElementById("noZoom"));
|
---|
| 217 | getNotes();
|
---|
| 218 | }
|
---|
| 219 |
|
---|
| 220 | function deleteFunction(note)
|
---|
| 221 | {
|
---|
| 222 | var status = true;
|
---|
| 223 |
|
---|
| 224 | if (note && note.id && note.id > 0) {
|
---|
| 225 | var metaposStr = note.id - 1;
|
---|
[24946] | 226 |
|
---|
| 227 | var jsonVal = '{"caption":"' + note.text + '", "area":{"x":' + note.rect.left + ', "y":' + note.rect.top + ', "width":' + note.rect.width + ', "height":' + note.rect.height + '}}';
|
---|
[24769] | 228 |
|
---|
[24946] | 229 | var removeFromIndexURL = "cgi-bin/metadata-server.pl?a=remove-metadata&site=localsite&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=gsimg.photoNote&metapos=" + metaposStr;
|
---|
| 230 | var removeFromArchivesURL = "cgi-bin/metadata-server.pl?a=remove-archives-metadata&site=localsite&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=gsimg.photoNote&metapos=" + metaposStr;
|
---|
| 231 | var removeFromImportURL = "cgi-bin/metadata-server.pl?a=remove-import-metadata&site=localsite&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=gsimg.photoNote&metavalue=" + jsonVal;
|
---|
| 232 |
|
---|
| 233 | var indexCallback =
|
---|
| 234 | {
|
---|
| 235 | success: function(response)
|
---|
| 236 | {
|
---|
| 237 | for(var i = 0; i < _notes.length; i++)
|
---|
| 238 | {
|
---|
| 239 | var currentNote = _notes[i];
|
---|
| 240 | if(currentNote.id > note.id)
|
---|
| 241 | {
|
---|
| 242 | currentNote.id--;
|
---|
| 243 | }
|
---|
| 244 | }
|
---|
[24948] | 245 | _posCount--;
|
---|
[24946] | 246 | },
|
---|
| 247 | failed: function(){alert("Failed to delete index metadata of note with id: " + note.id);},
|
---|
| 248 | };
|
---|
| 249 |
|
---|
| 250 | var archiveCallback =
|
---|
| 251 | {
|
---|
| 252 | success: function(){buildFunction(gs.cgiParams.c);},
|
---|
| 253 | failed: function(){alert("Failed to delete archive metadata of note with id: " + note.id);}
|
---|
| 254 | }
|
---|
| 255 |
|
---|
| 256 | var importCallback =
|
---|
| 257 | {
|
---|
| 258 | success: function(){},
|
---|
| 259 | failed: function(){alert("Failed to delete import metadata of note with id: " + note.id);}
|
---|
| 260 | }
|
---|
| 261 |
|
---|
| 262 | YAHOO.util.Connect.asyncRequest("GET", removeFromIndexURL, indexCallback);
|
---|
| 263 | YAHOO.util.Connect.asyncRequest("GET", removeFromArchivesURL, archiveCallback);
|
---|
[24956] | 264 | YAHOO.util.Connect.asyncRequest("GET", removeFromImportURL, importCallback);
|
---|
[24769] | 265 | }
|
---|
| 266 | else {
|
---|
| 267 | alert("Failed to find valid note data to delete");
|
---|
| 268 | status = false;
|
---|
| 269 | }
|
---|
| 270 |
|
---|
| 271 | return status;
|
---|
| 272 | }
|
---|
| 273 |
|
---|
| 274 | function saveFunction(note)
|
---|
| 275 | {
|
---|
[24945] | 276 | var saveIndexCallback =
|
---|
[24769] | 277 | {
|
---|
[24945] | 278 | success: function(response){},
|
---|
| 279 | failed: function(reponse){ alert("Failed to save index metadata of note with id: " + note.id)},
|
---|
[24769] | 280 | };
|
---|
| 281 |
|
---|
[24945] | 282 | var saveArchivesCallback =
|
---|
| 283 | {
|
---|
| 284 | success: function(response){buildFunction(gs.cgiParams.c);},
|
---|
| 285 | failed: function(response){ alert("Failed in save import metadata of note with id: " + note.id) }
|
---|
| 286 | };
|
---|
| 287 |
|
---|
| 288 | var saveImportCallback =
|
---|
| 289 | {
|
---|
| 290 | success: function(response){},
|
---|
| 291 | failed: function(response){ alert("Failed in save import metadata of note with id: " + note.id) }
|
---|
| 292 | };
|
---|
| 293 |
|
---|
[24769] | 294 | var jsonVal = '{"caption":"' + note.text + '", "area":{"x":' + note.rect.left + ', "y":' + note.rect.top + ', "width":' + note.rect.width + ', "height":' + note.rect.height + '}}';
|
---|
| 295 | var metaposStr = (note && note.id && note.id > 0) ? note.id - 1 : _posCount;
|
---|
| 296 |
|
---|
[24946] | 297 | var saveIndexURL = "cgi-bin/metadata-server.pl?a=set-metadata&site=localsite&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=gsimg.photoNote&metavalue=" + jsonVal + "&metapos=" + metaposStr;
|
---|
| 298 | var saveArchivesURL = "cgi-bin/metadata-server.pl?a=set-archives-metadata&site=localsite&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=gsimg.photoNote&metavalue=" + jsonVal + "&metapos=" + metaposStr;
|
---|
| 299 | var saveImportURL = "cgi-bin/metadata-server.pl?a=set-import-metadata&site=localsite&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=gsimg.photoNote&metavalue=" + jsonVal + "&metapos=" + metaposStr;
|
---|
[24945] | 300 | YAHOO.util.Connect.asyncRequest("GET", saveIndexURL, saveIndexCallback);
|
---|
| 301 | YAHOO.util.Connect.asyncRequest("GET", saveArchivesURL, saveArchivesCallback);
|
---|
| 302 | YAHOO.util.Connect.asyncRequest("GET", saveImportURL, saveImportCallback);
|
---|
[24769] | 303 |
|
---|
| 304 | return 1;
|
---|
| 305 | }
|
---|
| 306 |
|
---|
| 307 | function getNotes()
|
---|
| 308 | {
|
---|
| 309 | if(gs.variables.photoNotes == null || gs.variables.photoNotes == undefined)
|
---|
| 310 | {
|
---|
| 311 | console.log("No photo notes");
|
---|
| 312 | return;
|
---|
| 313 | }
|
---|
| 314 |
|
---|
| 315 | for(var i = 0; i < gs.variables.photoNotes.length; i++)
|
---|
| 316 | {
|
---|
| 317 | var note = gs.variables.photoNotes[i];
|
---|
| 318 | if(!note)
|
---|
| 319 | {
|
---|
| 320 | continue;
|
---|
| 321 | }
|
---|
| 322 | var newNote = new PhotoNote(note.caption, i+1, new PhotoNoteRect(note.area.x,note.area.y,note.area.width,note.area.height));
|
---|
| 323 | newNote.onsave = saveFunction;
|
---|
| 324 | newNote.ondelete = deleteFunction;
|
---|
| 325 | _notes.AddNote(newNote);
|
---|
| 326 | _posCount++;
|
---|
| 327 | }
|
---|
| 328 |
|
---|
| 329 | addNoteOverAndOutHandlers();
|
---|
| 330 | }
|
---|
| 331 |
|
---|
| 332 | function AddNote()
|
---|
| 333 | {
|
---|
| 334 | var newNote = new PhotoNote('Add note text here...',_posCount+1,new PhotoNoteRect(10,10,50,50));
|
---|
| 335 | newNote.onsave = saveFunction;
|
---|
| 336 | newNote.ondelete = deleteFunction;
|
---|
| 337 | _notes.AddNote(newNote);
|
---|
| 338 | _posCount++;
|
---|
| 339 |
|
---|
| 340 | addNoteOverAndOutHandlers();
|
---|
| 341 | newNote.Select();
|
---|
| 342 | }
|
---|
| 343 |
|
---|
| 344 | function addNoteOverAndOutHandlers()
|
---|
| 345 | {
|
---|
| 346 | var divs = document.getElementsByTagName("DIV");
|
---|
| 347 | for(var i = 0; i < divs.length; i++)
|
---|
| 348 | {
|
---|
| 349 | if(divs[i].getAttribute("class") && divs[i].getAttribute("class").search("fn-area") != -1)
|
---|
| 350 | {
|
---|
| 351 | divs[i].onmouseover = function(){_zoomEnabled = false;}
|
---|
| 352 | divs[i].onmouseout = function(){_zoomEnabled = true;}
|
---|
| 353 | }
|
---|
| 354 | }
|
---|
| 355 | }
|
---|
| 356 |
|
---|
| 357 | window.onload = function(){initNotes(); readyImagesForZoom(); initAnnotator();};
|
---|
| 358 | </xsl:text>
|
---|
[24945] | 359 | </script>
|
---|
| 360 | <script text="text/javascript">
|
---|
[24948] | 361 | <xsl:text disable-output-escaping="yes">
|
---|
[24945] | 362 |
|
---|
| 363 | function checkLoop(pid, serverFunction, callback)
|
---|
| 364 | {
|
---|
| 365 | var startLoop = function()
|
---|
| 366 | {
|
---|
| 367 | var loopCallback =
|
---|
| 368 | {
|
---|
| 369 | success:function(response)
|
---|
| 370 | {
|
---|
| 371 | var checkText = response.responseText;
|
---|
| 372 | if(checkText == null || checkText == "")
|
---|
| 373 | {
|
---|
| 374 | console.log("There was an error getting the XML to check the status of " + serverFunction);
|
---|
| 375 | }
|
---|
| 376 | else
|
---|
| 377 | {
|
---|
| 378 | var checkCodeStart = checkText.indexOf("code=\"") + 6;
|
---|
| 379 | var checkCodeEnd = checkText.indexOf("\"", checkCodeStart);
|
---|
| 380 | var code = checkText.substring(checkCodeStart, checkCodeEnd);
|
---|
| 381 |
|
---|
| 382 | if(code == 11 || code == 1) //11 is COMPLETED, 1 is success
|
---|
| 383 | {
|
---|
| 384 | callback();
|
---|
| 385 | }
|
---|
| 386 | else if(code == 12 || code == 3) //12 is HALTED, 3 is ERROR
|
---|
| 387 | {
|
---|
| 388 | console.log("There was an error on the server, could not check status of " + serverFunction);
|
---|
| 389 | }
|
---|
| 390 | else
|
---|
| 391 | {
|
---|
| 392 | setTimeout(startLoop, 1000);
|
---|
| 393 | }
|
---|
| 394 | }
|
---|
| 395 | },
|
---|
| 396 | failed:function()
|
---|
| 397 | {
|
---|
| 398 | console.log("There was a problem checking the status of " + serverFunction)
|
---|
| 399 | }
|
---|
| 400 | }
|
---|
| 401 | YAHOO.util.Connect.asyncRequest("GET", gs.xsltParams.library_name + "?a=g&rt=s&ro=1&s=" + serverFunction + "&s1.pid=" + pid, loopCallback);
|
---|
| 402 | }
|
---|
| 403 | startLoop();
|
---|
| 404 | }
|
---|
| 405 |
|
---|
| 406 | function buildFunction(collection)
|
---|
| 407 | {
|
---|
| 408 | var buildCallback =
|
---|
| 409 | {
|
---|
| 410 | success:function(response)
|
---|
| 411 | {
|
---|
| 412 | var buildText = response.responseText;
|
---|
| 413 | if(buildText == null || buildText == "")
|
---|
| 414 | {
|
---|
| 415 | console.log("There was an error getting the xml response from the building request");
|
---|
| 416 | }
|
---|
| 417 | else
|
---|
| 418 | {
|
---|
| 419 | var buildPIDStart = buildText.indexOf("pid=\"") + 5;
|
---|
| 420 | var buildPIDEnd = buildText.indexOf("\"", buildPIDStart);
|
---|
| 421 | var buildPID = buildText.substring(buildPIDStart, buildPIDEnd);
|
---|
| 422 |
|
---|
| 423 | checkLoop(buildPID, "BuildCollection", function()
|
---|
| 424 | {
|
---|
| 425 | var activateCallback =
|
---|
| 426 | {
|
---|
| 427 | success: function(response)
|
---|
| 428 | {
|
---|
| 429 | var activateText = response.responseText;
|
---|
| 430 | if(activateText == null || activateText == "")
|
---|
| 431 | {
|
---|
| 432 | console.log("There was an error getting the xml response from the activating request");
|
---|
| 433 | }
|
---|
| 434 | else
|
---|
| 435 | {
|
---|
| 436 | var activatePIDStart = activateText.indexOf("pid=\"") + 5;
|
---|
| 437 | var activatePIDEnd = activateText.indexOf("\"", activatePIDStart);
|
---|
| 438 | var activatePID = activateText.substring(activatePIDStart, activatePIDEnd);
|
---|
| 439 |
|
---|
| 440 | checkLoop(activatePID, "ActivateCollection", function()
|
---|
| 441 | {
|
---|
| 442 | var updateCallback =
|
---|
| 443 | {
|
---|
| 444 | success: function(response){},
|
---|
| 445 | failed: function(reponse){ alert("Failed in saveFunction() to re-read config files");}
|
---|
| 446 | };
|
---|
| 447 | YAHOO.util.Connect.asyncRequest("GET", gs.xsltParams.library_name + "?a=s&sa=c", updateCallback);
|
---|
| 448 | });
|
---|
| 449 | }
|
---|
| 450 | },
|
---|
| 451 | failed: function(response)
|
---|
| 452 | {
|
---|
| 453 | console.log("Failed to get response from activate collection request");
|
---|
| 454 | }
|
---|
| 455 | }
|
---|
| 456 | YAHOO.util.Connect.asyncRequest("GET", gs.xsltParams.library_name + "?a=g&rt=r&ro=1&s=ActivateCollection&s1.collection=" + collection, activateCallback);
|
---|
| 457 | });
|
---|
| 458 | }
|
---|
| 459 | },
|
---|
| 460 | failed: function(){console.log("Failed to get build collection response")}
|
---|
| 461 | }
|
---|
[24798] | 462 |
|
---|
[24945] | 463 | YAHOO.util.Connect.asyncRequest("GET", gs.xsltParams.library_name + "?a=g&rt=r&ro=1&s=BuildCollection&s1.collection=" + collection, buildCallback);
|
---|
| 464 | }
|
---|
| 465 |
|
---|
| 466 | function saveAndBuildCollection(col)
|
---|
| 467 | {
|
---|
[24948] | 468 | for(var j = 0; j < gs.toDeleteArray.keys.length; j++)
|
---|
| 469 | {
|
---|
| 470 | var current = gs.toDeleteArray[gs.toDeleteArray.keys[j]];
|
---|
| 471 | if(current == null){continue;}
|
---|
| 472 | var metaToDelete = ["user", "text", "tags"];
|
---|
| 473 | for(var l = 0; l < metaToDelete.length; l++)
|
---|
| 474 | {
|
---|
| 475 | var deleteArchivesURL = "cgi-bin/metadata-server.pl?\
|
---|
| 476 | a=remove-archives-metadata&\
|
---|
| 477 | c=" + gs.cgiParams.c + "&\
|
---|
| 478 | site=localsite&\
|
---|
[24956] | 479 | d=" + gs.cgiParams.d + "&\
|
---|
[24948] | 480 | metaname=gstext." + metaToDelete[l] + "&\
|
---|
[24955] | 481 | metavalue=" + ((l == 0) ? (current.user.name) : (current[metaToDelete[l]]));
|
---|
[24948] | 482 |
|
---|
| 483 | var deleteIndexURL = "cgi-bin/metadata-server.pl?\
|
---|
| 484 | a=remove-metadata&\
|
---|
| 485 | c=" + gs.cgiParams.c + "&\
|
---|
| 486 | site=localsite&\
|
---|
[24956] | 487 | d=" + gs.cgiParams.d + "&\
|
---|
[24948] | 488 | metaname=gstext." + metaToDelete[l] + "&\
|
---|
[24955] | 489 | metavalue=" + ((l == 0) ? (current.user.name) : (current[metaToDelete[l]]));
|
---|
[24948] | 490 |
|
---|
| 491 | var deleteImportURL = "cgi-bin/metadata-server.pl?\
|
---|
| 492 | a=remove-import-metadata&\
|
---|
| 493 | c=" + gs.cgiParams.c + "&\
|
---|
| 494 | site=localsite&\
|
---|
[24956] | 495 | d=" + gs.cgiParams.d + "&\
|
---|
[24948] | 496 | metaname=gstext." + metaToDelete[l] + "&\
|
---|
[24955] | 497 | metavalue=" + ((l == 0) ? (current.user.name) : (current[metaToDelete[l]]));
|
---|
[24948] | 498 | var deleteArchivesCallback =
|
---|
| 499 | {
|
---|
| 500 | success:function(){},
|
---|
[24963] | 501 | failed: function(){alert("Failed to save text annotations archives metadata");}
|
---|
[24948] | 502 | }
|
---|
| 503 | YAHOO.util.Connect.asyncRequest("GET", deleteArchivesURL, deleteArchivesCallback);
|
---|
| 504 |
|
---|
| 505 | var deleteIndexCallback =
|
---|
| 506 | {
|
---|
| 507 | success:function(){},
|
---|
[24963] | 508 | failed: function(){alert("Failed to save text annotations index metadata");}
|
---|
[24948] | 509 | }
|
---|
| 510 | YAHOO.util.Connect.asyncRequest("GET", deleteIndexURL, deleteIndexCallback);
|
---|
| 511 |
|
---|
| 512 | var deleteImportCallback =
|
---|
| 513 | {
|
---|
| 514 | success:function(){},
|
---|
| 515 | failed: function(){alert("Failed to save text annotations import metadata");}
|
---|
| 516 | }
|
---|
| 517 | YAHOO.util.Connect.asyncRequest("GET", deleteImportURL, deleteImportCallback);
|
---|
| 518 | }
|
---|
| 519 | }
|
---|
[24955] | 520 | gs.toDeleteArray = new Array();
|
---|
[24956] | 521 | gs.toDeleteArray.keys = new Array();
|
---|
| 522 |
|
---|
| 523 | if(gs.annotationArray.keys.length > 0)
|
---|
[24945] | 524 | {
|
---|
[24956] | 525 | var json = "[";
|
---|
| 526 | for(var i = 0; i < gs.annotationArray.keys.length; i++)
|
---|
[24945] | 527 | {
|
---|
[24956] | 528 | var current = gs.annotationArray[gs.annotationArray.keys[i]];
|
---|
| 529 | if(current == null){continue;}
|
---|
| 530 | var metaToAdd = ["user", "text", "tags"];
|
---|
| 531 |
|
---|
| 532 | for(var j = 0; j < metaToAdd.length; j++)
|
---|
[24945] | 533 | {
|
---|
[24956] | 534 | if(metaToAdd[j] == "user")
|
---|
| 535 | {
|
---|
| 536 | json += '{"docid":"' + gs.cgiParams.d + '", "metaname":"gstext.' + metaToAdd[j] + '", "metavalue":"' + current.user.name + '"}';
|
---|
| 537 | }
|
---|
| 538 | else
|
---|
| 539 | {
|
---|
| 540 | json += '{"docid":"' + gs.cgiParams.d + '", "metaname":"gstext.' + metaToAdd[j] + '", "metavalue":"' + current[metaToAdd[j]] + '"}';
|
---|
| 541 | }
|
---|
[24948] | 542 |
|
---|
[24956] | 543 | if(j != (metaToAdd.length - 1) || i != (gs.annotationArray.keys.length - 1))
|
---|
| 544 | {
|
---|
| 545 | json += ',';
|
---|
| 546 | }
|
---|
[24945] | 547 | }
|
---|
| 548 | }
|
---|
[24956] | 549 | json += "]";
|
---|
[24948] | 550 |
|
---|
[24956] | 551 | var saveArchivesURL = "cgi-bin/metadata-server.pl?a=set-archives-metadata-array&c=" + gs.cgiParams.c + "&site=localsite&collect=" + gs.cgiParams.c + "&json=" + json;
|
---|
| 552 | var saveIndexURL = "cgi-bin/metadata-server.pl?a=set-metadata-array&c=" + gs.cgiParams.c + "&site=localsite&collect=" + gs.cgiParams.c + "&json=" + json;
|
---|
| 553 | var saveImportURL = "cgi-bin/metadata-server.pl?a=set-import-metadata-array&c=" + gs.cgiParams.c + "&site=localsite&collect=" + gs.cgiParams.c + "&json=" + json;
|
---|
[24948] | 554 |
|
---|
[24956] | 555 | var saveArchivesCallback =
|
---|
| 556 | {
|
---|
| 557 | success:function(){console.log("Away to build"); buildFunction(gs.cgiParams.c);},
|
---|
| 558 | failed: function(){alert("Failed to save text annotations index metadata");}
|
---|
| 559 | }
|
---|
| 560 | YAHOO.util.Connect.asyncRequest("GET", saveArchivesURL, saveArchivesCallback);
|
---|
[24948] | 561 |
|
---|
[24956] | 562 | var saveIndexCallback =
|
---|
| 563 | {
|
---|
| 564 | success:function(){},
|
---|
| 565 | failed: function(){alert("Failed to save text annotations import metadata");}
|
---|
| 566 | }
|
---|
| 567 | YAHOO.util.Connect.asyncRequest("GET", saveIndexURL, saveIndexCallback);
|
---|
[24948] | 568 |
|
---|
[24956] | 569 | var saveImportCallback =
|
---|
| 570 | {
|
---|
| 571 | success:function(){},
|
---|
| 572 | failed: function(){alert("Failed to save text annotations import metadata");}
|
---|
| 573 | }
|
---|
| 574 | YAHOO.util.Connect.asyncRequest("GET", saveImportURL, saveImportCallback);
|
---|
[24945] | 575 | }
|
---|
[24956] | 576 |
|
---|
| 577 | gs.annotationArray = new Array();
|
---|
| 578 | gs.annotationArray.keys = new Array();
|
---|
[24945] | 579 | }
|
---|
| 580 |
|
---|
[24948] | 581 | function initAnnotator()
|
---|
| 582 | {
|
---|
| 583 | gs.annotationArray = new Array();
|
---|
| 584 | gs.annotationArray.keys = new Array();
|
---|
| 585 |
|
---|
| 586 | gs.toDeleteArray = new Array();
|
---|
| 587 | gs.toDeleteArray.keys = new Array();
|
---|
| 588 |
|
---|
| 589 | var elem = document.getElementById("gs-document-text");
|
---|
| 590 | elem.innerHTML = '<button id="saveButton">Save annotations</button><br/>' + elem.innerHTML;
|
---|
| 591 |
|
---|
| 592 | var button = document.getElementById("saveButton");
|
---|
| 593 | button.onclick = function(){saveAndBuildCollection(gs.cgiParams.c);};
|
---|
| 594 |
|
---|
| 595 | jQuery(function ($) {
|
---|
| 596 | if (typeof $.fn.annotator !== 'function') {
|
---|
| 597 | alert("Ooops! it looks like you haven't built the Annotator concatenation file. " + "Either download a tagged release from GitHub, or modify the Cakefile to point " + "at your copy of the YUI compressor and run `cake package`.");
|
---|
| 598 | } else {
|
---|
| 599 | jQuery(function ($) {
|
---|
| 600 | // Include AnnotateIt credentials to load the store plugin.
|
---|
| 601 | $('#gs-document-text').annotator().annotator('setupPlugins', {
|
---|
| 602 | userId: 'papitha',
|
---|
| 603 | userName: 'Papitha',
|
---|
| 604 | accountId: '39fc339cf058bd22176771b3e33c5dac',
|
---|
| 605 | authToken: '852b7fc25396d2aedf9aeb44dd58518faa679dbf027892164bfb81900bd09741',
|
---|
| 606 | }, {
|
---|
| 607 | Store:
|
---|
| 608 | {
|
---|
| 609 | prefix: 'http://localhost:5000',
|
---|
| 610 | annotationData: {'uri':gs.cgiParams.c + "-" + gs.cgiParams.d},
|
---|
| 611 | loadFromSearch: {'uri':gs.cgiParams.c + "-" + gs.cgiParams.d}
|
---|
[24798] | 612 | }
|
---|
[24730] | 613 | });
|
---|
[24948] | 614 | });
|
---|
| 615 | }
|
---|
| 616 | });
|
---|
| 617 | }
|
---|
| 618 | </xsl:text>
|
---|
[24945] | 619 | </script>
|
---|
[24963] | 620 | </xsl:template>
|
---|
| 621 | <xsl:template name="documentImage">
|
---|
[24945] | 622 | <!-- Get the photo notes for this document node -->
|
---|
| 623 | <gsf:variable-struct name="photoNotes">
|
---|
[24963] | 624 | <gsf:metadata multiple="true" name="gsimg.photoNote" separator=", "/>
|
---|
[24945] | 625 | </gsf:variable-struct>
|
---|
| 626 | <!-- Get details about the image for zooming -->
|
---|
| 627 | <h3>
|
---|
[24963] | 628 | <gsf:choose-metadata>
|
---|
| 629 | <gsf:metadata name="dc.Title"/>
|
---|
| 630 | <gsf:metadata name="ex.Title"/>
|
---|
| 631 | </gsf:choose-metadata>
|
---|
[24945] | 632 | </h3>
|
---|
| 633 | <xsl:variable name="imageWidth">
|
---|
[24963] | 634 | <gsf:choose-metadata>
|
---|
| 635 | <gsf:metadata name="ImageWidth"/>
|
---|
| 636 | <gsf:default>-1</gsf:default>
|
---|
| 637 | </gsf:choose-metadata>
|
---|
[24945] | 638 | </xsl:variable>
|
---|
| 639 | <xsl:variable name="imageHeight">
|
---|
[24963] | 640 | <gsf:choose-metadata>
|
---|
| 641 | <gsf:metadata name="ImageHeight"/>
|
---|
| 642 | <gsf:default>-1</gsf:default>
|
---|
| 643 | </gsf:choose-metadata>
|
---|
[24945] | 644 | </xsl:variable>
|
---|
| 645 | <xsl:variable name="screenImageWidth">
|
---|
[24963] | 646 | <gsf:choose-metadata>
|
---|
| 647 | <gsf:metadata name="ScreenWidth"/>
|
---|
| 648 | <gsf:default>-1</gsf:default>
|
---|
| 649 | </gsf:choose-metadata>
|
---|
[24945] | 650 | </xsl:variable>
|
---|
| 651 | <xsl:variable name="screenImageHeight">
|
---|
[24963] | 652 | <gsf:choose-metadata>
|
---|
| 653 | <gsf:metadata name="ScreenHeight"/>
|
---|
| 654 | <gsf:default>-1</gsf:default>
|
---|
| 655 | </gsf:choose-metadata>
|
---|
[24945] | 656 | </xsl:variable>
|
---|
| 657 | <script type="text/javascript">
|
---|
[24963] | 658 | <xsl:text>largeImageHeight =</xsl:text>
|
---|
| 659 | <xsl:value-of select="$imageHeight"/>
|
---|
| 660 | <xsl:text>;</xsl:text>
|
---|
| 661 | <xsl:text>largeImageWidth =</xsl:text>
|
---|
| 662 | <xsl:value-of select="$imageWidth"/>
|
---|
| 663 | <xsl:text>;</xsl:text>
|
---|
| 664 | <xsl:text>smallImageHeight =</xsl:text>
|
---|
| 665 | <xsl:value-of select="$screenImageHeight"/>
|
---|
| 666 | <xsl:text>;</xsl:text>
|
---|
| 667 | <xsl:text>smallImageWidth =</xsl:text>
|
---|
| 668 | <xsl:value-of select="$screenImageWidth"/>
|
---|
| 669 | <xsl:text>;</xsl:text>
|
---|
[24945] | 670 | </script>
|
---|
| 671 | <div id="noZoom" style="display:block;">
|
---|
[24963] | 672 | <img style="width: {$screenImageWidth}; height: {$screenImageHeight};">
|
---|
| 673 | <xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="Screen"/></xsl:attribute>
|
---|
| 674 | </img>
|
---|
| 675 | <!--
|
---|
| 676 | <gsf:metadata name="screenicon"/>
|
---|
| 677 | -->
|
---|
[24945] | 678 | </div>
|
---|
| 679 | <!--<xsl:if test="$imageHeight != -1">-->
|
---|
| 680 | <div id="wrap" style="display:none; width: {$screenImageWidth}; height: {$screenImageHeight};">
|
---|
[24963] | 681 | <div id="small" style="width: {$screenImageWidth}; height: {$screenImageHeight};">
|
---|
| 682 | <!--
|
---|
| 683 | <gsf:metadata name="screenicon"/>
|
---|
| 684 | -->
|
---|
| 685 | <img style="width: {$screenImageWidth}; height: {$screenImageHeight};">
|
---|
| 686 | <xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="Screen"/></xsl:attribute>
|
---|
| 687 | </img>
|
---|
| 688 | </div>
|
---|
| 689 | <div id="mover">
|
---|
| 690 | <div id="overlay">
|
---|
| 691 | <xsl:text> </xsl:text>
|
---|
| 692 | </div>
|
---|
| 693 | <div id="large">
|
---|
| 694 | <img style="width: {$imageWidth}; height: {$imageHeight};">
|
---|
| 695 | <xsl:attribute name="src"><xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/<gsf:metadata name="srclinkFile"/></xsl:attribute>
|
---|
| 696 | </img>
|
---|
| 697 | </div>
|
---|
| 698 | </div>
|
---|
[24945] | 699 | </div>
|
---|
[24963] | 700 | <input onclick="AddNote();" style="margin-left:30px;" type="button" value="Tag Photo!"/>
|
---|
| 701 |
|
---|
| 702 | <form action="dev" enctype="multipart/form-data" method="post">
|
---|
| 703 | <input type="hidden" name="fl">
|
---|
| 704 | <xsl:attribute name="value">
|
---|
| 705 | <xsl:text>/sites/localsite/collect/</xsl:text>
|
---|
| 706 | <xsl:value-of select="/page/pageResponse/collection/@name"/>
|
---|
| 707 | <xsl:text>/index/assoc/</xsl:text>
|
---|
| 708 | <gsf:metadata name="assocfilepath"/>
|
---|
| 709 | <xsl:text>/</xsl:text>
|
---|
| 710 | <gsf:metadata name="SourceFile"/>
|
---|
[24968] | 711 | <xsl:text>:</xsl:text>
|
---|
| 712 | <xsl:text>/sites/localsite/collect/</xsl:text>
|
---|
| 713 | <xsl:value-of select="/page/pageResponse/collection/@name"/>
|
---|
| 714 | <xsl:text>/index/assoc/</xsl:text>
|
---|
| 715 | <gsf:metadata name="assocfilepath"/>
|
---|
| 716 | <xsl:text>/</xsl:text>
|
---|
| 717 | <gsf:metadata name="Screen"/>
|
---|
| 718 | <xsl:text>:</xsl:text>
|
---|
| 719 | <xsl:text>/sites/localsite/collect/</xsl:text>
|
---|
| 720 | <xsl:value-of select="/page/pageResponse/collection/@name"/>
|
---|
| 721 | <xsl:text>/index/assoc/</xsl:text>
|
---|
| 722 | <gsf:metadata name="assocfilepath"/>
|
---|
| 723 | <xsl:text>/</xsl:text>
|
---|
| 724 | <gsf:metadata name="Thumb"/>
|
---|
[24963] | 725 | </xsl:attribute>
|
---|
| 726 | </input>
|
---|
| 727 |
|
---|
| 728 | <div>
|
---|
| 729 | Upload replacement file:<br/>
|
---|
| 730 | <input type="file" name="datafile" size="40"/><br/>
|
---|
| 731 | <input type="submit" value="Send"/>
|
---|
| 732 | </div>
|
---|
| 733 | </form>
|
---|
| 734 |
|
---|
[24945] | 735 | <!--</xsl:if>-->
|
---|
| 736 | </xsl:template>
|
---|
| 737 | </format></display><replaceListRef id="gs2-standard"/><replaceListRef id="gs2-image"/><serviceRackList>
|
---|
| 738 | <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
|
---|
| 739 | <serviceRack name="OAIPMH">
|
---|
| 740 | <ListMetadataFormats>
|
---|
| 741 | <!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
|
---|
[24556] | 742 | The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
|
---|
| 743 | -->
|
---|
[24945] | 744 | <metadataFormat metadataPrefix="oai_dc">
|
---|
| 745 | <metadataPrefix>oai_dc</metadataPrefix>
|
---|
| 746 | <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
|
---|
| 747 | <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
|
---|
| 748 | <!--<metadataElements>dc.Title,dc.Creator,dc.Subject,dc.Description,dc.Publisher,dc.Contributor,dc.Date,dc.Type,dc.Format,dc.Identifier,dc.Source,dc.Language,dc.Relation,dc.Coverage,dc.Rights</metadataElements>
|
---|
[24556] | 749 | -->
|
---|
[24945] | 750 | <mappingList>
|
---|
| 751 | <!--
|
---|
[24556] | 752 | The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
|
---|
| 753 | The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
|
---|
| 754 | searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
|
---|
| 755 | number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
|
---|
| 756 | if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
|
---|
| 757 |
|
---|
| 758 | **Bear in mind: if this mapping list is not present, the standard dc. metadata names (15 in total) will be used to retrieve metadata in the database.
|
---|
| 759 |
|
---|
| 760 | **The only case when this mapping is not present is that: 1. this metadata format is oai_dc; 2. the metadata is also stored in the database by Dublin Core's names.
|
---|
| 761 | -->
|
---|
[24945] | 762 | <mapping>dc.Title,Title</mapping>
|
---|
| 763 | <!-- This mapping example means that the dc.Title is requested and the value of the metadata Title, which is used in this repository, is returned as response. -->
|
---|
| 764 | </mappingList>
|
---|
| 765 | </metadataFormat>
|
---|
| 766 | </ListMetadataFormats>
|
---|
| 767 | </serviceRack>
|
---|
| 768 | </serviceRackList></CollectionConfig>
|
---|