def metadata
            metadata_stm = self.Catalog.Metadata

            if metadata_stm.is_a?(Stream)
                doc = REXML::Document.new(metadata_stm.data)
                info = {}

                doc.elements.each('*/*/rdf:Description') do |description|

                    description.attributes.each_attribute do |attr|
                        case attr.prefix
                        when 'pdf','xap'
                            info[attr.name] = attr.value
                        end
                    end

                    description.elements.each('*') do |element|
                        value = (element.elements['.//rdf:li'] || element).text
                        info[element.name] = value.to_s
                    end
                end

                info
            end
        end
def metadata
            metadata_stm = self.Catalog.Metadata

            if metadata_stm.is_a?(Stream)
                doc = REXML::Document.new(metadata_stm.data)
                info = {}

                doc.elements.each('*/*/rdf:Description') do |description|

                    description.attributes.each_attribute do |attr|
                        case attr.prefix
                        when 'pdf','xap'
                            info[attr.name] = attr.value
                        end
                    end

                    description.elements.each('*') do |element|
                        value = (element.elements['.//rdf:li'] || element).text
                        info[element.name] = value.to_s
                    end
                end

                info
            end
        end
Returns a Hash of the information found in the metadata stream