Module IqRdf
In: lib/iq_rdf.rb
lib/iq_rdf/version.rb
lib/iq_rdf/literal.rb
lib/iq_rdf/predicate.rb
lib/iq_rdf/literal/numeric.rb
lib/iq_rdf/literal/boolean.rb
lib/iq_rdf/literal/uri.rb
lib/iq_rdf/literal/string.rb
lib/iq_rdf/node.rb
lib/iq_rdf/namespace.rb
lib/iq_rdf/collection.rb
lib/iq_rdf/blank_node.rb
lib/iq_rdf/document.rb
lib/iq_rdf/uri.rb
lib/iq_rdf/predicate_namespace.rb

Copyright 2011 innoQ Deutschland GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Methods

Classes and Modules

Class IqRdf::BlankNode
Class IqRdf::Collection
Class IqRdf::Document
Class IqRdf::Literal
Class IqRdf::Namespace
Class IqRdf::Node
Class IqRdf::Predicate
Class IqRdf::PredicateNamespace
Class IqRdf::Uri

Constants

VERSION = "0.1.16"

Public Class methods

A shortcut so be able to define Subjects and Objects without specifing a namespace. When no namespace is given, Default will be used.

Example:

  IqRdf::sub.pred(IqRdf::obj) # => :sub :pred :obj.

Copyright 2011 innoQ Deutschland GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This evals the given block in the context of IqRdF. You can use this to be able to omit the "IqRdf::" in your turtle statements.

Example:

  IqRdf::use do
    mySubject Rdf::type Skos::Concept # => mySubject rdf:type skos:Concept
  end

But: There is an inconsistency in Ruby 1.8 and JRuby <= 1.4 (even with —1.9):

  module M; end
  M.module_eval {C = 1; self::D = 1}
  p defined? M::C # => nil (should be "constant" (and is in C Ruby 1.9))
  p defined? M::D # => "constant"

This means, that use will only work with Ruby 1.9. Feel free to change this if you know another way then module_eval to achieve this.

[Validate]