本文整理了Java中com.hp.hpl.jena.rdf.model.Model.shortForm()
方法的一些代码示例,展示了Model.shortForm()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.shortForm()
方法的具体详情如下:
包路径:com.hp.hpl.jena.rdf.model.Model
类名称:Model
方法名:shortForm
暂无
代码示例来源:origin: fr.inria.eventcloud/eventcloud-api
/**
* {@inheritDoc}
*/
@Override
public String shortForm(String uri) {
return super.object.shortForm(uri);
}
代码示例来源:origin: bio2rdf/bio2rdf-scripts
public String shortForm(String uri) {
return model.shortForm(uri);
}
代码示例来源:origin: stackoverflow.com
final Model m = // TODO
final String shortForm = m.shortForm(winery.asResource().getURI());
代码示例来源:origin: com.hp.hpl.jena/arq
public static String fmtURI(Resource r)
{ return r.getModel().shortForm(r.getURI()) ; }
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
public static String fmtURI(Resource r)
{ return r.getModel().shortForm(r.getURI()) ; }
代码示例来源:origin: usc-isi-i2/Web-Karma
if (stmt.getPredicate().getURI().equals(Uris.RR_CLASS_URI)) {
if (stmt.getObject().isURIResource()) {
String shortForm = model.shortForm(stmt.getObject().toString());
String fullURI = stmt.getObject().toString();
if (!shortForm.equals(fullURI)) {
Statement s = node.asResource().getProperty(dataTypeProp);
if (s != null) {
dataType = model.shortForm(s.getObject().toString());
String shortForm = model.shortForm(stmt.getObject().toString());
String fullURI = stmt.getObject().toString();
if (!shortForm.equals(fullURI)) {
代码示例来源:origin: epimorphics/elda
/**
* Determine an appropriate name for a property resource, creating a new
* context entry if required.
*/
private String findNameForProperty(Resource r) {
String uri = r.getURI();
String name = getNameForURI( uri );
if (name == null) {
// Try just using localname
String localname = r.getLocalName();
if ( nameUpdateOK(localname, uri) ) return localname;
// See if we can generate a prefix form
name = r.getModel().shortForm(uri);
if (! name.equals(uri)) {
name = name.replace(':', '_');
if ( nameUpdateOK(name, uri) ) return name;
}
// Start making ones up as a last resort
while (true) {
name = localname + nameCount++;
if ( nameUpdateOK(name, uri) ) return name;
}
} else {
return name;
}
}
代码示例来源:origin: epimorphics/elda
Resource root = se.getRoot();
PrefixMapping pm = se.getSpec().getPrefixMap();
String shortName = root.getModel().shortForm( root.getURI() );
String label = getLabelled( root, shortName );
代码示例来源:origin: epimorphics/elda
@Test public void testTermbindsIncludesMetaproperties() throws URISyntaxException {
Integer totalResults = null;
Resource thisMetaPage = createMetadata(false, totalResults);
for (Property p: expectedTermboundProperties) {
Model model = thisMetaPage.getModel();
if (!model.contains(null, API.property, p)) {
fail("term bindings should include " + model.shortForm(p.getURI()));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!