Class: TaliaCore::SourceTypes::DummySource
- Inherits:
-
TaliaCore::Source
- Object
- ActiveRecord::Base
- ActiveSource
- TaliaCore::Source
- TaliaCore::SourceTypes::DummySource
- Defined in:
- lib/talia_core/source_types/dummy_source.rb
Overview
Dummy source class. This will be created by some mechanisms that need to create a relation to a not-yet-existing source. The DummySource should only exist temporarily, if some are found inside the data store it may be a sign of an inconsistent or not completely initialized store.
Instance Attribute Summary
Attributes inherited from TaliaCore::Source
Class Method Summary collapse
-
.make_real(klass) ⇒ Object
Converts the current source into one with a “real” klass.
Methods inherited from TaliaCore::Source
#==, #associated?, find_or_instantiate_by_uri, #grouped_direct_predicates, #grouped_predicates_attributes, groups_by_property, #label, #labels, #local, normalize_uri, #normalize_uri, #predicate_changed?, #predicate_objects, #primary_source, #primary_source=, #save_predicates_attributes, #titleized, #uri
Methods inherited from ActiveSource
#[], #[]=, #add_additional_rdf_types, #add_semantic_attributes, #attach_files, #data, #db_attr?, #direct_predicates, #inverse, #inverse_predicates, #predicate, #predicate_replace, #predicate_set, #predicate_set_uniq, #rdf_selftype, #rewrite_attributes, #rewrite_attributes!, #short_uri, #to_rdf, #to_s, #to_uri, #to_xml, #update_attributes, #update_attributes!, #update_attributes_orig, #update_attributes_orig!, #update_source, #value_for, #write_predicate_direct
Methods included from ActiveSourceParts::ClassMethods
#additional_rdf_types, #create_from_xml, #create_multi_from, #create_source, #db_attr?, #exists?, #expand_uri, #new, #paginate, #rewrite, #split_attribute_hash, #update, #value_for
Methods included from ActiveSourceParts::Finders
#count, #find, #find_by_partial_local, #find_by_partial_uri, #find_by_uri_token
Methods included from ActiveSourceParts::SqlHelper
#default_inv_joins, #default_joins, #props_join, #sources_join
Methods included from ActiveSourceParts::PredicateHandler::ClassMethods
Methods included from TaliaUtil::Progressable
#progressor, #progressor=, #run_with_progress
Methods included from ActiveSourceParts::Rdf
#autosave_rdf=, #autosave_rdf?, #create_rdf, #my_rdf, #to_rdf
Methods included from ActiveSourceParts::PredicateHandler
#each_cached_wrapper, #get_objects_on, #has_type?, #inject_predicate, #reset!, #save_wrappers, #types
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class TaliaCore::Source
Class Method Details
.make_real(klass) ⇒ Object
Converts the current source into one with a “real” klass. Returns the new, converted sourc
10 11 12 13 14 15 16 17 |
# File 'lib/talia_core/source_types/dummy_source.rb', line 10 def self.make_real(klass) assit_kind_of(Class, klass) self['type'] = klass.name save! new_src = ActiveSource.find(uri) assit_kind_of(klass, new_src) new_src end |