From 6811ac91f21a434fc7d967c11e1b20f33918c6ea Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 19 Mar 2012 22:07:29 -0400 Subject: v3: 3.2 branch is main (v3dv --> v3); dev (v3dv) branch directories removed * v3dv (3.2) "merged" into v3 (previously 3.1) (& removed) * conf/sisu/v3dv --> conf/sisu/v3 * data/sisu/v3dv --> data/sisu/v3 * lib/sisu/v3dv --> lib/sisu/v3 * bin/sisu* (v3dv references changed to v3) * (--dev modifier (superfluous for the time being) runs main v3 branch) --- lib/sisu/v3/dal_doc_objects.rb | 76 +++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'lib/sisu/v3/dal_doc_objects.rb') diff --git a/lib/sisu/v3/dal_doc_objects.rb b/lib/sisu/v3/dal_doc_objects.rb index 4e8b5c0f..e413993a 100644 --- a/lib/sisu/v3/dal_doc_objects.rb +++ b/lib/sisu/v3/dal_doc_objects.rb @@ -56,37 +56,37 @@ ** Description: document abstraction =end -module SiSU_document_structure +module SiSU_DAL_DocumentStructure class Extract def extract(h,o) obj=h ? h : o end end - class Object_metadata + class ObjectMetadata attr_accessor :is,:of,:tags,:obj,:digest def initialize @tags={} @is=@tmp=@digest=nil - @of='meta' + @of=:meta end def metadata(tags) of= @of #String, classification - group - is= 'meta' #String, classification - specific type + is= :meta #String, classification - specific type tags= tags || ((defined? o.tags) ? o.tags : {}) #String, metadata type/tag obj= nil @of,@is,@tags,@obj=of,is,tags,obj self end end - class Object_meta + class ObjectMeta attr_accessor :obj,:is,:of,:tag,:digest,:tmp def initialize @is=@obj=@tag=@digest=@digest=@tmp=nil - @of='meta' + @of=:meta end def metadata(h,o=nil) of= @of #String, classification - group - is= 'meta' #String, classification - specific type + is= :meta #String, classification - specific type tag= h[:tag] || ((defined? o.tag) ? o.tag : nil) #String, metadata type/tag obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use @@ -95,10 +95,10 @@ module SiSU_document_structure self end end - class Object_heading + class ObjectHeading attr_accessor :obj,:is,:tags,:of,:lv,:ln,:toc_,:name,:idx,:ocn,:odv,:osp,:node,:parent,:ocn_,:note_,:autonum_,:digest,:tmp def initialize - @of='para' + @of=:para @is=@obj=@lv=@ln=@toc_=@name=@idx=@size=@ocn=@odv=@osp=@node=@parent=@ocn_=@note_=@autonum_=@digest=@tmp=nil @tags=[] end @@ -135,7 +135,7 @@ module SiSU_document_structure h[:lv]=heading_lv(h[:ln]) end of= @of #String, classification - group - is= 'heading' #String, classification - specific type + is= :heading #String, classification - specific type name= h[:name] || ((defined? o.name) ? o.name : nil) #String, named object? tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content @@ -162,20 +162,20 @@ module SiSU_document_structure end def heading_insert(h,o=nil) heading(h,o=nil) - @is= 'heading_insert' #String, classification - specific type + @is= :heading_insert #String, classification - specific type self end end - class Object_para + class ObjectPara attr_accessor :obj,:is,:tags,:of,:name,:idx,:bullet_,:indent,:hang,:ocn,:odv,:osp,:parent,:note_,:image_,:ocn_,:digest,:tmp def initialize - @of='para' + @of=:para @is=@obj=@name=@idx=@bullet_=@indent=@hang=@size=@ocn=@odv=@osp=@parent=@note_=@image_=@ocn_=@digest=@tmp=nil @tags=[] end def paragraph(h,o=nil) of= @of #String, classification - group - is= 'para' #String, classification - specific type + is= :para #String, classification - specific type name= h[:name] || ((defined? o.name) ? o.name : nil) #String, named object? tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content @@ -199,7 +199,7 @@ module SiSU_document_structure end def docinfo(h,o=nil) of= @of #String, classification - group - is= 'docinfo' #String, classification - specific type + is= :docinfo #String, classification - specific type name= h[:name] || ((defined? o.name) ? o.name : nil) #String, named object? tags= h[:tags] || ((defined? o.tags) ? o.tags : nil) #Array, associated object tags, names if any obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content @@ -222,16 +222,16 @@ module SiSU_document_structure self end end - class Object_block_txt + class ObjectBlockTxt attr_accessor :obj,:is,:of,:tags,:idx,:ocn,:odv,:osp,:parent,:note_,:number_,:ocn_,:digest,:tmp def initialize - @of='block' + @of=:block @is=@obj=@idx=@ocn=@odv=@osp=@parent=@note_=@number_=@ocn_=@digest=@tmp=nil @tags=[] end def code(h,o=nil) of= @of #String, classification - group #alt 'code' - is= 'code' #String, classification - specific type + is= :code #String, classification - specific type tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided? @@ -251,7 +251,7 @@ module SiSU_document_structure end def block(h,o=nil) of= @of #String, classification - group - is= 'block' #String, classification - specific type + is= :block #String, classification - specific type tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided? @@ -270,7 +270,7 @@ module SiSU_document_structure end def group(h,o=nil) of= @of #String, classification - group - is= 'group' #String, classification - specific type + is= :group #String, classification - specific type tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided? @@ -289,7 +289,7 @@ module SiSU_document_structure end def alt(h,o=nil) #see block of= @of #String, classification - group - is= 'alt' #String, classification - specific type + is= :alt #String, classification - specific type tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided? @@ -308,7 +308,7 @@ module SiSU_document_structure end def verse(h,o=nil) #part of poem decide how you deal with this of= @of #String, classification - group - is= 'verse' #String, classification - specific type + is= :verse #String, classification - specific type tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided? @@ -326,16 +326,16 @@ module SiSU_document_structure self end end - class Object_table + class ObjectTable attr_accessor :obj,:is,:of,:lv,:tags,:name,:idx,:indent,:hang,:size,:ocn,:number,:head_,:cols,:widths,:odv,:osp,:parent,:note_,:ocn_,:digest,:tmp def initialize - @of='block' + @of=:block @is=@obj=@lv=@name=@idx=@indent=@hang=@size=@ocn,@number,@head_,@cols,@widths=@odv=@osp=@parent=@note_=@ocn_=@digest=@tmp=nil @tags=[] end def table(h,o=nil) of= @of #String, classification - group - is= 'table' #String, classification - specific type + is= :table #String, classification - specific type tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any cols= h[:cols] || ((defined? o.cols) ? o.cols : nil) widths= h[:widths] || ((defined? o.widths) ? o.widths : nil) @@ -356,16 +356,16 @@ module SiSU_document_structure self end end - class Object_image + class ObjectImage attr_accessor :obj,:is,:of,:lv,:idx,:size,:ocn,:parent,:note_,:ocn_,:digest,:tmp def initialize - @of='image' + @of=:image @is=@obj=@lv=@idx=@size=@ocn=@parent=@note_=@ocn_=@tmp=@digest=nil @tags=[] end def image(h,o=nil) #not yet used, and what of a paragraph containing several images, consider of= @of #String, classification - group - is= 'image' #String, classification - specific type + is= :image #String, classification - specific type tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content size= h[:size] || ((defined? o.size) ? o.size : nil) @@ -384,15 +384,15 @@ module SiSU_document_structure self end end - class Object_structure + class ObjectStructure attr_accessor :obj,:tag,:node,:lv,:ln,:status,:is,:of,:tmp def initialize - @of='structure' + @of=:structure @is=@obj=@node=@lv=@ln=@status=@tmp=nil end def xml_dom(h,o=nil) of= @of #String, classification - group - is= 'xml_dom' #String, classification - specific type + is= :xml_dom #String, classification - specific type obj= h[:obj] || ((defined? o.obj) ? o.obj : '') #String, text content lv= h[:lv] || ((defined? o.lv) ? o.lv : nil) #Alpha-numeric, document structure as used in markup, A-C then 1-6 ln= h[:ln] || ((defined? o.ln) ? o.ln : nil) #Integer, document structure level, for convenience in processing 1-9 @@ -403,30 +403,30 @@ module SiSU_document_structure self end end - class Object_comment + class ObjectComment attr_accessor :obj,:is,:of,:tmp def initialize - @of='comment' + @of=:comment @is=@obj=@tmp=nil end def comment(h,o=nil) of= @of #String, classification - group - is= 'comment' #String, classification - specific type + is= :comment #String, classification - specific type obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use @of,@is,@obj,@tmp=of,is,obj,tmp self end end - class Object_layout + class ObjectLayout attr_accessor :obj,:is,:of,:tmp def initialize - @of='layout' + @of=:layout @is=@obj=@tmp=nil end def break(h,o=nil) #decide how to deal with, perhaps no obj? of= @of #String, classification - group - is= 'break' #String, classification - specific type + is= :break #String, classification - specific type obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use @of,@is,@obj,@tmp=of,is,obj,tmp @@ -434,7 +434,7 @@ module SiSU_document_structure end def insert(h,o=nil) #decide how to deal with, could mimic paragraph? of= @of #String, classification - group - is= 'insert' #String, classification - specific type + is= :insert #String, classification - specific type obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use @of,@is,@obj,@tmp=of,is,obj,tmp -- cgit v1.2.3