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

Examples of com.hp.hpl.jena.rdf.model.Resource.listProperties()


    Resource ontRes = JenaUtil2.getFirstIndividual(model, OWL.Ontology);
    List<Statement> prexistStatements = null;
    if ( ontRes != null ) {
      prexistStatements = new ArrayList<Statement>();
      log.info("Getting pre-existing properties for OWL.Ontology individual: " +ontRes.getURI());
      StmtIterator iter = ontRes.listProperties();
      while ( iter.hasNext() ) {
        Statement st = iter.nextStatement();
        prexistStatements.add(st);
     
    }
View Full Code Here


    Resource ontRes = JenaUtil2.getFirstIndividual(model, OWL.Ontology);
    List<Statement> prexistStatements = null;
    if ( ontRes != null ) {
      prexistStatements = new ArrayList<Statement>();
      log.info("Getting pre-existing properties for OWL.Ontology individual: " +ontRes.getURI());
      StmtIterator iter = ontRes.listProperties();
      while ( iter.hasNext() ) {
        Statement st = iter.nextStatement();
        prexistStatements.add(st);
     
    }
View Full Code Here

            // check for multiple paths arriving at this queue node
            if (!seen.contains( r )) {
                seen.add( r );

                // add the statements to the output model, and queue any new resources
                for (StmtIterator i = r.listProperties(); i.hasNext(); ) {
                    Statement s = i.nextStatement();

                    // don't do the occurs check now in case of reflexive statements
                    m.add( s );
View Full Code Here

          "Ian Dickinson");
      final Resource bNode = ri.nextResource();
      ri.close();

      // Rewrite it to ground form
      final int originalCount = bNode.listProperties().toList().size();
      final Resource newR = incoming
          .createResource("http://www.hp.com/people/Ian_Dickinson");
      int runningCount = 0;
      final StmtIterator si = incoming.listStatements(bNode, null,
          (RDFNode) null);
View Full Code Here

    Resource ontRes = JenaUtil2.getFirstIndividual(model, OWL.Ontology);
    List<Statement> prexistStatements = null;
    if ( ontRes != null ) {
      prexistStatements = new ArrayList<Statement>();
      log.info("Getting pre-existing properties for OWL.Ontology individual: " +ontRes.getURI());
      StmtIterator iter = ontRes.listProperties();
      while ( iter.hasNext() ) {
        Statement st = iter.nextStatement();
        prexistStatements.add(st);
     
    }
View Full Code Here

    Resource ontRes = JenaUtil2.getFirstIndividual(model, OWL.Ontology);
    List<Statement> prexistStatements = null;
    if ( ontRes != null ) {
      prexistStatements = new ArrayList<Statement>();
      log.info("Getting pre-existing properties for OWL.Ontology individual: " +ontRes.getURI());
      StmtIterator iter = ontRes.listProperties();
      while ( iter.hasNext() ) {
        Statement st = iter.nextStatement();
        prexistStatements.add(st);
     
    }
View Full Code Here

    allstopuris.addAll(stopuris);
   
    for(String stopuri : stopuris){
      Resource stopres = bscrdf.getResource(stopuri);
     
      for(Statement subst : stopres.listProperties(normweight).toSet()){
        allstopuris.add(subst.getObject().toString());
      }
    }
    log.debug("Removing...");
    for(Statement st : bscrdf.listStatements().toSet()){
View Full Code Here

        if(labelednodes.contains(rdfnode.asResource())){
          String rdflabel = rdfnode.asResource().getProperty(RDFS.label).getLiteral().toString();
          index = rdflabel + " (" + nsandtlas.get(OWLMethods.getNamespaceFromIRI(uri))[0] + ")";
          urisandlabels.put(uri, rdflabel);
          // Associate instances of this reference resources with RDFS:labels
          for(Statement st : rdfnode.listProperties(normweight).toSet()){
            urisandlabels.put(st.getObject().toString(), rdflabel);
          }
        }
        else{
          index = OWLMethods.getOWLEntityNameFromIRI(uri) + " (" + nsandtlas.get(OWLMethods.getNamespaceFromIRI(uri))[0] + ")";
View Full Code Here

      Property p) {
    Set<Resource> partitions = new HashSet<Resource>();
    ResIterator classIt = m.listResourcesWithProperty(RDF.type, type);
    while (classIt.hasNext()) {
      Resource classMap = classIt.next();
      StmtIterator pIt = classMap.listProperties(p);
      while (pIt.hasNext()) {
        partitions.add((Resource) pIt.next().getObject());
      }
    }
    return partitions;
View Full Code Here

            // check for multiple paths arriving at this queue node
            if (!seen.contains( r )) {
                seen.add( r );

                // add the statements to the output model, and queue any new resources
                for (StmtIterator i = r.listProperties(); i.hasNext(); ) {
                    Statement s = i.nextStatement();

                    // don't do the occurs check now in case of reflexive statements
                    m.add( s );
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.