Exemple #1
0
 def json_object(self, recursive=True):
     obj = {
         "encrypted_datas": len(self.encrypted_datas),
         "encrypted_keys":  len(self.encrypted_keys),
     }
     if recursive:
         obj["encrypted_datas"] = JSONAble.safe(self.encrypted_datas)
         obj["encrypted_keys"] = JSONAble.safe(self.encrypted_keys)
     return obj
Exemple #2
0
 def json_object(self, recursive=True):
     obj = {
         "encrypted_datas": len(self.encrypted_datas),
         "encrypted_keys": len(self.encrypted_keys),
     }
     if recursive:
         obj["encrypted_datas"] = JSONAble.safe(self.encrypted_datas)
         obj["encrypted_keys"] = JSONAble.safe(self.encrypted_keys)
     return obj
Exemple #3
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path": self.internal_path,
         "renditions": len(self.renditions),
         "rm_document": (self.rm_document == None),
     }
     if recursive:
         obj["renditions"] = JSONAble.safe(self.renditions)
         obj["rm_document"] = JSONAble.safe(self.rm_document)
     return obj
Exemple #4
0
 def json_object(self, recursive=True):
     obj = {
         "epub_prefix": self.v_epub_prefix,
         "id":          self.v_id,
         "version":     self.v_version,
     }
     if recursive:
         obj["head"] = JSONAble.safe(self.head)
         obj["body"] = JSONAble.safe(self.body)
     return obj
Exemple #5
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path": self.internal_path,
         "renditions":    len(self.renditions),
         "rm_document":   (self.rm_document == None),
     }
     if recursive:
         obj["renditions"] = JSONAble.safe(self.renditions)
         obj["rm_document"] = JSONAble.safe(self.rm_document)
     return obj
Exemple #6
0
 def json_object(self, recursive=True):
     obj = {
         "epub_prefix": self.v_epub_prefix,
         "id": self.v_id,
         "version": self.v_version,
     }
     if recursive:
         obj["head"] = JSONAble.safe(self.head)
         obj["body"] = JSONAble.safe(self.body)
     return obj
Exemple #7
0
 def json_object(self, recursive=True):
     obj = {
         "dir": self.v_dir,
         "id": self.v_id,
         "xml_lang": self.v_xml_lang,
         "links": len(self.links),
         "metadata": len(self.metadata),
     }
     if recursive:
         obj["links"] = JSONAble.safe(self.links)
         obj["metadata"] = JSONAble.safe(self.metadata)
     return obj
Exemple #8
0
 def json_object(self, recursive=True):
     obj = {
         "manifestation": self.manifestation,
         "size": self.size,
         "path": self.path,
         "release_identifier": self.release_identifier,
         "unique_identifier": self.unique_identifier,
     }
     if recursive:
         obj["metadata"] = JSONAble.safe(self.metadata)
         obj["container"] = JSONAble.safe(self.container)
     return obj
Exemple #9
0
 def json_object(self, recursive=True):
     obj = {
         "dir":      self.v_dir,
         "id":       self.v_id,
         "xml_lang": self.v_xml_lang,
         "links":    len(self.links),
         "metadata": len(self.metadata),
     }
     if recursive:
         obj["links"] = JSONAble.safe(self.links)
         obj["metadata"] = JSONAble.safe(self.metadata)
     return obj
Exemple #10
0
 def json_object(self, recursive=True):
     obj = {
         "manifestation":      self.manifestation,
         "size":               self.size,
         "path":               self.path,
         "release_identifier": self.release_identifier,
         "unique_identifier":  self.unique_identifier,
     }
     if recursive:
         obj["metadata"] = JSONAble.safe(self.metadata)
         obj["container"] = JSONAble.safe(self.container)
     return obj
Exemple #11
0
 def json_object(self, recursive=True):
     obj = {
         "refinements": len(self.refinements),
     }
     if recursive:
         obj["refinements"] = JSONAble.safe(self.refinements)
     return obj
Exemple #12
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path": self.internal_path,
         "navs": len(self.navs),
     }
     if recursive:
         obj["navs"] = JSONAble.safe(self.navs)
     return obj
