Class: UCF::MetaInf

Inherits:
ZipContainer::ManagedDirectory
  • Object
show all
Defined in:
lib/ucf/meta_inf.rb

Overview

This is a subclass of ManagedDirectory to represent the META-INF directory in a basic UCF Document.

Defined Under Namespace

Classes: File

Constant Summary collapse

SCHEMA_DIR =

:nodoc:

::File.join(::File.dirname(__FILE__), 'schema')
CONTAINER_SCHEMA =
::File.join(SCHEMA_DIR, 'container.rng')
MANIFEST_SCHEMA =
::File.join(SCHEMA_DIR, 'OpenDocument-manifest-schema-v1.0-os.rng')

Instance Method Summary collapse

Constructor Details

#initializeMetaInf

:call-seq:

new -> MetaInf

Create a standard META-INF ManagedDirectory.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/ucf/meta_inf.rb', line 53

def initialize
  super(
    'META-INF',
    required: false,
    entries:
      [
        File.new('container.xml', CONTAINER_SCHEMA),
        File.new('manifest.xml', MANIFEST_SCHEMA),
        File.new('metadata.xml'),
        File.new('signatures.xml'),
        File.new('encryption.xml'),
        File.new('rights.xml')
      ]
  )
end