module NistBib class NistBibliographicItem < RelatonBib::BibliographicItem # @return [String] attr_reader :doctype # @return [Array] attr_reader :keyword # @return [NistBib::CommentPeriod] attr_reader :commentperiod # @param id [String, NilClass] # @param title [Array] # @param formattedref [RelatonBib::FormattedRef, NilClass] # @param type [String, NilClass] # @param docid [Array] # @param docnumber [String, NilClass] # @param language [Arra] # @param script [Array] # @param docstatus [NistBib::DocumentStatus, NilClass] # @param edition [String, NilClass] # @param version [RelatonBib::BibliographicItem::Version, NilClass] # @param biblionote [Array] # @param series [Array] # @param medium [RelatonBib::Medium, NilClas] # @param place [Array] # @param extent [Array] # @param accesslocation [Array] # @param classification [RelatonBib::Classification, NilClass] # @param validity [RelatonBib:Validity, NilClass] # @param fetched [Date, NilClass] default nil # @param doctype [String] # @param keyword [Array] # @param commentperiod [NistBib::CommentPeriod] # # @param dates [Array] # @option dates [String] :type # @option dates [String] :from # @option dates [String] :to # # @param contributors [Array] # @option contributors [String] :type # @option contributors [String] :from # @option contributirs [String] :to # @option contributors [String] :abbreviation # @option contributors [Array] :roles # # @param abstract [Array] # @option abstract [String] :content # @option abstract [String] :language # @option abstract [String] :script # @option abstract [String] :type # # @param relations [Array] # @option relations [String] :type # @option relations [RelatonBib::BibliographicItem] :bibitem # @option relations [Array] :bib_locality def initialize(**args) @doctype = "stadard" @keyword = args.delete(:keyword) || [] @commentperiod = args.delete :commentperiod super end # @param builder [Nokogiri::XML::Builder] def to_xml(builder = nil, **opts) super builder, date_format: :short, **opts do |b| if opts[:bibdata] b.ext do b.doctype doctype keyword.each { |kw| kw.to_xml b } commentperiod&.to_xml b end end end end end end