Redland RDF Language Bindings - Ruby RDoc - Module: Redland::Util

### Home Classes Methods

### In Files

- rdf/redland/util.rb

### Methods

- #get_node_array
- #get_statement_array
- #is_blank?
- #is_literal?
- #is_resource?

### Files

- Makefile
- Makefile
- Makefile
- Makefile

### Class/Module Index

Quicksearch

- Redland
- Redland::BNode
- Redland::ContextParser
- Redland::FileStore
- Redland::HashOpen
- Redland::HashStore
- Redland::Literal
- Redland::MemoryStore
- Redland::MergedModel
- Redland::Model
- Redland::Namespace
- Redland::Node
- Redland::NodeIterator
- Redland::NodeTypeError
- Redland::OWL
- Redland::Parser
- Redland::Query
- Redland::QueryResults
- Redland::RDFS
- Redland::RedlandError
- Redland::Resource
- Redland::Serializer
- Redland::Statement
- Redland::Stream
- Redland::TripleStore
- Redland::Uri
- Redland::Util
- Redland::World
- DC
- FOAF

No matching classes.

# Redland::Util

### Public Instance Methods

get_node_array(node_iterator) click to toggle source

Given an Iterator, returns an array of all Nodes beyond it including this one

    # File rdf/redland/util.rb, line 22
    def get_node_array(node_iterator)
      node_array = []
      while not node_iterator.end?
        node_array << node_iterator.current
        node_iterator.next
      end
      return node_array
    end

get_statement_array(stream) click to toggle source

Given an Stream, returns an array of all Statements beyond it including this one

    # File rdf/redland/util.rb, line 33
    def get_statement_array(stream)
      statement_array = []
      while not stream.end?
        statement_array << stream.current
        stream.next
      end
      return statement_array
    end

is_blank?(node) click to toggle source

Return true if node is a blank node

    # File rdf/redland/util.rb, line 15
    def is_blank?(node)
      return (Redland.librdf_node_is_blank(node) !=0)

    end

is_literal?(node) click to toggle source

Return true if node is a literal

    # File rdf/redland/util.rb, line 5
    def is_literal?(node)
      return (Redland.librdf_node_is_literal(node) !=0)
    end

is_resource?(node) click to toggle source

Return true if node is a resource with a URI

    # File rdf/redland/util.rb, line 10
    def is_resource?(node)
      return (Redland.librdf_node_is_resource(node) !=0)
    end

Go to Redland Home - Language Bindings Home - Ruby API Home

(C) Copyright 2004-2013 Dave Beckett, (C) Copyright 2004-2005 University of Bristol