Class: FitsDatastream

Inherits:
ActiveFedora::NokogiriDatastream
  • Object
show all
Includes:
OM::XML::Document
Defined in:
app/models/datastreams/fits_datastream.rb

Overview

Copyright © 2012 The Pennsylvania State University

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Class Method Summary collapse

Class Method Details

.xml_templateObject



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'app/models/datastreams/fits_datastream.rb', line 139

def self.xml_template
  builder = Nokogiri::XML::Builder.new do |xml|
    xml.fits(:xmlns => 'http://hul.harvard.edu/ois/xml/ns/fits/fits_output',
             'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
             'xsi:schemaLocation' =>
  "http://hul.harvard.edu/ois/xml/ns/fits/fits_output
  http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd",
             :version => "0.6.0",
             :timestamp => "1/25/12 11:04 AM") {
      xml.identification {
        xml.identity(:format => '', :mimetype => '', 
                     :toolname => 'FITS', :toolversion => '') {
          xml.tool(:toolname => '', :toolversion => '')
          xml.version(:toolname => '', :toolversion => '')
          xml.externalIdentifier(:toolname => '', :toolversion => '')
        }
      }
      xml.fileinfo {
        xml.size(:toolname => '', :toolversion => '')
        xml.creatingApplicatioName(:toolname => '', :toolversion => '',
                                   :status => '')
        xml.lastmodified(:toolname => '', :toolversion => '', :status => '')
        xml.filepath(:toolname => '', :toolversion => '', :status => '')
        xml.filename(:toolname => '', :toolversion => '', :status => '')
        xml.md5checksum(:toolname => '', :toolversion => '', :status => '')
        xml.fslastmodified(:toolname => '', :toolversion => '', :status => '')
      }
      xml.filestatus {
        xml.tag! "well-formed", :toolname => '', :toolversion => '', :status => ''
        xml.valid(:toolname => '', :toolversion => '', :status => '')
      }
      xml. {
        xml.document {
          xml.title(:toolname => '', :toolversion => '', :status => '')
          xml.author(:toolname => '', :toolversion => '', :status => '')
          xml.pageCount(:toolname => '', :toolversion => '')
          xml.isTagged(:toolname => '', :toolversion => '')
          xml.hasOutline(:toolname => '', :toolversion => '')
          xml.hasAnnotations(:toolname => '', :toolversion => '')
          xml.isRightsManaged(:toolname => '', :toolversion => '', 
                              :status => '')
          xml.isProtected(:toolname => '', :toolversion => '')
          xml.hasForms(:toolname => '', :toolversion => '', :status => '')
        }
      }
    }
  end
  builder.doc
end