/** * Adds a binding to the binding set. * * @param binding * The binding to add to the binding set. */ public void addBinding(Binding binding) { bindings.put(binding.getName(), binding); }
/** * Adds a binding to the binding set. * * @param binding * The binding to add to the binding set. */ public void addBinding(Binding binding) { bindings.put(binding.getName(), binding); }
/** * Adds a binding to the binding set. * * @param binding * The binding to add to the binding set. */ public void addBinding(Binding binding) { bindings.put(binding.getName(), binding); }
@Override public boolean equals(Object o) { if (o instanceof Binding) { Binding other = (Binding)o; return name.equals(other.getName()) && value.equals(other.getValue()); } return false; }
@Override public final int hashCode() { int hashCode = 0; for (Binding binding : this) { hashCode ^= binding.getName().hashCode() ^ binding.getValue().hashCode(); } return hashCode; }
@Override public boolean equals(Object o) { if (o instanceof Binding) { Binding other = (Binding)o; return name.equals(other.getName()) && value.equals(other.getValue()); } return false; }
@Override public final int hashCode() { int hashCode = 0; for (Binding binding : this) { hashCode ^= binding.getName().hashCode() ^ binding.getValue().hashCode(); } return hashCode; }
@Override public final int hashCode() { int hashCode = 0; for (Binding binding : this) { hashCode ^= binding.getName().hashCode() ^ binding.getValue().hashCode(); } return hashCode; }
@Override public boolean equals(Object o) { if (o instanceof Binding) { Binding other = (Binding)o; return name.equals(other.getName()) && value.equals(other.getValue()); } return false; }
/** * Adds a new binding to the binding set. The binding's name must not already be part of this binding set. * * @param binding * The binding to add this this BindingSet. */ public void addBinding(Binding binding) { addBinding(binding.getName(), binding.getValue()); }
/** * Adds a new binding to the binding set. The binding's name must not already be part of this binding set. * * @param binding * The binding to add this this BindingSet. */ public void addBinding(Binding binding) { addBinding(binding.getName(), binding.getValue()); }
/** * Adds a new binding to the binding set. The binding's name must not already be part of this binding set. * * @param binding * The binding to add this this BindingSet. */ public void addBinding(Binding binding) { addBinding(binding.getName(), binding.getValue()); }
/** * Adds a new binding to the binding set. The binding's name must not already be part of this binding set. * * @param binding * The binding to add this this BindingSet. */ public void addBinding(Binding binding) { addBinding(binding.getName(), binding.getValue()); }
/** * Adds a new binding to the binding set. The binding's name must not already be part of this binding set. * * @param binding * The binding to add this this BindingSet. */ public void addBinding(Binding binding) { addBinding(binding.getName(), binding.getValue()); }
public void setBinding(Binding binding) { setBinding(binding.getName(), binding.getValue()); }
public void setBinding(Binding binding) { setBinding(binding.getName(), binding.getValue()); }
public void setBinding(Binding binding) { setBinding(binding.getName(), binding.getValue()); }
private static void addBindings(Resource subj, Resource opResource, ParsedOperation parsedOp, Operation op, TripleSource tripleSource, SpinParser parser) throws OpenRDFException { if (!parser.isThisUnbound(opResource, tripleSource)) { op.setBinding(THIS_VAR, subj); } if (parsedOp instanceof ParsedTemplate) { for (Binding b : ((ParsedTemplate)parsedOp).getBindings()) { op.setBinding(b.getName(), b.getValue()); } } }
private static void addBindings(Resource subj, Resource opResource, ParsedOperation parsedOp, Operation op, TripleSource tripleSource, SpinParser parser) throws OpenRDFException { if (!parser.isThisUnbound(opResource, tripleSource)) { op.setBinding(THIS_VAR, subj); } if (parsedOp instanceof ParsedTemplate) { for (Binding b : ((ParsedTemplate)parsedOp).getBindings()) { op.setBinding(b.getName(), b.getValue()); } } }
@Override public void write(final Kryo kryo, final Output output, final VisibilityBindingSet visBindingSet) { output.writeString(visBindingSet.getVisibility()); // write the number count for the reader. output.writeInt(visBindingSet.size()); for (final Binding binding : visBindingSet) { output.writeString(binding.getName()); final RyaType ryaValue = RdfToRyaConversions.convertValue(binding.getValue()); final String valueString = ryaValue.getData(); final IRI type = ryaValue.getDataType(); output.writeString(valueString); output.writeString(type.toString()); } }