Class: RDF::Literal::DayTimeDuration

Inherits:
RDF::Literal show all
Defined in:
vendor/bundler/ruby/2.5.0/bundler/gems/rdf-xsd-0489489cebb4/lib/rdf/xsd/duration.rb

Overview

A DayTimeDuration literal.

dayTimeDuration is a datatype ·derived· from duration by restricting its ·lexical representations· to instances of dayTimeDurationLexicalRep. The ·value space· of dayTimeDuration is therefore that of duration restricted to those whose ·months· property is 0. This results in a duration datatype which is totally ordered.

Constant Summary collapse

DATATYPE =
XSD.dayTimeDuration
GRAMMAR =
%r(\A
  (?<si>-)?
  P(?:(?:(?:(?<da>\d+)D)
      )
      (?:T(?:(?:(?:(?<hr>\d+)H)(?:(?<mi>\d+)M)?(?<se>\d+(?:\.\d+)?S)?)
          |  (?:(?:(?<mi>\d+)M)(?:(?<se>\d+(?:\.\d+)?)S)?)
          |  (?:(?<se>\d+(?:\.\d+)?)S)
          )
      )?
   |(?:T(?:(?:(?:(?<hr>\d+)H)(?:(?<mi>\d+)M)?(?<se>\d+(?:\.\d+)?S)?)
        |  (?:(?:(?<mi>\d+)M)(?:(?<se>\d+(?:\.\d+)?)S)?)
        |   (?:(?<se>\d+(?:\.\d+)?)S)
        )
    )
   )
\z)x.freeze

Constants inherited from RDF::Literal

FALSE, TRUE, ZERO

Instance Attribute Summary

Attributes inherited from RDF::Literal

#datatype, #language

Method Summary

Methods inherited from RDF::Literal

#==, #canonicalize!, #compatible?, #comperable_datatype?, #eql?, #escape, #has_datatype?, #has_language?, #hash, #humanize, #initialize, #inspect, #literal?, #method_missing, #object, #plain?, #respond_to_missing?, #simple?, #squish, #squish!, #to_s, #valid?, #validate!, #value, #value_hash

Methods included from Term

#<=>, #==, #aggregate?, #compatible?, #eql?, #escape, #evaluate, #ndvars, #term?, #to_base, #to_term, #vars

Methods included from SPARQL::Algebra::Expression

cast, #constant?, #evaluate, extension, extensions, for, #invalid?, new, #node?, open, #optimize, parse, register_extension, #to_sxp_bin, #valid?, #validate!, #variable?

Methods included from Value

#anonymous?, #canonicalize, #canonicalize!, #constant?, #graph?, #inspect, #inspect!, #invalid?, #iri?, #list?, #literal?, #node?, #resource?, #start_with?, #statement?, #term?, #to_nquads, #to_ntriples, #to_rdf, #to_term, #type_error, #uri?, #valid?, #validate!, #variable?

Constructor Details

This class inherits a constructor from RDF::Literal

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RDF::Literal