001/* 002 * Licensed to DuraSpace under one or more contributor license agreements. 003 * See the NOTICE file distributed with this work for additional information 004 * regarding copyright ownership. 005 * 006 * DuraSpace licenses this file to you under the Apache License, 007 * Version 2.0 (the "License"); you may not use this file except in 008 * compliance with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.fcrepo.integration.rdf; 019 020import org.junit.Test; 021 022/** 023 * @author cabeer 024 */ 025public class GeonameIT extends AbstractIntegrationRdfIT { 026 @Test 027 public void testRoundtripGeonamesRdf() { 028 final String s = "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n" + 029 "@prefix cc: <http://creativecommons.org/ns#> .\n" + 030 "@prefix dcterms: <http://purl.org/dc/terms/> .\n" + 031 "@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n" + 032 "@prefix gn: <http://www.geonames.org/ontology#> .\n" + 033 "@prefix owl: <http://www.w3.org/2002/07/owl#> .\n" + 034 "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n" + 035 "@prefix wgs84_pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> .\n" + 036 "\n" + 037 "<>\n" + 038 " gn:alternateName \"Aebura\"@la, \"Ambrun\"@oc, \"Eburodunum\"@la ;\n" + 039 " gn:countryCode \"FR\" ;\n" + 040 " gn:featureClass gn:P ;\n" + 041 " gn:featureCode <http://www.geonames.org/ontology#P.PPL> ;\n" + 042 " gn:locationMap <http://www.geonames.org/3020251/embrun.html> ;\n" + 043 " gn:name \"Embrun\" ;\n" + 044 " gn:nearbyFeatures <http://sws.geonames.org/3020251/nearby.rdf> ;\n" + 045 " gn:parentADM1 <http://sws.geonames.org/2985244/> ;\n" + 046 " gn:parentADM2 <http://sws.geonames.org/3013738/> ;\n" + 047 " gn:parentADM3 <http://sws.geonames.org/3016701/> ;\n" + 048 " gn:parentADM4 <http://sws.geonames.org/6446638/> ;\n" + 049 " gn:parentCountry <http://sws.geonames.org/3017382/> ;\n" + 050 " gn:parentFeature <http://sws.geonames.org/6446638/> ;\n" + 051 " gn:population \"7069\" ;\n" + 052 " gn:postalCode \"05200\", \"05201 CEDEX\", \"05202 CEDEX\", \"05208 CEDEX\", \"05209 CEDEX\" ;\n" + 053 " gn:wikipediaArticle <http://fr.wikipedia.org/wiki/Embrun_%28Hautes-Alpes%29> ;\n" + 054 " a gn:Feature ;\n" + 055 " rdfs:isDefinedBy <#about.rdf> ;\n" + 056 " wgs84_pos:lat \"44.56387\" ;\n" + 057 " wgs84_pos:long \"6.49526\" .\n" + 058 "\n" + 059 "<#about.rdf>\n" + 060 " cc:attributionName \"GeoNames\"^^<http://www.w3.org/2001/XMLSchema#string> ;\n" + 061 " cc:attributionURL <http://sws.geonames.org/3020251/> ;\n" + 062 " cc:license <http://creativecommons.org/licenses/by/3.0/> ;\n" + 063 " dcterms:created \"2006-01-15\"^^<http://www.w3.org/2001/XMLSchema#date> ;\n" + 064 " dcterms:modified \"2012-03-30\"^^<http://www.w3.org/2001/XMLSchema#date> ;\n" + 065 " a foaf:Document ;\n" + 066 " foaf:primaryTopic <http://sws.geonames.org/3020251/> ."; 067 createLDPRSAndCheckResponse(getRandomUniqueId(), s); 068 069 } 070}