Exemple #13
0
 def json_object(self, recursive=True):
     obj = {
         "id": self.v_id,
         "items": len(self.items),
     }
     if recursive:
         obj["items"] = JSONAble.safe(self.items)
     return obj
Exemple #14
0
 def json_object(self, recursive=True):
     obj = {
         "id":    self.v_id,
         "items": len(self.items),
     }
     if recursive:
         obj["items"] = JSONAble.safe(self.items)
     return obj
Exemple #15
0
 def json_object(self, recursive=True):
     obj = {
         "id": self.v_id,
         "references": len(self.references),
     }
     if recursive:
         obj["references"] = JSONAble.safe(self.references)
     return obj
Exemple #16
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path": self.internal_path,
         "navs":          len(self.navs),
     }
     if recursive:
         obj["navs"] = JSONAble.safe(self.navs)
     return obj
Exemple #17
0
 def json_object(self, recursive=True):
     obj = {
         "id":         self.v_id,
         "references": len(self.references),
     }
     if recursive:
         obj["references"] = JSONAble.safe(self.references)
     return obj
Exemple #18
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path": self.internal_path,
         "epub_type":     self.v_epub_type,
         "locations":     len(self.locations),
     }
     if recursive:
         obj["locations"] = JSONAble.safe(self.locations)
     return obj
Exemple #19
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path": self.internal_path,
         "epub_type": self.v_epub_type,
         "locations": len(self.locations),
     }
     if recursive:
         obj["locations"] = JSONAble.safe(self.locations)
     return obj
Exemple #20
0
 def json_object(self, recursive=True):
     obj = {
         "epub_type": self.v_epub_type,
         "id": self.v_id,
         "children": len(self.children),
     }
     if recursive:
         obj["children"] = JSONAble.safe(self.children)
     return obj
Exemple #21
0
 def json_object(self, recursive=True):
     obj = {
         "epub_type": self.v_epub_type,
         "id":        self.v_id,
         "children":  len(self.children),
     }
     if recursive:
         obj["children"] = JSONAble.safe(self.children)
     return obj
Exemple #22
0
 def json_object(self, recursive=True):
     obj = {
         "id": self.v_id,
         "page_progression_direction": self.v_ppd,
         "toc": self.v_toc,
         "itemrefs": len(self.itemrefs),
     }
     if recursive:
         obj["itemrefs"] = JSONAble.safe(self.itemrefs)
     return obj
Exemple #23
0
 def json_object(self, recursive=True):
     obj = {
         "id": self.v_id,
         "page_progression_direction": self.v_ppd,
         "toc": self.v_toc,
         "itemrefs": len(self.itemrefs)
     }
     if recursive:
         obj["itemrefs"] = JSONAble.safe(self.itemrefs)
     return obj
Exemple #24
0
 def json_object(self, recursive=True):
     obj = {
         "full_path":            self.v_full_path,
         "media_type":           self.v_media_type,
         "rendition_accessmode": self.v_rendition_accessmode,
         "rendition_label":      self.v_rendition_label,
         "rendition_language":   self.v_rendition_language,
         "rendition_layout":     self.v_rendition_layout,
         "rendition_media":      self.v_rendition_media,
         "mo_documents":         len(self.mo_documents),
         "nav_document":         (self.nav_document == None),
         "ncx_toc":              (self.ncx_toc == None),
         "pac_document":         (self.pac_document == None),
     }
     if recursive:
         obj["mo_documents"] = JSONAble.safe(self.mo_documents)
         obj["nav_document"] = JSONAble.safe(self.nav_document)
         obj["ncx_toc"] = JSONAble.safe(self.ncx_toc)
         obj["pac_document"] = JSONAble.safe(self.pac_document)
     return obj
Exemple #25
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path": self.internal_path,
         "epub_type": self.v_epub_type,
         "id": self.v_id,
         "children": len(self.children),
         "title": self.title,
     }
     if recursive:
         obj["children"] = JSONAble.safe(self.children)
     return obj
