Class: ActiveFedora::Aggregation::ListSource
- Defined in:
- lib/active_fedora/aggregation/list_source.rb
Constant Summary
Constants included from ActiveFedora::AttributeMethods
ActiveFedora::AttributeMethods::AttrNames, ActiveFedora::AttributeMethods::RESTRICTED_CLASS_METHODS
Constants included from ActiveFedora::AutosaveAssociation
ActiveFedora::AutosaveAssociation::ASSOCIATION_TYPES
Constants included from Callbacks
Instance Attribute Summary collapse
- 
  
    
      #ordered_self  ⇒ Array<ListNode> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Ordered list representation of proxies in graph. 
Attributes included from ActiveFedora::Associations
Instance Method Summary collapse
- #changed? ⇒ Boolean
- 
  
    
      #clear_changed_attributes  ⇒ Object 
    
    
  
  
  
  
  
  
  deprecated
  
  
    Deprecated. use #changes_applied instead 
- 
  
    
      #create_date  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Not useful and slows down indexing. 
- 
  
    
      #has_model  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Not useful, slows down indexing. 
- 
  
    
      #modified_date  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Not useful, slows down indexing. 
- #save(*args) ⇒ Object
- 
  
    
      #serializable_hash(_options = nil)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Serializing head/tail/nodes slows things down CONSIDERABLY, and is not useful. 
- #to_solr(solr_doc = {}) ⇒ Object
Methods included from LdpCache::ClassMethods
Methods included from Querying
#default_sort_params, extended
Methods included from BaseExtension
Methods included from LoadableFromJson
Methods included from Versionable
#create_version, #has_versions?, #model_type, #restore_version, #versions
Methods included from ActiveFedora::Attributes
#[], #[]=, #attribute_names, #attributes, #local_attributes
Methods included from ActiveFedora::AttributeMethods
#[], #[]=, #attribute_for_inspect, #attribute_names, #attribute_present?, #attributes, #has_attribute?
Methods included from Reflection
add_reflection, create, #reflections
Methods included from FedoraAttributes
Methods included from ActiveFedora::AttachedFiles
#add_file, #attach_file, #attached_files, #clear_attached_files, #contains_assertions, #declared_attached_files, #load_attached_files, #metadata_streams, #serialize_attached_files, #undeclared_files
Methods included from NestedAttributes
Methods included from ActiveFedora::AutosaveAssociation
#changed_for_autosave?, #destroyed_by_association, #destroyed_by_association=, #mark_for_destruction, #marked_for_destruction?, #reload
Methods included from ActiveFedora::Associations
#association, #clear_association_cache, #delete
Methods included from Validations
Methods included from Callbacks
Methods included from Scoping
#initialize_internals_callback, #populate_with_current_scope_attributes
Methods included from Indexing
#indexing_service, #update_index
Methods included from Persistence
#base_path_for_resource=, #delete, #destroy, #destroy!, #destroyed?, #eradicate, #new_record?, #persisted?, #save!, #update, #update!
Methods included from Identifiable
Methods included from Core
#freeze, #init_with_resource, #initialize, #inspect, #reload, #uri=
Methods included from Common
#<=>, #==, #etag, #freeze, #frozen?, #ldp_source, #readonly!, #readonly?
Methods included from ActiveFedora::AttributeAssignment
#assign_attributes, #attributes=
Instance Attribute Details
#ordered_self ⇒ Array<ListNode>
Ordered list representation of proxies in graph.
| 29 30 31 | # File 'lib/active_fedora/aggregation/list_source.rb', line 29 def ordered_self @ordered_self ||= ordered_list_factory.new(resource, head_subject, tail_subject) end | 
Instance Method Details
#changed? ⇒ Boolean
| 23 24 25 | # File 'lib/active_fedora/aggregation/list_source.rb', line 23 def changed? super || ordered_self.changed? end | 
#clear_changed_attributes ⇒ Object
use #changes_applied instead
| 17 18 19 20 21 | # File 'lib/active_fedora/aggregation/list_source.rb', line 17 def clear_changed_attributes Deprecation.warn self.class, "#clear_changed_attributes is deprecated, use ActiveModel::Dirty#changes_applied instead." clear_changes_information end | 
#create_date ⇒ Object
Not useful and slows down indexing.
| 52 53 54 | # File 'lib/active_fedora/aggregation/list_source.rb', line 52 def create_date nil end | 
#has_model ⇒ Object
Not useful, slows down indexing.
| 62 63 64 | # File 'lib/active_fedora/aggregation/list_source.rb', line 62 def has_model ["ActiveFedora::Aggregation::ListSource"] end | 
#modified_date ⇒ Object
Not useful, slows down indexing.
| 57 58 59 | # File 'lib/active_fedora/aggregation/list_source.rb', line 57 def modified_date nil end | 
#save(*args) ⇒ Object
| 9 10 11 12 13 | # File 'lib/active_fedora/aggregation/list_source.rb', line 9 def save(*args) return true if has_unpersisted_proxy_for? || !changed? persist_ordered_self if ordered_self.changed? super end | 
#serializable_hash(_options = nil) ⇒ Object
This method is used by ActiveFedora::Base upstream for indexing, at github.com/samvera/active_fedora/blob/master/lib/active_fedora/indexing_service.rb.
Serializing head/tail/nodes slows things down CONSIDERABLY, and is not useful.
| 42 43 44 | # File 'lib/active_fedora/aggregation/list_source.rb', line 42 def serializable_hash( = nil) {} end | 
#to_solr(solr_doc = {}) ⇒ Object
| 46 47 48 49 | # File 'lib/active_fedora/aggregation/list_source.rb', line 46 def to_solr(solr_doc = {}) super.merge(ordered_targets_ssim: ordered_self.target_ids, proxy_in_ssi: ordered_self.proxy_in.to_s) end |