本文整理了Java中com.hp.hpl.jena.rdf.model.Model.getRequiredProperty()
方法的一些代码示例,展示了Model.getRequiredProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getRequiredProperty()
方法的具体详情如下:
包路径:com.hp.hpl.jena.rdf.model.Model
类名称:Model
方法名:getRequiredProperty
[英]Return a statement with given subject and property.
If more than one statement witht the given subject and property exists in the model, it is undefined which will be returned. If none exist, an exception is thrown.
[中]返回带有给定主题和属性的语句。
如果模型中存在多个具有给定主题和属性的语句,则将返回未定义的语句。如果不存在,则抛出异常。
代码示例来源:origin: fr.inria.eventcloud/eventcloud-api
/**
* {@inheritDoc}
*/
@Override
public Statement getRequiredProperty(Resource s, Property p) {
return super.object.getRequiredProperty(s, p);
}
代码示例来源:origin: bio2rdf/bio2rdf-scripts
public Statement getRequiredProperty(Resource s, Property p) {
return model.getRequiredProperty(s, p);
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
@Override
public Container remove(Statement s) {
int size = size();
Statement last = null;
if (s.getPredicate().getOrdinal() == size) { // if last
getModel().remove(s);
} else {
last = getModel().getRequiredProperty(this, RDF.li(size));
s.changeObject(last.getObject());
getModel().remove(last);
}
if (size() != (size -1))
throw new AssertionFailureException( "container size" );
return this;
}
内容来源于网络,如有侵权,请联系作者删除!