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

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

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

Model.createBag介绍

暂无

代码示例

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

@Override
public Bag createBag() {
  return inner.createBag();
}

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

@Override
public Bag createBag(String uri) {
  return inner.createBag(uri);
}

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

@Override
protected Container createContainer()
{
  return model.createBag();
}

代码示例来源:origin: org.apache.jena/jena-core

@Override
protected Container createContainer()
{
  return model.createBag();
}

代码示例来源:origin: org.opengis.cite.teamengine/teamengine-core

/**
 * This method is used to add test inputs in to earl report.
 *
 * @param earl
 *            Model object to add the result into it.
 * @param params
 *            The variable is type of Map with all the user input.
 */
private void addTestInputs( Model earl, Map<String, String> params ) {
  Bag inputs = earl.createBag();
  if ( !params.equals( "" ) && params != null ) {
    String value = "";
    for ( String key : params.keySet() ) {
      value = params.get( key );
      Resource testInputs = earl.createResource();
      testInputs.addProperty( DCTerms.title, key );
      testInputs.addProperty( DCTerms.description, value );
      inputs.add( testInputs );
    }
  }
  this.testRun.addProperty( CITE.inputs, inputs );
}

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

@BeforeClass public static void beforeClass() {
  Model m = ModelFactory.createModelForGraph(graph1) ;
  Bag bag0 = m.createBag(base+"node0") ;
  Bag bag1 = m.createBag(base+"node1") ;
  Seq seq2 = m.createSeq(base+"node2") ;
  bag1.add("elt1") ;
  seq2.add("elt1") ;
  seq2.add("elt2") ;
}

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

public void testBag()
{
  final Bag tvBag = model.createBag();
  Assert.assertEquals(tvBag, model.createStatement(r, RDF.value, tvBag)
      .getBag());
}

代码示例来源:origin: org.apache.jena/jena-core

public void testBag()
{
  final Bag tvBag = model.createBag();
  Assert.assertEquals(tvBag, model.createStatement(r, RDF.value, tvBag)
      .getBag());
}

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

@Override
public SecuredBag createBag() throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException {
  checkUpdate();
  checkCreate(new Triple(SecurityEvaluator.FUTURE, RDF.type.asNode(), RDF.Bag.asNode()));
  return SecuredBagImpl.getInstance(holder.getSecuredItem(), holder.getBaseItem().createBag());
}

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

@Override
public SecuredBag createBag(final String uri)
    throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException {
  checkUpdate();
  checkCreate(new Triple(NodeFactory.createURI(uri), RDF.type.asNode(), RDF.Bag.asNode()));
  return SecuredBagImpl.getInstance(holder.getSecuredItem(), holder.getBaseItem().createBag(uri));
}

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

public void testCreateAnonBag()
{
  final Bag tv = model.createBag();
  Assert.assertTrue(tv.isAnon());
  Assert.assertTrue(model.contains(tv, RDF.type, RDF.Bag));
}

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

public void testCreateNamedBag()
{
  final String uri = "http://aldabaran/foo";
  final Bag tv = model.createBag(uri);
  Assert.assertEquals(uri, tv.getURI());
  Assert.assertTrue(model.contains(tv, RDF.type, RDF.Bag));
}

代码示例来源:origin: org.apache.jena/jena-core

public void testCreateAnonBag()
{
  final Bag tv = model.createBag();
  Assert.assertTrue(tv.isAnon());
  Assert.assertTrue(model.contains(tv, RDF.type, RDF.Bag));
}

代码示例来源:origin: org.apache.jena/jena-core

public void testCreateNamedBag()
{
  final String uri = "http://aldabaran/foo";
  final Bag tv = model.createBag(uri);
  Assert.assertEquals(uri, tv.getURI());
  Assert.assertTrue(model.contains(tv, RDF.type, RDF.Bag));
}

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

public void testGetBag()
{
  final String uri = "http://aldabaran.hpl.hp.com/rdf/test4/" + 150;
  model.createBag(uri);
  final Bag b = model.getBag(uri);
  Assert.assertEquals(uri, b.getURI());
  Assert.assertTrue(model.contains(b, RDF.type, RDF.Bag));
}

代码示例来源:origin: org.apache.jena/jena-core

public void testGetBag()
{
  final String uri = "http://aldabaran.hpl.hp.com/rdf/test4/" + 150;
  model.createBag(uri);
  final Bag b = model.getBag(uri);
  Assert.assertEquals(uri, b.getURI());
  Assert.assertTrue(model.contains(b, RDF.type, RDF.Bag));
}

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

public void testEnhancedResources()
{
  final Resource r = model.createResource();
  testResource(model, r, 0);
  testResource(model, model.createBag(), 1);
  testContainer(model, model.createBag(), model.createBag());
  testResource(model, model.createAlt(), 1);
  testContainer(model, model.createAlt(), model.createAlt());
  testResource(model, model.createSeq(), 1);
  testContainer(model, model.createSeq(), model.createSeq());
  // testSeq( model, model.createSeq(), model.createSeq(),
  // model.createSeq(),
  // model.createSeq(), model.createSeq(), model.createSeq(),
  // model.createSeq() );
}

代码示例来源:origin: org.apache.jena/jena-core

public void testEnhancedResources()
{
  final Resource r = model.createResource();
  testResource(model, r, 0);
  testResource(model, model.createBag(), 1);
  testContainer(model, model.createBag(), model.createBag());
  testResource(model, model.createAlt(), 1);
  testContainer(model, model.createAlt(), model.createAlt());
  testResource(model, model.createSeq(), 1);
  testContainer(model, model.createSeq(), model.createSeq());
  // testSeq( model, model.createSeq(), model.createSeq(),
  // model.createSeq(),
  // model.createSeq(), model.createSeq(), model.createSeq(),
  // model.createSeq() );
}

代码示例来源:origin: org.apache.jena/jena-core

@Override
public void setUp()
{
  super.setUp();
  aLitTestObj = new LitTestObj(12345);
  tvLiteral = model.createLiteral("test 12 string 2");
  tvResource = model.createResource();
  // tvResObj = model.createResource( new ResTestObjF() );
  anObject = new LitTestObj(1234);
  tvBag = model.createBag();
  tvAlt = model.createAlt();
  tvSeq = model.createSeq();
}

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

@Override
public void setUp()
{
  super.setUp();
  aLitTestObj = new LitTestObj(12345);
  tvLiteral = model.createLiteral("test 12 string 2");
  tvResource = model.createResource();
  // tvResObj = model.createResource( new ResTestObjF() );
  anObject = new LitTestObj(1234);
  tvBag = model.createBag();
  tvAlt = model.createAlt();
  tvSeq = model.createSeq();
}

相关文章

Model类方法