org.ilrt.inkling.api
Class SQLNode

java.lang.Object
  |
  +--org.ilrt.inkling.api.Node
        |
        +--org.ilrt.inkling.api.SQLNode

public class SQLNode
extends Node

Extension of Node required to convert quirks of SQL layout to useful
objects, for example _: indicating a bnode and " indicating a literal

SQLGraph sq = new SQLGraph();
sq.setdb(db);
sq.setDriver("com.mysql.jdbc.Driver");
Graph gr = new Graph(null, uri, Util.RDFXML);
gr.load();
sq.add(gr);

java.sql.ResultSet r1=sq.askSquish(query);
org.ilrt.inkling.query.ResultSet r2=(org.ilrt.inkling.query.ResultSet)r1;

SQLNode mbsh1=(Node)r2.getSQLNode("mbsh1");

This will return an SQLNode with bnode and literal/resource information, 
and provenance if source is switched on @@checkme


Fields inherited from class org.ilrt.inkling.api.Node
isbnode, isresource
 
Constructor Summary
SQLNode()
           
SQLNode(java.lang.String content)
          create an SQL node, deriving its type from the String
 
Method Summary
 java.lang.String getContent()
          access method, stripping the " from the data
 java.lang.String toString()
          Access method
 
Methods inherited from class org.ilrt.inkling.api.Node
equals, getBlank, getBlank, getGraph, getID, getLiteral, getLiteral, getObjects, getObjects, getPredicates, getPredicates, getResource, getResource, getSubjects, getSubjects, inspect, setContent, setGraph, setID, sha1
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLNode

public SQLNode()

SQLNode

public SQLNode(java.lang.String content)
create an SQL node, deriving its type from the String
Method Detail

getContent

public java.lang.String getContent()
access method, stripping the " from the data
Overrides:
getContent in class Node

toString

public java.lang.String toString()
Access method
Overrides:
toString in class Node