Class: DOWL::Person

Inherits:
DocObject show all
Defined in:
lib/dowl/ontology.rb

Instance Attribute Summary

Attributes inherited from DocObject

#resource, #schema

Instance Method Summary collapse

Methods inherited from DocObject

#get_literal

Constructor Details

#initialize(resource, schema) ⇒ Person

Returns a new instance of Person.



6
7
8
# File 'lib/dowl/ontology.rb', line 6

def initialize(resource, schema)
  super(resource, schema)
end

Instance Method Details

#<=>(other) ⇒ Object



22
23
24
# File 'lib/dowl/ontology.rb', line 22

def <=>(other)
  return name() <=> other.name()
end

#nameObject



14
15
16
17
18
19
20
# File 'lib/dowl/ontology.rb', line 14

def name()
  name = get_literal(DOWL::Namespaces::FOAF.name)
  if name == nil
    name = uri()
  end
  return name
end

#uriObject



10
11
12
# File 'lib/dowl/ontology.rb', line 10

def uri()
  return @resource.to_s
end