Class: GlyDevKit::GlyCosmosRdfNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/glydevkit/gly_cosmos_rdf_namespace.rb

Constant Summary collapse

GLYTOUCAN =
RDF::Vocabulary.new("http://rdf.glycoinfo.org/glycan/")
GLYCAN =
RDF::Vocabulary.new("http://purl.jp/bio/12/glyco/glycan#")
RDF =
RDF::Vocabulary.new("http://www.w3.org/1999/02/22-rdf-syntax-ns#")

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.anomeric_status(status) ⇒ {RDF::URI}

Returns the RDF URI for the given anomeric status.

Parameters:

  • status (String)

    The anomeric status.

Returns:

  • ({RDF::URI})

    The RDF URI for the anomeric status.



46
47
48
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 46

def self.anomeric_status(status)
  return GLYCAN[status]
end

.archetype{RDF::URI}

Returns the RDF URI for the archetype class.

Returns:

  • ({RDF::URI})

    The RDF URI for the archetype class.



96
97
98
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 96

def self.archetype
  return GLYCAN["Archetype"]
end

.has_anomer{RDF::URI}

Returns the RDF URI for the property indicating an anomer.

Returns:

  • ({RDF::URI})

    The RDF URI for the property.



75
76
77
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 75

def self.has_anomer
  return GLYCAN["has_anomer"]
end

.has_archetype{RDF::URI}

Returns the RDF URI for the property indicating an archetype.

Returns:

  • ({RDF::URI})

    The RDF URI for the property.



68
69
70
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 68

def self.has_archetype
  return GLYCAN["has_archetype"]
end

.has_reducing_end_monosaccharide_residue{RDF::URI}

Returns the RDF URI for the property indicating a reducing end monosaccharide residue.

Returns:

  • ({RDF::URI})

    The RDF URI for the property.



38
39
40
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 38

def self.has_reducing_end_monosaccharide_residue
  return GLYCAN["has_reducing_end_monosaccharide_residue"]
end

.has_ring_type{RDF::URI}

Returns the RDF URI for the property indicating a ring type.

Returns:

  • ({RDF::URI})

    The RDF URI for the property.



61
62
63
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 61

def self.has_ring_type
  return GLYCAN["has_ring_type"]
end

.is_archetype_of{RDF::URI}

Returns the RDF URI for the property indicating that something is an archetype of another entity.

Returns:

  • ({RDF::URI})

    The RDF URI for the property.



82
83
84
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 82

def self.is_archetype_of
  return GLYCAN["is_archetype_of"]
end

.red_end_ms(id) ⇒ {RDF::URI}

Returns the RDF URI for the reducing end monosaccharide of a saccharide with the given ID.

Parameters:

  • id (String)

    The identifier of the saccharide.

Returns:

  • ({RDF::URI})

    The RDF URI for the reducing end monosaccharide.

Raises:

  • (ArgumentError)

    If the id is nil or empty.



28
29
30
31
32
33
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 28

def self.red_end_ms(id)
  if id.nil? || id.empty?
    raise ArgumentError, "please assign 'id'"
  end
  return GLYTOUCAN[id + "/red_end_ms"]
end

.ring_status(status) ⇒ {RDF::URI}

Returns the RDF URI for the given ring status.

Parameters:

  • status (String)

    The ring status.

Returns:

  • ({RDF::URI})

    The RDF URI for the ring status.



54
55
56
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 54

def self.ring_status(status)
  return GLYCAN[status]
end

.saccharide(id) ⇒ RDF::URI

Returns the RDF URI for a saccharide with the given ID.

Parameters:

  • id (String)

    The identifier of the saccharide.

Returns:

  • (RDF::URI)

    The RDF URI for the saccharide.

Raises:

  • (ArgumentError)

    If the id is nil or empty.



16
17
18
19
20
21
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 16

def self.saccharide(id)
  if id.nil? || id.empty?
    raise ArgumentError, "please assign 'id'"
  end
  return GLYTOUCAN[id]
end

.type{RDF::URI}

Returns the RDF URI for the RDF type property.

Returns:

  • ({RDF::URI})

    The RDF URI for the type property.



89
90
91
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 89

def self.type
  return RDF["type"]
end

Instance Method Details

#has_message{RDF::URI}

Returns the RDF URI for the property indicating a message in the archetype logs.

Returns:

  • ({RDF::URI})

    The RDF URI for the archetype logs class.



114
115
116
# File 'lib/glydevkit/gly_cosmos_rdf_namespace.rb', line 114

def has_message
  RDF::URI.new("http://rdf.glycoinfo.org/glycan/archetype/logs#has_message")
end