Module: CaTissue::Annotation::Importer
- Includes:
- Jinx::Importer
- Defined in:
- lib/catissue/annotation/importer.rb
Overview
This Annotation Importer module extends the standard Jinx::Importer
to import annotation classes.
Instance Attribute Summary collapse
-
#annotation_classes ⇒ <Metadata>
readonly
This module’s annotation classes.
-
#group ⇒ String
readonly
The group short name.
-
#proxy ⇒ ProxyClass
readonly
The annotation proxy class.
-
#record_entry_class ⇒ ProxyClass
readonly
The hook-annotation association class, or nil for 1.1.x caTissue.
-
#record_entry_hook_writer ⇒ Symbol
readonly
The #record_entry_class hook writer method, or nil for 1.1.x caTissue.
Instance Method Summary collapse
- #hook ⇒ ProxyClass#hook
-
#initialize_annotation(hook, opts) {|proxy| ... } ⇒ Object
Builds this annotation module.
-
#persistence_service ⇒ CaRuby::PersistenceService
This module’s application service.
Instance Attribute Details
#annotation_classes ⇒ <Metadata> (readonly)
Returns this module’s annotation classes.
16 17 18 |
# File 'lib/catissue/annotation/importer.rb', line 16 def annotation_classes @annotation_classes end |
#group ⇒ String (readonly)
Returns the group short name.
22 23 24 |
# File 'lib/catissue/annotation/importer.rb', line 22 def group @group end |
#proxy ⇒ ProxyClass (readonly)
Returns the annotation proxy class.
19 20 21 |
# File 'lib/catissue/annotation/importer.rb', line 19 def proxy @proxy end |
#record_entry_class ⇒ ProxyClass (readonly)
Returns the hook-annotation association class, or nil for 1.1.x caTissue.
25 26 27 |
# File 'lib/catissue/annotation/importer.rb', line 25 def record_entry_class @record_entry_class end |
#record_entry_hook_writer ⇒ Symbol (readonly)
Returns the #record_entry_class hook writer method, or nil for 1.1.x caTissue.
28 29 30 |
# File 'lib/catissue/annotation/importer.rb', line 28 def record_entry_hook_writer @record_entry_hook_writer end |
Instance Method Details
#hook ⇒ ProxyClass#hook
66 67 68 |
# File 'lib/catissue/annotation/importer.rb', line 66 def hook @proxy.hook end |
#initialize_annotation(hook, opts) {|proxy| ... } ⇒ Object
Builds this annotation module. This method intended to be called only by Metadata.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/catissue/annotation/importer.rb', line 43 def initialize_annotation(hook, opts) logger.debug { "Building #{hook.qp} annotation #{qp}..." } # Make this module an annotation-enabled Jinx::Importer (hook, opts) @svc_nm = opts[:service] @group = opts[:group] @annotation_classes = [] dei = hook.de_integration_proxy_class if dei then import_record_entry_class(dei, hook) pxy_nm = dei.name.demodulize end @proxy = import_proxy(hook, pxy_nm) # Make the hook => proxy reference yield @proxy # Fill out the dependency hierarchy. @proxy.build_annotation_dependency_hierarchy # Print all known annotation classes. @annotation_classes.each { |klass| logger.info(klass.pp_s) } logger.debug { "Built #{hook.qp} annotation #{qp}." } end |