本文整理了Java中org.eclipse.rdf4j.model.util.Models.object()
方法的一些代码示例,展示了Models.object()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Models.object()
方法的具体详情如下:
包路径:org.eclipse.rdf4j.model.util.Models
类名称:Models
方法名:object
[英]Retrieves an object Value from the statements in the given model. If more than one possible object value exists, any one value is picked and returned.
[中]从给定模型中的语句中检索对象值。如果存在多个可能的对象值,则拾取并返回任意一个值。
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
/**
* @deprecated since 4.0. Use {@link #object(Model)} instead.
*/
@Deprecated
public static Value anyObject(Model m) {
return object(m).orElse(null);
}
代码示例来源:origin: eclipse/rdf4j
/**
* @deprecated since 4.0. Use {@link #object(Model)} instead.
*/
@Deprecated
public static Value anyObject(Model m) {
return object(m).orElse(null);
}
代码示例来源:origin: org.eclipse.rdf4j/rdf4j-client
/**
* Retrieve a property value for the supplied subject from the given model. If more than one property value exists,
* any one value is picked and returned.
*
* @param m
* the model from which to retrieve an object value.
* @param subject
* the subject resource for which to retrieve a property value.
* @param property
* the property for which to retrieve a value.
* @param contexts
* the contexts from which to retrieve the property value. Optional vararg argument. If not
* specified the operations works on the entire Model.
* @return a property value from the given model, or {@link Optional#empty()} if no such value exists.
*/
public static Optional<Value> getProperty(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 object(m.filter(subject, property, null, contexts));
}
代码示例来源:origin: eclipse/rdf4j
/**
* Retrieve a property value for the supplied subject from the given model. If more than one property value exists,
* any one value is picked and returned.
*
* @param m
* the model from which to retrieve an object value.
* @param subject
* the subject resource for which to retrieve a property value.
* @param property
* the property for which to retrieve a value.
* @param contexts
* the contexts from which to retrieve the property value. Optional vararg argument. If not
* specified the operations works on the entire Model.
* @return a property value from the given model, or {@link Optional#empty()} if no such value exists.
*/
public static Optional<Value> getProperty(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 object(m.filter(subject, property, null, contexts));
}
内容来源于网络,如有侵权,请联系作者删除!