Class: RCAP::CAP_1_2::Alert

Inherits:
Base::Alert show all
Defined in:
lib/rcap/cap_1_2/alert.rb

Overview

An Alert object is valid if

  • it has an identifier

  • it has a sender

  • it has a sent time

  • it has a valid status value

  • it has a valid messge type value

  • it has a valid scope value

  • all Info objects contained in infos are valid

Constant Summary

XMLNS =
"urn:oasis:names:tc:emergency:cap:1.2"
CAP_VERSION =
"1.2"
STATUS_DRAFT =
"Draft"
VALID_STATUSES =

Valid values for status

[ STATUS_ACTUAL, STATUS_EXERCISE, STATUS_SYSTEM, STATUS_TEST, STATUS_DRAFT ]

Constants inherited from Base::Alert

Base::Alert::ADDRESSES_ELEMENT_NAME, Base::Alert::ADDRESSES_KEY, Base::Alert::ADDRESSES_XPATH, Base::Alert::ADDRESSES_YAML, Base::Alert::CAP_VERSION_KEY, Base::Alert::CAP_VERSION_YAML, Base::Alert::CODES_KEY, Base::Alert::CODES_YAML, Base::Alert::CODE_ELEMENT_NAME, Base::Alert::CODE_XPATH, Base::Alert::IDENTIFIER_ELEMENT_NAME, Base::Alert::IDENTIFIER_KEY, Base::Alert::IDENTIFIER_XPATH, Base::Alert::IDENTIFIER_YAML, Base::Alert::INCIDENTS_ELEMENT_NAME, Base::Alert::INCIDENTS_KEY, Base::Alert::INCIDENTS_XPATH, Base::Alert::INCIDENTS_YAML, Base::Alert::INFOS_KEY, Base::Alert::INFOS_YAML, Base::Alert::MSG_TYPE_ACK, Base::Alert::MSG_TYPE_ALERT, Base::Alert::MSG_TYPE_CANCEL, Base::Alert::MSG_TYPE_ELEMENT_NAME, Base::Alert::MSG_TYPE_ERROR, Base::Alert::MSG_TYPE_KEY, Base::Alert::MSG_TYPE_UPDATE, Base::Alert::MSG_TYPE_XPATH, Base::Alert::MSG_TYPE_YAML, Base::Alert::NOTE_ELEMENT_NAME, Base::Alert::NOTE_KEY, Base::Alert::NOTE_XPATH, Base::Alert::NOTE_YAML, Base::Alert::REFERENCES_ELEMENT_NAME, Base::Alert::REFERENCES_KEY, Base::Alert::REFERENCES_XPATH, Base::Alert::REFERENCES_YAML, Base::Alert::RESTRICTION_ELEMENT_NAME, Base::Alert::RESTRICTION_KEY, Base::Alert::RESTRICTION_XPATH, Base::Alert::RESTRICTION_YAML, Base::Alert::SCOPE_ELEMENT_NAME, Base::Alert::SCOPE_KEY, Base::Alert::SCOPE_PRIVATE, Base::Alert::SCOPE_PUBLIC, Base::Alert::SCOPE_RESTRICTED, Base::Alert::SCOPE_XPATH, Base::Alert::SCOPE_YAML, Base::Alert::SENDER_ELEMENT_NAME, Base::Alert::SENDER_KEY, Base::Alert::SENDER_XPATH, Base::Alert::SENDER_YAML, Base::Alert::SENT_ELEMENT_NAME, Base::Alert::SENT_KEY, Base::Alert::SENT_XPATH, Base::Alert::SENT_YAML, Base::Alert::SOURCE_ELEMENT_NAME, Base::Alert::SOURCE_KEY, Base::Alert::SOURCE_XPATH, Base::Alert::SOURCE_YAML, Base::Alert::STATUS_ACTUAL, Base::Alert::STATUS_ELEMENT_NAME, Base::Alert::STATUS_EXERCISE, Base::Alert::STATUS_KEY, Base::Alert::STATUS_SYSTEM, Base::Alert::STATUS_TEST, Base::Alert::STATUS_XPATH, Base::Alert::STATUS_YAML, Base::Alert::VALID_MSG_TYPES, Base::Alert::VALID_SCOPES, Base::Alert::XML_ELEMENT_NAME, Base::Alert::XPATH

Instance Attribute Summary

Attributes inherited from Base::Alert

#addresses, #codes, #identifier, #incidents, #infos, #msg_type, #note, #references, #restriction, #scope, #sender, #sent, #source, #status

Instance Method Summary (collapse)

Methods inherited from Base::Alert

#add_info, from_h, from_json, from_xml, from_xml_document, from_xml_element, from_yaml, from_yaml_data, #initialize, #inspect, #to_h, #to_json, #to_reference, #to_s, #to_xml, #to_xml_document, #to_xml_element, #to_yaml

Constructor Details

This class inherits a constructor from RCAP::Base::Alert

Instance Method Details

- (Class) info_class

Returns:

  • (Class)


27
28
29
# File 'lib/rcap/cap_1_2/alert.rb', line 27

def info_class
  Info
end

- (String) xmlns

Returns:



22
23
24
# File 'lib/rcap/cap_1_2/alert.rb', line 22

def xmlns
  XMLNS
end