@Test public void toString_URIs_noVisi() throws BindingSetConversionException { final MapBindingSet originalBindingSet = new MapBindingSet(); originalBindingSet.addBinding("x", VF.createIRI("http: originalBindingSet.addBinding("y", VF.createIRI("http: originalBindingSet.addBinding("z", VF.createIRI("http: final VisibilityBindingSet visiSet = new VisibilityBindingSet(originalBindingSet); final VariableOrder varOrder = new VariableOrder("y", "z", "x"); final VisibilityBindingSetStringConverter converter = new VisibilityBindingSetStringConverter(); final String bindingSetString = converter.convert(visiSet, varOrder); final String expected = "http: "http: "http: assertEquals(expected, bindingSetString); }
@Override public String convert(final BindingSet bindingSet, final VariableOrder varOrder) { String bindingSetString = super.convert(bindingSet, varOrder); if(bindingSet instanceof VisibilityBindingSet) { final String visibility = ((VisibilityBindingSet) bindingSet).getVisibility(); if(!visibility.isEmpty()) { bindingSetString += VISIBILITY_DELIM + visibility; } } return bindingSetString; }
VisibilityBindingSetStringConverter extends BindingSetStringConverter { @Override public String convert(final BindingSet bindingSet, final VariableOrder varOrder) { String bindingSetString = super.convert(bindingSet, varOrder); if(bindingSet instanceof VisibilityBindingSet) { final String visibility = ((VisibilityBindingSet) bindingSet).getVisibility(); if(!visibility.isEmpty()) { bindingSetString += VISIBILITY_DELIM + visibility; } } return bindingSetString; } }
VisibilityBindingSetStringConverter extends BindingSetStringConverter { @Override public String convert(final BindingSet bindingSet, final VariableOrder varOrder) { String bindingSetString = super.convert(bindingSet, varOrder); if(bindingSet instanceof VisibilityBindingSet) { final String visibility = ((VisibilityBindingSet) bindingSet).getVisibility(); if(!visibility.isEmpty()) { bindingSetString += VISIBILITY_DELIM + visibility; } } return bindingSetString; }  }
VisibilityBindingSetStringConverter extends BindingSetStringConverter { @Override public String convert(final BindingSet bindingSet, final VariableOrder varOrder) { String bindingSetString = super.convert(bindingSet, varOrder); if(bindingSet instanceof VisibilityBindingSet) { final String visibility = ((VisibilityBindingSet) bindingSet).getVisibility(); if(!visibility.isEmpty()) { bindingSetString += VISIBILITY_DELIM + visibility; } } return bindingSetString; }  @Override String convert(final BindingSet bindingSet, final VariableOrder varOrder); @Override VisibilityBindingSet convert(final String bindingSetString, final VariableOrder varOrder); }
VisibilityBindingSetStringConverter extends BindingSetStringConverter { @Override public String convert(final BindingSet bindingSet, final VariableOrder varOrder) { String bindingSetString = super.convert(bindingSet, varOrder); if(bindingSet instanceof VisibilityBindingSet) { final String visibility = ((VisibilityBindingSet) bindingSet).getVisibility(); if(!visibility.isEmpty()) { bindingSetString += VISIBILITY_DELIM + visibility; } } return bindingSetString; }  @Override String convert(final BindingSet bindingSet, final VariableOrder varOrder); @Override VisibilityBindingSet convert(final String bindingSetString, final VariableOrder varOrder); static final char VISIBILITY_DELIM; }