Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.Model.removeAll()


      try {
        dataset.begin(ReadWrite.WRITE);
        Model m = dataset.getDefaultModel();

        m.removeAll();
        Resource subject = m.createResource(INDEX_INFO_SUBJECT);
        Property predicate = m.createProperty(TIMESTAMP_PREDICATE);
        m.addLiteral(subject, predicate, System.currentTimeMillis());
        predicate = m.createProperty(URI_PREDICATE);
        for (String uri : lastProcessedUris) {
View Full Code Here


       
        ds.asDatasetGraph().getDefaultGraph().add(t1) ;
        ds.getNamedModel(graphName).getGraph().add(t1) ;
       
        Model m = ds.getDefaultModel() ;
        m.removeAll() ;
        assertEquals(0, m.size()) ;
       
        // But still in the other graph
        assertTrue(ds.getNamedModel(graphName).getGraph().contains(t1)) ;
    }
View Full Code Here

       
        ds.asDatasetGraph().getDefaultGraph().add(t1) ;
        ds.getNamedModel(graphName).getGraph().add(t1) ;
       
        Model m = ds.getNamedModel(graphName) ;
        m.removeAll() ;
        assertEquals(0, m.size()) ;
       
        // But still in the other graph
        assertTrue(ds.getDefaultModel().getGraph().contains(t1)) ;
    }
View Full Code Here

    if( filterTypes ) {
      Resource[] builtinTypes = {
          OWL.Ontology, OWL.Class, OWL.ObjectProperty, OWL.DatatypeProperty, OWL.Thing,
          RDF.List };
      for( Resource builtinType : builtinTypes ) {
        model.removeAll( null, RDF.type, builtinType );
      }
    }

    return model.getGraph();
  }
View Full Code Here

    if( filterTypes ) {
      Resource[] builtinTypes = {
          OWL.Ontology, OWL.Class, OWL.ObjectProperty, OWL.DatatypeProperty, OWL.Thing,
          RDF.List };
      for( Resource builtinType : builtinTypes ) {
        model.removeAll( null, RDF.type, builtinType );
      }
    }

    return model.getGraph();
  }
View Full Code Here

      StmtIterator seeAlsos = getJenaResource().listProperties(RDFS.seeAlso);
      while (seeAlsos.hasNext()) {
        String seeAlso = seeAlsos.nextStatement().getObject().toString();
        com.hp.hpl.jena.rdf.model.Resource resource = model.getResource(seeAlso);
        resource.removeProperties();
        model.removeAll(resource, null, null);
      }
    }
   
    getJenaResource().removeProperties();
    model.removeAll(getJenaResource(), null, null);
View Full Code Here

        model.removeAll(resource, null, null);
      }
    }
   
    getJenaResource().removeProperties();
    model.removeAll(getJenaResource(), null, null);
  }
 
  public Object getRepositoryResource() {
    return getJenaResource();
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.