@Test public void fromString_noVisi() throws BindingSetConversionException { final String bindingSetString = "http: "http: "http: final VariableOrder varOrder = new VariableOrder("y", "z", "x"); final VisibilityBindingSetStringConverter converter = new VisibilityBindingSetStringConverter(); final BindingSet bindingSet = converter.convert(bindingSetString, varOrder); final MapBindingSet expected = new MapBindingSet(); expected.addBinding("z", VF.createIRI("http: expected.addBinding("y", VF.createIRI("http: expected.addBinding("x", VF.createIRI("http: final VisibilityBindingSet visiSet = new VisibilityBindingSet(expected); assertEquals(visiSet, bindingSet); }
@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; }