001/* 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 */ 006package org.fcrepo.integration.rdf; 007 008import org.junit.Ignore; 009import org.junit.Test; 010 011/** 012 * @author cabeer 013 */ 014@Ignore // TODO FIX THESE TESTS 015public class ModsRdfIT extends AbstractIntegrationRdfIT { 016 @Test 017 public void testRoundtripModsRDF() { 018 // converted RDF-XML to TTL from 019 // https://raw.githubusercontent.com/blunalucero/MODS-RDF/master/Sample_record_Academic_Commons_MODS_RDF.rdf 020 // and fixed document URI and relative URI reference to use null-relative and hash uris 021 final String s = "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n" + 022 "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n" + 023 "@prefix identifier: <http://id.loc.gov/vocabulary/identifier/> .\n" + 024 "@prefix relator: <http://id.loc.gov/vocabulary/relator/> .\n" + 025 "@prefix note: <http://id.loc.gov/vocabulary/note/> .\n" + 026 "@prefix xs: <http://www.w3.org/2001/XMLSchema> .\n" + 027 "@prefix abstract: <http://id.loc.gov/vocabulary/abstract/> .\n" + 028 "@prefix access: <http://id.loc.gov/vocabulary/access/> .\n" + 029 "@prefix fo: <http://www.w3.org/1999/XSL/Format> .\n" + 030 "@prefix class: <http://id.loc.gov/vocabulary/class/> .\n" + 031 "@prefix fn: <http://www.w3.org/2005/xpath-functions> .\n" + 032 "@prefix mods: <http://www.loc.gov/mods/v3> .\n" + 033 "@prefix ri: <http://id.loc.gov/ontologies/RecordInfo#> .\n" + 034 "@prefix modsrdf: <http://www.loc.gov/mods/rdf/v1#> .\n" + 035 "@prefix madsrdf: <http://www.loc.gov/mads/rdf/v1#> .\n" + 036 "@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n" + 037 "\n" + 038 "<>\n" + 039 " identifier:hdl \"http://hdl.handle.net/10022/AC:P:11905\" ;\n" + 040 " modsrdf:LanguageOfResource \"English\" ;\n" + 041 " modsrdf:abstract \"A mechanism had been recently proposed to show how an....\" ;\n" + 042 " modsrdf:administrativeMedatata [\n" + 043 " ri:languageOfCataloging \"eng\" ;\n" + 044 " ri:recordContentSource \"NNC\" ;\n" + 045 " ri:recordIdentifier \"5890\" ;\n" + 046 " ri:recordInfoRecordChangeDate \"2012-08-01 14:40:32 -0400\"^^<xsd:date> ;\n" + 047 " ri:recordInfoRecordCreationDate \"2011-12-06 10:27:50 -0500\"^^<xsd:date> ;\n" + 048 " a ri:AdministrativeMedatata\n" + 049 " ] ;\n" + 050 " modsrdf:genre [\n" + 051 " madsrdf:elementList ([\n" + 052 " madsrdf:elementValue \"Articles\" ;\n" + 053 " a madsrdf:GenreFormElement\n" + 054 " ]\n" + 055 " ) ;\n" + 056 " a madsrdf:GenreForm ;\n" + 057 " rdfs:label \"Articles\"\n" + 058 " ] ;\n" + 059 " modsrdf:locationOfResource [\n" + 060 " modsrdf:locationPhysicalLocation \"NNC\" ;\n" + 061 " a modsrdf:Location\n" + 062 " ] ;\n" + 063 " modsrdf:name <#d1e24>, <#d1e42>, <#d1e60>, <#d1e9> ;\n" + 064 " modsrdf:resourceDateIssued \"1992\"^^<xsd:date> ;\n" + 065 " modsrdf:roleRelationship [\n" + 066 " modsrdf:roleRelationshipName <#d1e24> ;\n" + 067 " modsrdf:roleRelationshipRole \"author\" ;\n" + 068 " a modsrdf:RoleRelationship\n" + 069 " ], [\n" + 070 " modsrdf:roleRelationshipName <#d1e42> ;\n" + 071 " modsrdf:roleRelationshipRole \"author\" ;\n" + 072 " a modsrdf:RoleRelationship\n" + 073 " ], [\n" + 074 " modsrdf:roleRelationshipName <#d1e60> ;\n" + 075 " modsrdf:roleRelationshipRole \"originator\" ;\n" + 076 " a modsrdf:RoleRelationship\n" + 077 " ], [\n" + 078 " modsrdf:roleRelationshipName <#d1e9> ;\n" + 079 " modsrdf:roleRelationshipRole \"author\" ;\n" + 080 " a modsrdf:RoleRelationship\n" + 081 " ] ;\n" + 082 " modsrdf:subjectComplex [\n" + 083 " madsrdf:componentList ([\n" + 084 " madsrdf:elementList ([\n" + 085 " madsrdf:elementValue \"Geophysics\" ;\n" + 086 " a madsrdf:TopicElement\n" + 087 " ]\n" + 088 " ) ;\n" + 089 " a madsrdf:Topic ;\n" + 090 " rdfs:label \"Geophysics\"\n" + 091 " ]\n" + 092 " ) ;\n" + 093 " a madsrdf:ComplexSubject ;\n" + 094 " rdfs:label \"Geophysics. \"\n" + 095 " ] ;\n" + 096 " modsrdf:titlePrincipal [\n" + 097 " madsrdf:elementList ([\n" + 098 " madsrdf:elementValue \"A detailed chronology of the Australasian impact event, " + 099 "the Brunhes-Matuyama geomagnetic polarity reversal, and global climate change\" ;\n" + 100 " a madsrdf:mainTitleElement\n" + 101 " ]\n" + 102 " ) ;\n" + 103 " a madsrdf:Title ;\n" + 104 " rdfs:label \"A detailed chronology of the Australasian impact event, the Brunhes-Matuyama " + 105 "geomagnetic polarity reversal, and global climate change\"\n" + 106 " ] ;\n" + 107 " a <http://id.loc.gov/vocabulary/resourceType#Text>, modsrdf:ModsResource .\n" + 108 "\n" + 109 "<#d1e24>\n" + 110 " madsrdf:elementList ([\n" + 111 " madsrdf:elementValue \"Kent\" ;\n" + 112 " a madsrdf:FamilyNameElement\n" + 113 " ]\n" + 114 " [\n" + 115 " madsrdf:elementValue \"Dennis V.\" ;\n" + 116 " a madsrdf:GivenNameElement\n" + 117 " ]\n" + 118 " ) ;\n" + 119 " a madsrdf:PersonalName ;\n" + 120 " rdfs:label \" Dennis V. Kent \" .\n" + 121 "\n" + 122 "<#d1e42>\n" + 123 " madsrdf:elementList ([\n" + 124 " madsrdf:elementValue \"Mello\" ;\n" + 125 " a madsrdf:FamilyNameElement\n" + 126 " ]\n" + 127 " [\n" + 128 " madsrdf:elementValue \"Gilberto A.\" ;\n" + 129 " a madsrdf:GivenNameElement\n" + 130 " ]\n" + 131 " ) ;\n" + 132 " a madsrdf:PersonalName ;\n" + 133 " rdfs:label \" Gilberto A. Mello \" .\n" + 134 "\n" + 135 "<#d1e60>\n" + 136 " madsrdf:elementList ([\n" + 137 " madsrdf:elementValue \"Columbia University. Lamont-Doherty Earth Observatory\" ;\n" + 138 " a madsrdf:FullNameElement\n" + 139 " ]\n" + 140 " ) ;\n" + 141 " a madsrdf:CorporateName ;\n" + 142 " rdfs:label \"Columbia University. Lamont-Doherty Earth Observatory\" .\n" + 143 "\n" + 144 "<#d1e9>\n" + 145 " madsrdf:elementList ([\n" + 146 " madsrdf:elementValue \"Schneider\" ;\n" + 147 " a madsrdf:FamilyNameElement\n" + 148 " ]\n" + 149 " [\n" + 150 " madsrdf:elementValue \"David A.\" ;\n" + 151 " a madsrdf:GivenNameElement\n" + 152 " ]\n" + 153 " ) ;\n" + 154 " a madsrdf:PersonalName ;\n" + 155 " rdfs:label \" David A. Schneider \" ."; 156 157 createLDPRSAndCheckResponse(getRandomUniqueId(), s); 158 } 159}