Module: GRel
- Defined in:
- lib/grel.rb,
lib/grel/ql.rb,
lib/grel/base.rb
Defined Under Namespace
Modules: QL Classes: Base, BlankId, Debugger, NonNegativeInteger, ValidationError
Constant Summary collapse
- DEBUG =
ENV["GREL_DEBUG"] || false
- NAMESPACE =
Common namespace for all URIs generated by GRel.
"http://grel.org/vocabulary#"
- ID_REGEX =
Used to match valid ID strings
/^\@id\((\w+)\)$/
- NIL =
A URI denoting a ruby nil value
"\"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil\""
- BNODE =
"BNODE"
Instance Method Summary collapse
-
#graph(name = 'http://localhost:5822/', options = {}) ⇒ Object
Creates a new graph object connected to the provided Stardog server.
Instance Method Details
#graph(name = 'http://localhost:5822/', options = {}) ⇒ Object
Creates a new graph object connected to the provided Stardog server. Arguments:
-
name : connection string. localhost:5822 by default.
-
options: hash of options:
+ user : user name for authentication + password : password for authentication + validate : should validate integrity constraints + db : name of the db to use
Returns the newly built graph object.
97 98 99 100 101 102 103 104 |
# File 'lib/grel.rb', line 97 def graph(name='http://localhost:5822/', = {}) [:user] ||= "admin" [:password] ||= "admin" [:validate] ||= false g = Base.new(name, ) g.with_db([:db]) if([:db]) g end |