Class: ArchivalObject

Inherits:
Sequel::Model
  • Object
show all
Includes:
ASModel, Agents, ArchivalObjectSeries, AutoGenerator, ComponentsAddChildren, Dates, Events, Extents, ExternalDocuments, ExternalIDs, Instances, MapToAspaceContainer, Notes, Publishable, ReindexTopContainers, RightsRestrictionNotes, RightsStatements, Subjects, TreeNodes
Defined in:
backend/app/model/archival_object.rb

Constant Summary

Constant Summary

Constants included from RightsRestrictionNotes

RightsRestrictionNotes::RESTRICTION_NOTE_TYPES

Instance Method Summary (collapse)

Methods included from MapToAspaceContainer

included, mapper_to_aspace_json, mapper_to_managed_container, #update_from_json

Methods included from RightsRestrictionNotes

included, #update_from_json

Methods included from ArchivalObjectSeries

#has_series_specific_fields?, #series, #topmost_archival_object

Methods included from ReindexTopContainers

#delete, #reindex_top_containers, #reindex_top_containers_by_any_means_necessary, #update_from_json, #update_position_only

Methods included from Publishable

db_value_for, included

Methods included from Events

included

Methods included from ComponentsAddChildren

#add_children, included

Methods included from ExternalIDs

included

Methods included from Notes

included, #persistent_id_context, #update_from_json

Methods included from AutoGenerator

included, #update_from_json

Methods included from TreeNodes

#absolute_position, #children, #has_children?, included, #order_siblings, #set_position_in_list, #set_root, #siblings, #transfer_to_repository, #trigger_index_of_child_nodes, #update_from_json, #update_position_only

Methods included from Agents

included

Methods included from Instances

#eagerly_load!, included

Methods included from RightsStatements

included

Methods included from ExternalDocuments

included

Methods included from Dates

included

Methods included from Extents

included

Methods included from Subjects

included

Methods included from ASModel

all_models, included, update_publish_flag, update_suppressed_flag

Methods included from JSONModel

JSONModel, #JSONModel, add_error_handler, all, allow_unmapped_enum_value, backend_url, client_mode?, custom_validations, destroy_model, enum_default_value, enum_values, handle_error, init, load_schema, #models, models, parse_jsonmodel_ref, parse_reference, repository, repository_for, schema_src, set_repository, strict_mode, strict_mode?, with_repository

Instance Method Details

- (Object) validate



62
63
64
65
66
67
# File 'backend/app/model/archival_object.rb', line 62

def validate
  validates_unique([:root_record_id, :ref_id],
                   :message => "An Archival Object Ref ID must be unique to its resource")
  map_validation_to_json_property([:root_record_id, :ref_id], :ref_id)
  super
end