本文整理了Java中org.eclipse.rdf4j.query.Binding.getValue()
方法的一些代码示例,展示了Binding.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.getValue()
方法的具体详情如下:
包路径:org.eclipse.rdf4j.query.Binding
类名称:Binding
方法名:getValue
[英]Gets the value of the binding. The returned value is never equal to null, such a "binding" is considered to be unbound.
[中]获取绑定的值。返回的值永远不等于null,这样的“绑定”被认为是未绑定的。
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
@Override
public final int hashCode() {
int hashCode = 0;
for (Binding binding : this) {
hashCode ^= binding.getName().hashCode() ^ binding.getValue().hashCode();
}
return hashCode;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-query
@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;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-query
@Override
public final int hashCode() {
int hashCode = 0;
for (Binding binding : this) {
hashCode ^= binding.getName().hashCode() ^ binding.getValue().hashCode();
}
return hashCode;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-query
public Value getValue(String bindingName) {
Binding binding = getBinding(bindingName);
if (binding != null) {
return binding.getValue();
}
return null;
}
代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog
/*******************************************************************************************************************
*
******************************************************************************************************************/
@Nonnull
protected static Optional<Long> toLong (final @Nullable Binding binding)
{
return Optional.ofNullable(binding).map(b -> b.getValue()).map(v -> Long.parseLong(v.stringValue()));
}
代码示例来源:origin: eclipse/rdf4j
@Override
public final int hashCode() {
int hashCode = 0;
for (Binding binding : this) {
hashCode ^= binding.getName().hashCode() ^ binding.getValue().hashCode();
}
return hashCode;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
@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;
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
public Value getValue(String bindingName) {
Binding binding = getBinding(bindingName);
if (binding != null) {
return binding.getValue();
}
return null;
}
代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog
/*******************************************************************************************************************
*
******************************************************************************************************************/
@Nonnull
protected static Optional<String> toString (final @Nullable Binding binding)
{
return Optional.ofNullable(binding).map(b -> b.getValue()).map(v -> v.stringValue());
}
代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog
/*******************************************************************************************************************
*
******************************************************************************************************************/
@Nonnull
protected static Optional<Integer> toInteger (final @Nullable Binding binding)
{
return Optional.ofNullable(binding).map(b -> b.getValue()).map(v -> Integer.parseInt(v.stringValue()));
}
代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog
/*******************************************************************************************************************
*
******************************************************************************************************************/
@Nonnull
protected static Optional<Id> toId (final @Nullable Binding binding)
{
return Optional.ofNullable(binding).map(b -> b.getValue()).map(v -> v.stringValue()).map(s -> new Id(s));
}
代码示例来源:origin: apache/incubator-rya
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append(" names: ");
for (final String name : getBindingNames()) {
sb.append("\n [name]: " + name + " --- [value]: " + getBinding(name).getValue().toString());
}
return sb.toString();
}
}
代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog
@Override @Nonnull
public String apply (final @Nonnull Repository repository, final @Nonnull BindingSet bindingSet)
{
return bindingSet.iterator().next().getValue().stringValue();
}
}
代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog
public RepositoryMusicPerformer (final @Nonnull Repository repository, final @Nonnull BindingSet bindingSet)
{
this.musicArtist = new RepositoryMusicArtist(repository, bindingSet);
final Optional<String> r = Optional.of(bindingSet.getBinding("role").getValue().stringValue()
.replaceAll(BMMO.NS + "performer_", ""));
this.role = r.map(RepositoryMusicPerformerRole::new);
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
/**
* 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());
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-queryalgebra-evaluation
/**
* 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());
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-repository-sparql
/**
* 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());
}
代码示例来源:origin: eclipse/rdf4j
/**
* 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());
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.rdf4j/rdf4j-queryalgebra-evaluation
/**
* 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());
}
代码示例来源:origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-catalog
public RepositoryAudioFile (final @Nonnull Repository repository, final @Nonnull BindingSet bindingSet)
{
super(repository, bindingSet, "audioFile", rdfsLabelOf(bindingSet.getBinding("path").getValue().stringValue()));
this.path = toPath(bindingSet.getBinding("path"));
this.duration = toDuration(bindingSet.getBinding("duration"));
this.fileSize = toLong(bindingSet.getBinding("fileSize"));
this.trackId = toId(bindingSet.getBinding("track"));
this.metadata = new MetadataSupport(path).with(TITLE, rdfsLabel)
.with(DURATION, duration)
.with(FILE_SIZE, fileSize)
.withFallback(key -> fallbackMetadata.get(this::loadFallbackMetadata));
}
内容来源于网络,如有侵权,请联系作者删除!