本文整理了Java中org.eclipse.rdf4j.model.util.Models.objectLiterals()
方法的一些代码示例,展示了Models.objectLiterals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Models.objectLiterals()
方法的具体详情如下:
包路径:org.eclipse.rdf4j.model.util.Models
类名称:Models
方法名:objectLiterals
[英]Retrieves all object Literal values from the statements in the given model.
[中]从给定模型中的语句中检索所有对象文字值。
代码示例来源:origin: eclipse/rdf4j
/**
* Retrieve all property Literal values for the supplied subject and property from the given model.
*
* @param m
* the model from which to retrieve the property Literal values.
* @param subject
* the subject resource for which to retrieve all property Literal values.
* @param property
* the property for which to retrieve all Literal values.
* @param contexts
* the contexts from which to retrieve the property values. Optional vararg argument. If not
* specified the operations works on the entire Model.
* @return a Set of all property IRI values for the supplied input. The resulting set may be empty.
*/
public static Set<Literal> getPropertyLiterals(Model m, Resource subject, IRI property,
Resource... contexts)
{
Objects.requireNonNull(m, "model may not be null");
Objects.requireNonNull(subject, "subject may not be null");
Objects.requireNonNull(property, "property may not be null");
return objectLiterals(m.filter(subject, property, null, contexts));
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
/**
* Retrieve all property Literal values for the supplied subject and property from the given model.
*
* @param m
* the model from which to retrieve the property Literal values.
* @param subject
* the subject resource for which to retrieve all property Literal values.
* @param property
* the property for which to retrieve all Literal values.
* @param contexts
* the contexts from which to retrieve the property values. Optional vararg argument. If not
* specified the operations works on the entire Model.
* @return a Set of all property IRI values for the supplied input. The resulting set may be empty.
*/
public static Set<Literal> getPropertyLiterals(Model m, Resource subject, IRI property,
Resource... contexts)
{
Objects.requireNonNull(m, "model may not be null");
Objects.requireNonNull(subject, "subject may not be null");
Objects.requireNonNull(property, "property may not be null");
return objectLiterals(m.filter(subject, property, null, contexts));
}
内容来源于网络,如有侵权,请联系作者删除!