org.apache.jena.rdf.model.Model.withDefaultMappings()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中org.apache.jena.rdf.model.Model.withDefaultMappings()方法的一些代码示例,展示了Model.withDefaultMappings()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.withDefaultMappings()方法的具体详情如下:
包路径:org.apache.jena.rdf.model.Model
类名称:Model
方法名:withDefaultMappings

Model.withDefaultMappings介绍

暂无

代码示例

代码示例来源:origin: vivo-project/Vitro

@Override
public PrefixMapping withDefaultMappings(PrefixMapping map) {
  return inner.withDefaultMappings(map);
}

代码示例来源:origin: apache/jena

@Override
public SecuredModel withDefaultMappings(final PrefixMapping map)
    throws UpdateDeniedException, AuthenticationRequiredException {
  checkUpdate();
  holder.getBaseItem().withDefaultMappings(map);
  return holder.getSecuredItem();
}

代码示例来源:origin: at.researchstudio.sat/won-node

private void addDataManagedByFacet(final Connection con){
  Need need = needRepository.findOneByNeedURI(con.getNeedURI());
  Dataset needContent =  need.getDatatsetHolder().getDataset();

  Model facetManagedGraph = getFacetManagedGraph(con.getNeedURI(), needContent);

  List<URI> properties = new ArrayList<>();

  PrefixMapping prefixMapping = PrefixMapping.Factory.create();
//    prefixMapping.setNsPrefix(SIOC.getURI(),"sioc");
  facetManagedGraph.withDefaultMappings(prefixMapping);
  facetManagedGraph.setNsPrefix("sioc", SIOC.getURI());
  Resource post = facetManagedGraph.createResource(con.getNeedURI().toString(), SIOC.POST);
  Resource reply = facetManagedGraph.createResource(con.getRemoteNeedURI().toString(),SIOC.POST);
  facetManagedGraph.add(facetManagedGraph
   .createStatement(facetManagedGraph.getResource(con.getNeedURI().toString()), SIOC.HAS_REPLY,
    facetManagedGraph.getResource(con.getRemoteNeedURI().toString())));

  // add WON node link
  logger.debug("linked data:"+ RdfUtils.toString(facetManagedGraph));
  need.getDatatsetHolder().setDataset(needContent);
  needRepository.save(need);
 }

代码示例来源:origin: at.researchstudio.sat/won-node

@Override
 public void connectFromOwner(Connection con, Model content, WonMessage wonMessage) throws NoSuchNeedException, IllegalMessageForNeedStateException, ConnectionAlreadyExistsException {
  super.connectFromOwner(con, content, wonMessage);
  /* when connected change linked data*/
  PrefixMapping prefixMapping = PrefixMapping.Factory.create();
  prefixMapping.setNsPrefix(SIOC.getURI(),"sioc");
  content.withDefaultMappings(prefixMapping);
  content.setNsPrefix("sioc",SIOC.getURI());
  Resource post = content.createResource(con.getConnectionURI() + "/p/", SIOC.POST);
  content.add(content.createStatement(content.getResource(con.getConnectionURI().toString()), SIOC.HAS_REPLY,
                    content.getResource(con.getRemoteConnectionURI().toString())));
  logger.debug(RdfUtils.toString(content));
  con.getDatasetHolder().getDataset().setDefaultModel(content);
  datasetHolderRepository.save(con.getDatasetHolder());
 }
}

代码示例来源:origin: at.researchstudio.sat/won-node

PrefixMapping prefixMapping = PrefixMapping.Factory.create();
needContent.withDefaultMappings(prefixMapping);
needContent.setNsPrefix("sioc", SIOC.getURI());
Resource post = needContent.createResource(con.getNeedURI().toString(), SIOC.POST);

相关文章

Model类方法