本文整理了Java中org.openrdf.model.Model.objectLiteral()
方法的一些代码示例,展示了Model.objectLiteral()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.objectLiteral()
方法的具体详情如下:
包路径:org.openrdf.model.Model
类名称:Model
方法名:objectLiteral
[英]Utility method that casts the return value of #objectValue() to a Literal, or throws a ModelUtilException if that value is not a Literal.
[中]将#objectValue()的返回值强制转换为文本的实用方法,如果该值不是文本,则抛出ModelUtilException。
代码示例来源:origin: eu.fbk.pikes/pikes-rdf
null).objects()) {
final String extent = model.filter((Resource) mentionID, NIF.ANCHOR_OF, null)
.objectLiteral().stringValue();
out.append(separator);
renderObject(out, mentionID, model);
代码示例来源:origin: org.openrdf.sesame/sesame-rio-testsuite
@Test
public void testEscapes()
throws Exception
{
RDFParser ntriplesParser = createRDFParser();
Model model = new LinkedHashModel();
ntriplesParser.setRDFHandler(new StatementCollector(model));
ntriplesParser.parse(new StringReader(
"<urn:test:subject> <urn:test:predicate> \" \\t \\b \\n \\r \\f \\\" \\' \\\\ \" . "),
"http://example/");
assertEquals(1, model.size());
assertEquals(" \t \b \n \r \f \" \' \\ ", model.objectLiteral().get().getLabel());
}
代码示例来源:origin: org.openrdf.alibaba/alibaba-sail-auditing
Model model = new LinkedHashModel(graph);
setNamespace(model.filter(implNode, TRX_NAMESPACE, null).objectString());
Literal lit = model.filter(implNode, ARCHIVING, null).objectLiteral();
if (lit != null) {
setArchiving(lit.booleanValue());
lit = model.filter(implNode, MAX_ARCHIVE, null).objectLiteral();
if (lit != null) {
setMaxArchive(lit.intValue());
lit = model.filter(implNode, MIN_RECENT, null).objectLiteral();
if (lit != null) {
setMinRecent(lit.intValue());
lit = model.filter(implNode, MAX_RECENT, null).objectLiteral();
if (lit != null) {
setMaxRecent(lit.intValue());
lit = model.filter(implNode, PURGE_AFTER, null).objectLiteral();
if (lit != null) {
try {
代码示例来源:origin: org.openrdf.alibaba/alibaba-repository-object
.objectLiteral().booleanValue();
} else {
followImports = true;
.filter(subj, COMPILE_REPOSITORY, null).objectLiteral()
.booleanValue();
} else {
代码示例来源:origin: org.openrdf.sesame/sesame-sail-dataset
@Override
public void parse(Model model, Resource implNode)
throws StoreConfigException
{
super.parse(model, implNode);
for (Value node : model.filter(implNode, GRAPH, null).objects()) {
URI name = model.filter((Resource)node, NAME, null).objectURI();
String url = model.filter((Resource)node, DATASET, null).objectString();
addGraph(name, url);
}
if (model.contains(implNode, CLOSED, null)) {
closed = model.filter(implNode, CLOSED, null).objectLiteral().booleanValue();
}
}
}
代码示例来源:origin: org.openrdf.alibaba/alibaba-sail-federation
@Override
public void parse(Graph graph, Resource implNode)
throws SailConfigException
{
super.parse(graph, implNode);
Model model = new LinkedHashModel(graph);
for (Value member : model.filter(implNode, MEMBER, null).objects()) {
try {
addMember(create(graph, (Resource)member));
} catch (RepositoryConfigException e) {
throw new SailConfigException(e);
}
}
for (Value space : model.filter(implNode, LOCALPROPERTYSPACE, null).objects()) {
addLocalPropertySpace(space.stringValue());
}
try {
Literal bool = model.filter(implNode, DISTINCT, null).objectLiteral();
if (bool != null && bool.booleanValue()) {
distinct = true;
}
bool = model.filter(implNode, READ_ONLY, null).objectLiteral();
if (bool != null && bool.booleanValue()) {
readOnly = true;
}
}
catch (ModelException e) {
throw new SailConfigException(e);
}
}
代码示例来源:origin: com.github.ansell.oas/oas-webservice-impl
.filter(this.ontologyVersionUri, OasConstants.OAS_CONCRETE_AXIOM_COUNT, null).objectLiteral()
.intValue());
.objectLiteral().intValue());
.filter(this.ontologyVersionUri, OasConstants.OAS_INDIVIDUAL_COUNT, null).objectLiteral()
.intValue());
.filter(this.ontologyVersionUri, OasConstants.OAS_INFERRED_AXIOM_COUNT, null).objectLiteral()
.intValue());
代码示例来源:origin: com.github.ansell.oas/oas-webservice-impl
this.setTag(statements.filter(nextSubject, OasConstants.TAGGING_NAME, null).objectLiteral());
this.setOntologyTermUri(statements.filter(nextSubject, OasConstants.MOAT_TAG_MEANING, null).objectURI());
this.setAnnotatedObjectUri(statements.filter(nextSubject, OasConstants.TAGGING_TAGGED_RESOURCE, null)
内容来源于网络,如有侵权,请联系作者删除!