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