Exemple #26
0
 def json_object(self, recursive=True):
     obj = {
         "full_path": self.v_full_path,
         "media_type": self.v_media_type,
         "rendition_accessmode": self.v_rendition_accessmode,
         "rendition_label": self.v_rendition_label,
         "rendition_language": self.v_rendition_language,
         "rendition_layout": self.v_rendition_layout,
         "rendition_media": self.v_rendition_media,
         "mo_documents": len(self.mo_documents),
         "nav_document": (self.nav_document == None),
         "ncx_toc": (self.ncx_toc == None),
         "pac_document": (self.pac_document == None),
     }
     if recursive:
         obj["mo_documents"] = JSONAble.safe(self.mo_documents)
         obj["nav_document"] = JSONAble.safe(self.nav_document)
         obj["ncx_toc"] = JSONAble.safe(self.ncx_toc)
         obj["pac_document"] = JSONAble.safe(self.pac_document)
     return obj
Exemple #27
0
 def json_object(self, recursive=True):
     obj = {
         "id": self.v_id,
         "playorder": self.v_play_order,
         "src": self.v_src,
         "text": self.v_text,
         "children": len(self.children),
     }
     if recursive:
         obj["children"] = JSONAble.safe(self.children)
     return obj
Exemple #28
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path": self.internal_path,
         "epub_type":     self.v_epub_type,
         "id":            self.v_id,
         "children":      len(self.children),
         "title":         self.title,
     }
     if recursive:
         obj["children"] = JSONAble.safe(self.children)
     return obj
Exemple #29
0
 def json_object(self, recursive=True):
     obj = {
         "id":        self.v_id,
         "playorder": self.v_play_order,
         "src":       self.v_src,
         "text":      self.v_text,
         "children":  len(self.children),
     }
     if recursive:
         obj["children"] = JSONAble.safe(self.children)
     return obj
Exemple #30
0
 def json_object(self, recursive=True):
     obj = {
         "content":     self.v_content,
         "id":          self.v_id,
         "name":        self.v_name,
         "tag":         self.v_tag,
         "text":        self.v_text,
         "refinements": len(self.refinements),
     }
     if recursive:
         obj["refinements"] = JSONAble.safe(self.refinements)
     return obj
Exemple #31
0
 def json_object(self, recursive=True):
     obj = {
         "fallback": self.v_fallback,
         "href": self.v_href,
         "id": self.v_id,
         "media_overlay": self.v_media_overlay,
         "media_type": self.v_media_type,
         "properties": self.v_properties,
         "refinements": len(self.refinements),
     }
     if recursive:
         obj["refinements"] = JSONAble.safe(self.refinements)
     return obj
Exemple #32
0
 def json_object(self, recursive=True):
     obj = {
         "fallback":      self.v_fallback,
         "href":          self.v_href,
         "id":            self.v_id,
         "media_overlay": self.v_media_overlay,
         "media_type":    self.v_media_type,
         "properties":    self.v_properties,
         "refinements":   len(self.refinements),
     }
     if recursive:
         obj["refinements"] = JSONAble.safe(self.refinements)
     return obj
Exemple #33
0
 def json_object(self, recursive=True):
     opf = {
         "dir": self.v_dir,
         "id": self.v_id,
         "prefix": self.v_prefix,
         "unique_identifier": self.v_unique_identifier,
         "version": self.v_version,
         "xml_lang": self.v_xml_lang,
         "metadata": (self.metadata == None),
         "manifest": (self.manifest == None),
         "spine": (self.spine == None),
         "guide": (self.guide == None),
         "bindings": (self.bindings == None),
         "collection": (self.collection == None),
     }
     if recursive:
         opf["metadata"] = JSONAble.safe(self.metadata)
         opf["manifest"] = JSONAble.safe(self.manifest)
         opf["spine"] = JSONAble.safe(self.spine)
         opf["guide"] = JSONAble.safe(self.guide)
         opf["bindings"] = None
         opf["collection"] = None
     return opf
