Package com.hp.hpl.squirrelrdf.querymap.exceptions

Examples of com.hp.hpl.squirrelrdf.querymap.exceptions.InconsistentException


        if (object.isConcrete())
        {
          Resource theClass = (Resource) configModel.asRDFNode(object);
          Table table = class2table.get(theClass);
          if (table == null)
            throw new InconsistentException("Unknown class: " + object);
          checkClasses(subject, theClass, nodeToClass);
          nodeToClass.put(subject, theClass);
          query.add(subject, table); // Just add the subject and table to the query.
        }
        else
          throw new UnanswerableException("No type matches (yet)");
        continue;
      }
     
      Resource prop = (Resource) configModel.getRDFNode(predicate);
      if (!prop2col.containsKey(prop))
        throw new InconsistentException("Unknown predicate: " + triple);

      /* Domain / Range checks -- subjects have types specific to tables, objects are literals */
      checkClasses(subject, prop.getProperty(RDFS.domain).getResource(), nodeToClass);
      checkClasses(object, RDFS.Literal, nodeToClass);
     
View Full Code Here


      return;
    }
   
    Resource existingClass = (Resource) nodeToClass.get(node);
    if (!existingClass.equals(aClass))
      throw new InconsistentException("Inconsistent classes for " + node +
          ": both " + existingClass + " and " + aClass);
  }
View Full Code Here

        if (subj != null)
        {
          if (!table.isValidSubject(subj))
          {
            log.warn("Table: " + table.getName());
            throw new InconsistentException("Invalid subject for table: " + subj);
          }
          Map<String, Object> attvals = table.nodeToKeys(subj);
         
          for (String col: attvals.keySet())
          {
            Object val = attvals.get(col);
            where.add(name(subject) + "." + col + " = '" + val + "'");
          }
        }
      }
      else if (subj != null)
      {
        throw new InconsistentException("Concrete subject given for table with no primary keys: " + subj);
      }
    }
   
    for (Iterator i = triples.iterator(); i.hasNext();)
    {
View Full Code Here

TOP

Related Classes of com.hp.hpl.squirrelrdf.querymap.exceptions.InconsistentException

Copyright © 2018 www.massapicom. 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.