本文整理了Java中com.hp.hpl.jena.rdf.model.Model.withDefaultMappings()
方法的一些代码示例,展示了Model.withDefaultMappings()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.withDefaultMappings()
方法的具体详情如下:
包路径:com.hp.hpl.jena.rdf.model.Model
类名称:Model
方法名:withDefaultMappings
暂无
代码示例来源:origin: fr.inria.eventcloud/eventcloud-api
/**
* {@inheritDoc}
*/
@Override
public PrefixMapping withDefaultMappings(PrefixMapping map) {
return super.object.withDefaultMappings(map);
}
代码示例来源:origin: bio2rdf/bio2rdf-scripts
public PrefixMapping withDefaultMappings(PrefixMapping map) {
return model.withDefaultMappings(map);
}
代码示例来源:origin: epimorphics/elda
public CompleteContext include(Model m) {
model.add(m);
model.withDefaultMappings( m );
return this;
}
代码示例来源:origin: epimorphics/elda
private Resource createMetadata(UriInfo ui, String pathStub, String formatName, SpecRecord rec) {
Bindings cc = Bindings.createContext( Bindings.uplift( rec.getBindings() ), JerseyUtils.convert( ui.getQueryParameters() ) );
Model metadata = ModelFactory.createDefaultModel();
Resource meta = rec.getAPIEndpoint().getMetadata( cc, ui.getRequestUri(), formatName, metadata);
//
for (APIEndpointSpec s: rec.getAPIEndpoint().getSpec().getAPISpec().getEndpoints()) {
String ut = s.getURITemplate().replaceFirst( "^/", "" );
if (!ut.equals(pathStub)) {
String sib = ui
.getRequestUri()
.toString()
.replace( pathStub, ut )
.replace( "%7B", "{" )
.replace( "%7D", "}" )
;
meta.addProperty( SIBLING, metadata.createResource( sib ) );
}
}
// Extract the endpoint specification
Model spec = rec.getSpecModel();
Resource endpointSpec = rec.getAPIEndpoint().getSpec().getResource().inModel(spec);
metadata.setNsPrefixes( spec );
metadata.add( ResourceUtils.reachableClosure( endpointSpec ) );
meta.getModel().withDefaultMappings( PrefixMapping.Extended );
meta.addProperty( API.endpoint, endpointSpec );
return meta;
}
}
代码示例来源:origin: epimorphics/elda
@Test public void testX() {
m.withDefaultMappings(pm);
Resource a = m.createResource( RDF.getURI() + "intruder" );
Resource b = m.createResource( RDFS.getURI() + "stranger" );
List<Resource> both = Arrays.asList( a, b );
State s = new State(both, m, null, null, null);
String q = View.createDescribeQueryForItems( s, both );
if (!q.equals( expectA ) && !q.equals( expectB ))
fail( "wrong describe query created:\n" + q );
}
内容来源于网络,如有侵权,请联系作者删除!