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

Examples of com.hp.hpl.jena.rdf.model.StmtIterator.nextStatement()


      Resource assertedComponent = assertion.getProperty(
          METAMODEL.assertedComponent).getResource();
      Resource type = null;
      StmtIterator typeIter = assertedComponent.listProperties(RDF.type);
      while (typeIter.hasNext()) {
        Resource currentType = typeIter.nextStatement().getResource();
        if (currentType.getNameSpace().equals(METAMODEL.getURI())) {
          type = currentType;
          break;
        }
      }
View Full Code Here


        }
        Resource userRes = getUserResource(principal.getUserName());
        if (userRes.hasProperty(RDF.type, AUTHORIZATION.ClockMaster));
        StmtIterator impersonateStmt = userRes.listProperties(AUTHORIZATION.mayImpersonate);
        while (impersonateStmt.hasNext()) {
          result.add(new GVSImpersonatePermission(new SourceImpl(impersonateStmt.nextStatement().getResource().toString())));
        }
      }
     
    //}
    return result;
View Full Code Here

  private Set<Source> readSourcesFromMetaModel() {
    Set<Source> result = new HashSet<Source>();
    StmtIterator stmtIterator = metaModel.listStatements(null,
        METAMODEL.asserter, (Resource) null);
    while (stmtIterator.hasNext()) {
      result.add(new SourceImpl(stmtIterator.nextStatement()
          .getResource().getURI()));
    }
    return result;
  }
View Full Code Here

          if (groundingMolecules == null) {

            StmtIterator containsStmts = resource
                .listProperties(METAMODEL.containsNonTerminalMolecule);
            while (containsStmts.hasNext()) {
              Resource ntMolRes = containsStmts.nextStatement()
                  .getResource();
              resultList.add(new FSNTMolecule(ntMolRes));
            }
            groundingMolecules = new AbstractSet<NonTerminalMolecule>() {
View Full Code Here

   */
  private Set<Source> getTrustedSources(Resource serviceResource) {
    Set<Source> result = new HashSet<Source>();
    StmtIterator trustProrpertyStmts = serviceResource.listProperties(SERVICES.trustedSource);
    while (trustProrpertyStmts.hasNext()) {
      Statement propertyStmt = trustProrpertyStmts.nextStatement();
      result.add(new SourceImpl(propertyStmt.getResource().getURI()));
    }
    return result;
  }

View Full Code Here

    while (trustedSources.size() > previousTrustedSourceSize) {
      previousTrustedSourceSize = trustedSources.size();
      Model currentModel = ModelFactory.createModelForGraph(store.getGraphOverTime(trustedSources).getGraph(new Date()));
      StmtIterator seeAlsoStmt = currentModel.listStatements(null, RDFS.seeAlso, (Resource)null);
      while(seeAlsoStmt.hasNext()) {
        Statement stmt = seeAlsoStmt.nextStatement();
        RDFNode object = stmt.getObject();
        try {
          Source seeAlsoSource = new SourceImpl(((Resource)object).getURI());
          if (trustedSources.contains(seeAlsoSource)) {
            continue;
View Full Code Here

    GlozeURL.logger.warn("drop: no schema mapping for resource: "+resource);
    StmtIterator si = resource.listProperties();
    if (!si.hasNext())
      GlozeURL.logger.warn("because no properties, is gloze.uri correctly defined?");
    else while (si.hasNext()) {
      Property p = si.nextStatement().getPredicate();
      // skip eg. RDF:type
      if (p.getNameSpace().equals(RDF.getURI())) continue;
      GlozeURL.logger.warn("because no matching property: "+p.getURI());
    }
    // try no-schema mapping
View Full Code Here

      log.warn("There is more than one map in the config file");
   
    StmtIterator si = map.listProperties(DbMap.mapsClass);
    while (si.hasNext())
    {
      Resource aClass = si.nextStatement().getResource();
      initFromClass(aClass);
   
    si.close();
    si = configModel.listStatements(null, DbMap.foreignKey, (RDFNode) null);
    while (si.hasNext())
View Full Code Here

   
    si.close();
    si = configModel.listStatements(null, DbMap.foreignKey, (RDFNode) null);
    while (si.hasNext())
    {
      Statement s = si.nextStatement();
      Col subj = prop2col.get(s.getSubject());
      Col obj = prop2col.get(s.getObject());
      if (subj == null || obj == null)
        log.warn("Foreign key missed: " + s);
      subj.setForeignKey(obj);
View Full Code Here

      prop2col.put(prop, col);
    }
    StmtIterator si = aClass.listProperties(DbMap.primaryKey);
    while (si.hasNext())
    {
      Resource primKey = si.nextStatement().getResource();
      Col primCol = prop2col.get(primKey);
      if (primCol == null)
        throw new ConfigException("Primary key unknown: " + primKey);
      else
        primCol.setIsPrimaryKey(true);
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.