String altPrefix = mapping.getRequiredProperty(LocationMappingVocab.altPrefix) .getString() ; addAltPrefix(prefix, altPrefix) ; log.debug("Prefix mapping: "+prefix+" => "+altPrefix) ; } catch (JenaException ex)
String altPrefix = mapping.getRequiredProperty(LocationMappingVocab.altPrefix) .getString() ; addAltPrefix(prefix, altPrefix) ; log.debug("Prefix mapping: "+prefix+" => "+altPrefix) ; } catch (JenaException ex)
public void testLocationMapperClone2() { LocationMapper locMap1 = new LocationMapper(mapping) ; // See testLocationMapperURLtoFile // String alt = locMap.altMapping("http://example.org/file") ; // assertNotNull(alt) ; // assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; LocationMapper locMap2 = new LocationMapper(locMap1) ; // Change this one locMap2.addAltPrefix("http://example.org/OTHER", "file:OTHER") ; { String alt = locMap2.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; assertEquals(alt, "file:OTHER/f") ; } // Not the other { String alt = locMap1.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; // Did not change assertEquals(alt, "http://example.org/OTHER/f") ; } }
public void testLocationMapperClone2() { LocationMapper locMap1 = new LocationMapper(mapping) ; // See testLocationMapperURLtoFile // String alt = locMap.altMapping("http://example.org/file") ; // assertNotNull(alt) ; // assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; LocationMapper locMap2 = new LocationMapper(locMap1) ; // Change this one locMap2.addAltPrefix("http://example.org/OTHER", "file:OTHER") ; { String alt = locMap2.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; assertEquals(alt, "file:OTHER/f") ; } // Not the other { String alt = locMap1.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; // Did not change assertEquals(alt, "http://example.org/OTHER/f") ; } }
@Test public void testLocationMapperClone2() { LocationMapper locMap1 = new LocationMapper(mapping) ; // See testLocationMapperURLtoFile // String alt = locMap.altMapping("http://example.org/file") ; // assertNotNull(alt) ; // assertEquals(alt, "file:"+testingDir+"/location-mapping-test-file") ; LocationMapper locMap2 = new LocationMapper(locMap1) ; // Change this one locMap2.addAltPrefix("http://example.org/OTHER", "file:OTHER") ; { String alt = locMap2.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; assertEquals("file:OTHER/f", alt) ; } // Not the other { String alt = locMap1.altMapping("http://example.org/OTHER/f") ; assertNotNull(alt) ; // Did not change assertEquals("http://example.org/OTHER/f", alt) ; } }