@Test public void testExpandWithBindings() { List<Binding<Resource>> bindings = new ArrayList<Binding<Resource>>(); bindings.add( new Binding<Resource>( "foo1", ResourceFactory.createResource( "http: bindings.add( new Binding<Resource>( "foo2", ResourceFactory.createResource( "http: final ShortNameRenderer snr = new ShortNameRenderer( null, bindings ); assertEquals( "http: assertEquals( "http: assertEquals( "foo3", snr.expand( "foo3" ) ); }
public String expand( String shortName ) { String uri = lookupShortName( shortName ); return (uri == null) ? shortName : uri; }
ShortNameRenderer { public String expand( String shortName ) { String uri = lookupShortName( shortName ); return (uri == null) ? shortName : uri; } }
ShortNameRenderer { public String expand( String shortName ) { String uri = lookupShortName( shortName ); return (uri == null) ? shortName : uri; } ShortNameRenderer( ShortnameService sns, Iterable<Binding<Resource>> bindings ); }
ShortNameRenderer { public String expand( String shortName ) { String uri = lookupShortName( shortName ); return (uri == null) ? shortName : uri; } ShortNameRenderer( ShortnameService sns, Iterable<Binding<Resource>> bindings ); ShortnameService shortNameService(); ShortnameService shortNameService( boolean required ); boolean isDatatype( String type ); Resource asResource( RDFNode r ); Resource asResource( String s ); String expand( String shortName ); String shorten( String uri, boolean memoise ); String shorten( String uri ); boolean hasShortNameService(); boolean isKnownShortnamePath( String path ); }
ShortNameRenderer { public String expand( String shortName ) { String uri = lookupShortName( shortName ); return (uri == null) ? shortName : uri; } ShortNameRenderer( ShortnameService sns, Iterable<Binding<Resource>> bindings ); ShortnameService shortNameService(); ShortnameService shortNameService( boolean required ); boolean isDatatype( String type ); Resource asResource( RDFNode r ); Resource asResource( String s ); String expand( String shortName ); String shorten( String uri, boolean memoise ); String shorten( String uri ); boolean hasShortNameService(); boolean isKnownShortnamePath( String path );  }