def self.read_one(reader)
return nil unless reader.forward
object = ProfileDetail.new
object.href = reader.get_attribute('href')
value = reader.get_attribute('duration')
object.duration = value if not value.nil?
value = reader.get_attribute('profile_type')
object.profile_type = value if not value.nil?
empty = reader.empty_element?
reader.read
return object if empty
while reader.forward do
case reader.node_name
when 'block_statistics'
object.block_statistics = BlockStatisticReader.read_many(reader)
when 'duration'
object.duration = Reader.read_integer(reader)
when 'fop_statistics'
object.fop_statistics = FopStatisticReader.read_many(reader)
when 'profile_type'
object.profile_type = Reader.read_string(reader)
when 'statistics'
object.statistics = StatisticReader.read_many(reader)
else
reader.next_element
end
end
reader.read
return object
end