@Override public Map<String, String> getNsPrefixMap() { return CollectionFactory.createHashedMap( prefixToURI ); }
@Override public Map<String, String> getNsPrefixMap() { return CollectionFactory.createHashedMap( prefixToURI ); }
@Override public Map<String, String> getNsPrefixMap() { Map<String, String> result = CollectionFactory.createHashedMap(); List<Graph> graphs = poly.getSubGraphs(); for (int i = graphs.size(); i > 0;) result.putAll( graphs.get( --i ).getPrefixMapping().getNsPrefixMap() ); result.remove( "" ); result.putAll( getBaseMapping().getNsPrefixMap() ); return result; }
@Override public Map<String, String> getNsPrefixMap() { Map<String, String> result = CollectionFactory.createHashedMap(); List<Graph> graphs = poly.getSubGraphs(); for (int i = graphs.size(); i > 0;) result.putAll( graphs.get( --i ).getPrefixMapping().getNsPrefixMap() ); result.remove( "" ); result.putAll( getBaseMapping().getNsPrefixMap() ); return result; }
public void testHashMapCopy() { Map<String, String> map = new HashMap<>(); map.put( "here", "Bristol" ); map.put( "there", "Oxford" ); Map<String, String> copy = CollectionFactory.createHashedMap( map ); assertEquals( map, copy ); }
public void testHashMapCopy() { Map<String, String> map = new HashMap<>(); map.put( "here", "Bristol" ); map.put( "there", "Oxford" ); Map<String, String> copy = CollectionFactory.createHashedMap( map ); assertEquals( map, copy ); }
public void testHashMapSized() { assertInstanceOf( Map.class, CollectionFactory.createHashedMap( 42 ) ); }
public void testHashMapSized() { assertInstanceOf( Map.class, CollectionFactory.createHashedMap( 42 ) ); }
public void testHashMapExists() { assertInstanceOf( Map.class, CollectionFactory.createHashedMap() ); }
public void testHashMapExists() { assertInstanceOf( Map.class, CollectionFactory.createHashedMap() ); }
/** * Assert that the supplied graph <code>got</code> is isomorphic with the * the desired graph <code>expected</code>; if not, display a readable * description of both graphs. */ public static void assertIsomorphic(String title, Graph expected, Graph got) { if (!expected.isIsomorphicWith(got)) { Map<Node, Object> map = CollectionFactory.createHashedMap(); fail(title + ": wanted " + nice(expected, map) + "\nbut got " + nice(got, map)); } }
/** * Assert that the supplied graph <code>got</code> is isomorphic with the * the desired graph <code>expected</code>; if not, display a readable * description of both graphs. */ public static void assertIsomorphic(String title, Graph expected, Graph got) { if (!expected.isIsomorphicWith(got)) { Map<Node, Object> map = CollectionFactory.createHashedMap(); fail(title + ": wanted " + nice(expected, map) + "\nbut got " + nice(got, map)); } }
/** Assert that the supplied graph <code>got</code> is isomorphic with the the desired graph <code>expected</code>; if not, display a readable description of both graphs. */ public static void assertIsomorphic( String title, Graph expected, Graph got ) { if (!expected.isIsomorphicWith( got )) { Map<Node, Object> map = CollectionFactory.createHashedMap(); fail( title + ": wanted " + nice( expected, map ) + "\nbut got " + nice( got, map ) ); } }
/** Assert that the supplied graph <code>got</code> is isomorphic with the the desired graph <code>expected</code>; if not, display a readable description of both graphs. */ public static void assertIsomorphic( String title, Graph expected, Graph got ) { if (!expected.isIsomorphicWith( got )) { Map<Node, Object> map = CollectionFactory.createHashedMap(); fail( title + ": wanted " + nice( expected, map ) + "\nbut got " + nice( got, map ) ); } }
/** test that two models are isomorphic and fail if they are not. @param title a String appearing at the beginning of the failure message @param wanted the model value that is expected @param got the model value to check @exception junit.framework.AssertionFailedError the models are not isomorphic */ public static void assertIsoModels( String title, Model wanted, Model got ) { if (wanted.isIsomorphicWith( got ) == false) { Map<Node, Object> map = CollectionFactory.createHashedMap(); fail( title + ": expected " + nice( wanted.getGraph(), map ) + "\n but had " + nice( got.getGraph(), map ) ); } }
/** test that two models are isomorphic and fail if they are not. @param title a String appearing at the beginning of the failure message @param wanted the model value that is expected @param got the model value to check @exception junit.framework.AssertionFailedError the models are not isomorphic */ public static void assertIsoModels( String title, Model wanted, Model got ) { if (wanted.isIsomorphicWith( got ) == false) { Map<Node, Object> map = CollectionFactory.createHashedMap(); fail( title + ": expected " + nice( wanted.getGraph(), map ) + "\n but had " + nice( got.getGraph(), map ) ); } }
/** * test that two models are isomorphic and fail if they are not. * * @param title * a String appearing at the beginning of the failure message * @param wanted * the model value that is expected * @param got * the model value to check */ public static void assertIsoModels(String title, Model wanted, Model got) { if (wanted.isIsomorphicWith(got) == false) { Map<Node, Object> map = CollectionFactory.createHashedMap(); fail(title + ": expected " + nice(wanted.getGraph(), map) + "\n but had " + nice(got.getGraph(), map)); } }
/** * test that two models are isomorphic and fail if they are not. * * @param title * a String appearing at the beginning of the failure message * @param wanted * the model value that is expected * @param got * the model value to check */ public static void assertIsoModels(String title, Model wanted, Model got) { if (wanted.isIsomorphicWith(got) == false) { Map<Node, Object> map = CollectionFactory.createHashedMap(); fail(title + ": expected " + nice(wanted.getGraph(), map) + "\n but had " + nice(got.getGraph(), map)); } }
/** * test that two models are isomorphic and fail if they are not. * * @param title * a String appearing at the beginning of the failure message * @param wanted * the model value that is expected * @param got * the model value to check * @exception junit.framework.AssertionFailedError if the models are not isomorphic */ public static void assertIsoModels( final String title, final Model wanted, final Model got ) { if (wanted.isIsomorphicWith(got) == false) { final Map<Node, Object> map = CollectionFactory.createHashedMap(); Assert.fail(title + ": expected " + GraphTestBase.nice(wanted.getGraph(), map) + "\n but had " + GraphTestBase.nice(got.getGraph(), map)); } }
/** * test that two models are isomorphic and fail if they are not. * * @param title * a String appearing at the beginning of the failure message * @param wanted * the model value that is expected * @param got * the model value to check * @exception junit.framework.AssertionFailedError if the models are not isomorphic */ public static void assertIsoModels( final String title, final Model wanted, final Model got ) { if (wanted.isIsomorphicWith(got) == false) { final Map<Node, Object> map = CollectionFactory.createHashedMap(); Assert.fail(title + ": expected " + GraphTestBase.nice(wanted.getGraph(), map) + "\n but had " + GraphTestBase.nice(got.getGraph(), map)); } }