Exemple #34
0
 def json_object(self, recursive=True):
     opf = {
         "dir":               self.v_dir,
         "id":                self.v_id,
         "prefix":            self.v_prefix,
         "unique_identifier": self.v_unique_identifier,
         "version":           self.v_version,
         "xml_lang":          self.v_xml_lang,
         "metadata":          (self.metadata == None),
         "manifest":          (self.manifest == None),
         "spine":             (self.spine == None),
         "guide":             (self.guide == None),
         "bindings":          (self.bindings == None),
         "collection":        (self.collection == None),
     }
     if recursive:
         opf["metadata"] = JSONAble.safe(self.metadata)
         opf["manifest"] = JSONAble.safe(self.manifest)
         opf["spine"] = JSONAble.safe(self.spine)
         opf["guide"] = JSONAble.safe(self.guide)
         opf["bindings"] = None
         opf["collection"] = None
     return opf
Exemple #35
0
 def json_object(self, recursive=True):
     obj = {
         "dir":         self.v_dir,
         "id":          self.v_id,
         "property":    self.v_property,
         "refines":     self.v_refines,
         "scheme":      self.v_scheme,
         "tag":         self.v_tag,
         "text":        self.v_text,
         "xml_lang":    self.v_xml_lang,
         "refinements": len(self.refinements),
     }
     if recursive:
         obj["refinements"] = JSONAble.safe(self.refinements)
     return obj
Exemple #36
0
 def json_object(self, recursive=True):
     obj = {
         "dir": self.v_dir,
         "id": self.v_id,
         "property": self.v_property,
         "refines": self.v_refines,
         "scheme": self.v_scheme,
         "tag": self.v_tag,
         "text": self.v_text,
         "xml_lang": self.v_xml_lang,
         "refinements": len(self.refinements),
     }
     if recursive:
         obj["refinements"] = JSONAble.safe(self.refinements)
     return obj
Exemple #37
0
 def json_object(self, recursive=True):
     obj = {
         "dir": self.v_dir,
         "id": self.v_id,
         "opf_event": self.v_opf_event,
         "opf_file_as": self.v_opf_file_as,
         "opf_role": self.v_opf_role,
         "opf_scheme": self.v_opf_scheme,
         "tag": self.v_tag,
         "text": self.v_text,
         "xml_lang": self.v_xml_lang,
         "refinements": len(self.refinements),
     }
     if recursive:
         obj["refinements"] = JSONAble.safe(self.refinements)
     return obj
Exemple #38
0
 def json_object(self, recursive=True):
     obj = {
         "dir": self.v_dir,
         "id": self.v_id,
         "opf_event": self.v_opf_event,
         "opf_file_as": self.v_opf_file_as,
         "opf_role": self.v_opf_role,
         "opf_scheme": self.v_opf_scheme,
         "tag": self.v_tag,
         "text": self.v_text,
         "xml_lang": self.v_xml_lang,
         "refinements": len(self.refinements),
     }
     if recursive:
         obj["refinements"] = JSONAble.safe(self.refinements)
     return obj
Exemple #39
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path": self.internal_path,
         "docauthor": self.v_docauthor,
         "doctitle": self.v_doctitle,
         "dtb_depth": self.v_dtb_depth,
         "dtb_generator": self.v_dtb_generator,
         "dtb_maxpagenumber": self.v_dtb_maxpagenumber,
         "dtb_totalpagecount": self.v_dtb_totalpagecount,
         "dtb_uid": self.v_dtb_uid,
         "id": self.v_id,
         "version": self.v_version,
         "xml_lang": self.v_xml_lang,
         "children": len(self.children),
     }
     if recursive:
         obj["children"] = JSONAble.safe(self.children)
     return obj
Exemple #40
0
 def json_object(self, recursive=True):
     obj = {
         "internal_path":      self.internal_path,
         "docauthor":          self.v_docauthor,
         "doctitle":           self.v_doctitle,
         "dtb_depth":          self.v_dtb_depth,
         "dtb_generator":      self.v_dtb_generator,
         "dtb_maxpagenumber":  self.v_dtb_maxpagenumber,
         "dtb_totalpagecount": self.v_dtb_totalpagecount,
         "dtb_uid":            self.v_dtb_uid,
         "id":                 self.v_id,
         "version":            self.v_version,
         "xml_lang":           self.v_xml_lang,
         "children":           len(self.children),
     }
     if recursive:
         obj["children"] = JSONAble.safe(self.children)
     return obj