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

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()


    }
 
  ResIterator it2 = repair.listSubjectsWithProperty( EYE.multiplePrefixesForNamespace );
  while ( it2.hasNext() )
      {
    Resource curr = it2.nextResource();
    repair.add( curr, EYE.repairConfidence, EYE.good )
            .add( curr, EYE.repairType, EYE.removeDuplicatePrefixes )
            .add( curr, EYE.checkFix, EYE.namespacePrefix );
      }
  r.setMitems( repair );
View Full Code Here


    this.output = this.input;

      ResIterator it = report.listSubjectsWithProperty( EYE.noConsistentTypeFor );
      while( it.hasNext() )
        {
        Resource curr = it.nextResource();
        RDFNode fix = report.listObjectsOfProperty( curr, EYE.repairType ).nextNode();
        if ( fix.equals( EYE.removeType ) )
          {
          NodeIterator it2 = repair.listObjectsOfProperty( curr, EYE.statementRemoved );
          while ( it2.hasNext() )
View Full Code Here

    {
    Resource result = parent;
    ResIterator it = in.listSubjectsWithProperty( RDFS.subClassOf, parent );
    while ( it.hasNext() )
      {
      Resource curr = it.nextResource();
      if ( !hasBeenSeen( curr ) )
        {
        addSeen( curr );
        Resource midresult = getSubbiestClass( curr, in );
        if ( midresult != null )
View Full Code Here

    }
 
  ResIterator it2 = repair.listSubjectsWithProperty( EYE.noConsistentTypeFor );
  while( it2.hasNext() )
    {
    Resource curr = it2.nextResource();
    // Try and compare the number of usages of clashing classes; instruct to delete if one outweighs the other
    Resource from = input.createResource( repair.listObjectsOfProperty( curr, EYE.noConsistentTypeFor ).nextNode().asNode().getURI() );
   
    NodeIterator it3 = ((OntModel)input).getBaseModel().listObjectsOfProperty( from, RDF.type );
    ArrayList<String> l = new ArrayList<String>();
View Full Code Here

    this.repair = report;
    this.output = this.input;
   
    ResIterator it = repair.listSubjectsWithProperty( EYE.hasNoType );
    while ( it.hasNext() ) {
      NodeIterator it2 = repair.listObjectsOfProperty( it.nextResource(), EYE.statementAdded );
      while ( it2.hasNext() )
        {
        Resource bnode = repair.createResource( it2.nextNode().asNode().getBlankNodeId() );
       
        Resource subj =  (Resource)repair.listObjectsOfProperty( bnode, RDF.subject ).nextNode();
View Full Code Here

        fullMappingArr = new String[size];
        int i = 0;
       
        while ( wordIt.hasNext() )
          {
          Resource currWord = wordIt.nextResource();
          if ( currWord.isURIResource() )
            {
            fullwords += currWord.asNode().getURI() + '\n';
           
            loosewords += currWord.getLocalName() + '\n';
View Full Code Here

  private String getConfigsPrefixFromUri ( String uri )
    {
    ResIterator subjects = config.listSubjectsWithProperty( EYE.nsURI, config.createLiteral( uri ) );
    if ( subjects.hasNext() )
      {
      StmtIterator prefixes = config.listStatements( subjects.nextResource(), EYE.prefix, (RDFNode)null );
      if ( prefixes.hasNext() )
        return prefixes.nextStatement().getObject().asNode().getLiteralLexicalForm();
      }
    return null; // Return null otherwise
    }
View Full Code Here

  private String getConfigsUriFromPrefix ( String pre )
    {
    ResIterator subjects = config.listSubjectsWithProperty( EYE.prefix, config.createLiteral( pre ) );
    if ( subjects.hasNext() )
      {
      StmtIterator uris = config.listStatements( subjects.nextResource(), EYE.nsURI, (RDFNode)null );
      if ( uris.hasNext() )
        return uris.nextStatement().getObject().asNode().getLiteralLexicalForm();
      }
    return null; // Return null otherwise
    }
View Full Code Here

       * We are able to make one or more of the following assumptions;
       * (1o The Prefix is probably desired                                       \\
       * (3o The URI is likely misspelt                                          ===>  Work these with the precedence specified
       * (2o The URI is right, but the user mistakenly used a 'reserved' prefix   //
       */
      Resource curr = it.nextResource();
      String prefix = repair.listObjectsOfProperty( curr, EYE.onPrefix ).nextNode().asNode().getLiteralLexicalForm();
      String currUri = output.getNsPrefixURI( prefix );
      String configsUri = getConfigsUriFromPrefix( prefix );
      String configsPre = null;
      if ( currUri != null )
View Full Code Here

      }
   
    it = repair.listSubjectsWithProperty( EYE.repairType, EYE.removeDuplicatePrefixes );
    while ( it.hasNext() )
      {
      Resource curr = it.nextResource();
      NodeIterator it2 = repair.listObjectsOfProperty( curr, EYE.onPrefix );
        String uri = repair.listObjectsOfProperty( curr, EYE.multiplePrefixesForNamespace ).nextNode().asNode().getLiteralLexicalForm();
        if (it2.hasNext())
          {
          boolean oneKept = false;
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.