Class: When::TM::OrdinalEra

Inherits:
Object show all
Includes:
Navigation, Separation
Defined in:
lib/when_exe/tmreference.rb

Overview

順序時間参照系

see gml schema

Constant Summary collapse

HashProperty =
[:label, :begin, :end]

Constants included from Parts::Resource

Parts::Resource::ConstList, Parts::Resource::ConstTypes, Parts::Resource::IRIDecode, Parts::Resource::IRIDecodeTable, Parts::Resource::IRIEncode, Parts::Resource::IRIEncodeTable, Parts::Resource::IRIHeader, Parts::Resource::LabelProperty

Constants included from Namespace

Namespace::DC, Namespace::DCQ, Namespace::DCT, Namespace::FOAF, Namespace::OWL, Namespace::RDF, Namespace::RDFC, Namespace::RDFS, Namespace::RSS, Namespace::XSD

Instance Attribute Summary collapse

Attributes inherited from BasicTypes::Object

#label

Attributes included from Parts::Resource

#_pool, #child, #keys, #locale, #namespace

Instance Method Summary collapse

Methods included from Separation

#distance, #length

Methods included from Parts::Resource

#[], _abbreviation_to_iri, _decode, _encode, _extract_prefix, _instance, _instantiate, _parse, _path_with_prefix, _replace_tags, _setup_, _setup_info, _simplify_path, base_uri, #each, #enum_for, #hierarchy, #included?, #iri, #leaf?, #m17n, #map, #parent, #registered?, root_dir

Methods included from Parts::Resource::Pool

#[], #[]=, #_pool, #_setup_, #pool_keys

Methods included from Parts::Resource::Synchronize

#synchronize

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (private)

Note:

When::TM::OrdinalEra で定義されていないメソッドは 処理を @begin (type: When::TM::TemporalPosition) に委譲する

その他のメソッド



964
965
966
967
968
969
970
971
# File 'lib/when_exe/tmreference.rb', line 964

def method_missing(name, *args, &block)
  self.class.module_eval %Q{
    def #{name}(*args, &block)
      @begin.send("#{name}", *args, &block)
    end
  } unless When::Parts::MethodCash.escape(name)
  @begin.send(name, *args, &block)
end

Instance Attribute Details

#beginWhen::BasicTypes::DateTime (readonly)

この順序年代が始まる時点

Date at which the ordinal era began



901
902
903
# File 'lib/when_exe/tmreference.rb', line 901

def begin
  @begin
end

Instance Method Details

#^(other) ⇒ Object

When::TM::TemporalPosition ^ When::TM::OrdinalEra で呼ばれる



927
928
929
# File 'lib/when_exe/tmreference.rb', line 927

def ^(other)
  include?(other) ? self : nil
end

#endWhen::BasicTypes::DateTime

この順序年代が終わる時点

Date at which the ordinal era ended



909
910
911
# File 'lib/when_exe/tmreference.rb', line 909

def end
  @end || (@_pool['.->'] ? @_pool['.->'].begin : nil)
end

#groupWhen::TM::OrdinalEra?

この順序年代が属する上位順序年代 (relation - Composition)

Ordinal era that contains this ordinal era

Returns:



891
892
893
# File 'lib/when_exe/tmreference.rb', line 891

def group
  _pool['..'].kind_of?(String)? nil : _pool['..']
end

#include?(other) ⇒ Boolean

日時が属するか?

Parameters:

Returns:

  • (Boolean)
    true - 属する
    false - 属さない


921
922
923
# File 'lib/when_exe/tmreference.rb', line 921

def include?(other)
  self.begin <= other && other < self.end
end

#systemWhen::TM::OrdinalReferenceSystem?

この順序年代が属する順序時間参照系 (relation - Structure)

Ordinal reference system that contains this ordinal era



881
882
883
# File 'lib/when_exe/tmreference.rb', line 881

def system
  _pool['..'].kind_of?(String) ? _pool['..'] : nil
end