org.eclipse.rdf4j.model.util.Literals.getLabel()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(200)

本文整理了Java中org.eclipse.rdf4j.model.util.Literals.getLabel()方法的一些代码示例,展示了Literals.getLabel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Literals.getLabel()方法的具体详情如下:
包路径:org.eclipse.rdf4j.model.util.Literals
类名称:Literals
方法名:getLabel

Literals.getLabel介绍

[英]Gets the label of the supplied literal. The fallback value is returned in case the supplied literal is null.
[中]获取提供的文本的标签。如果提供的文本为null,则返回回退值。

代码示例

代码示例来源:origin: eclipse/rdf4j

/**
 * Returns the result of {@link #getLabel(Literal, String) getLabel((Literal)v, fallback} in case the
 * supplied value is a literal, returns the fallback value otherwise.
 */
public static String getLabel(Value v, String fallback) {
  return v instanceof Literal ? getLabel((Literal)v, fallback) : fallback;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

/**
 * Returns the result of {@link #getLabel(Literal, String) getLabel((Literal)v, fallback} in case the
 * supplied value is a literal, returns the fallback value otherwise.
 */
public static String getLabel(Value v, String fallback) {
  return v instanceof Literal ? getLabel((Literal)v, fallback) : fallback;
}

代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client

RepositoryInfo repInfo = new RepositoryInfo();
String id = Literals.getLabel(bindingSet.getValue("id"), null);
String description = Literals.getLabel(bindingSet.getValue("title"), null);
boolean readable = Literals.getBooleanValue(bindingSet.getValue("readable"), false);
boolean writable = Literals.getBooleanValue(bindingSet.getValue("writable"), false);

代码示例来源:origin: eclipse/rdf4j

RepositoryInfo repInfo = new RepositoryInfo();
String id = Literals.getLabel(bindingSet.getValue("id"), null);
String description = Literals.getLabel(bindingSet.getValue("title"), null);
boolean readable = Literals.getBooleanValue(bindingSet.getValue("readable"), false);
boolean writable = Literals.getBooleanValue(bindingSet.getValue("writable"), false);

相关文章