Class: Epo::Ops::Address
- Inherits:
-
Object
- Object
- Epo::Ops::Address
- Defined in:
- lib/epo/ops/address.rb
Overview
Used to represent persons or companies (or both) in patents. Used for both, agents and applicants. Most of the time, when ‘name` is a person name, `address1` is a company name. Be aware that the addresses are in their respective local format.
Current patents usually at least use the fields address1-3, so they should nearly always have values. Nevertheless, older ones often only use 1-2. Note also that EPOs schema documents fields like ‘street` or `city`, but by now they have not been used yet.
Instance Attribute Summary collapse
-
#address1 ⇒ String
first address line.
-
#address2 ⇒ String
second address line.
-
#address3 ⇒ String
third address line, may be empty.
-
#address4 ⇒ String
fourth address line, may be empty.
-
#address5 ⇒ String
fifth address line, may be empty.
-
#cdsid ⇒ String
some kind of id the EPO provides, not sure yet if usable as reference.
-
#country_code ⇒ String
two letter country code of the address.
-
#name ⇒ String
the name of an entity (one or more persons or companies).
-
#occurred_on ⇒ Date
the date an address occurred on, usually matching the entries change_gazette_num.
Instance Method Summary collapse
-
#equal_name_and_address?(other) ⇒ Boolean
Compare addresses by the name and address fields.
-
#initialize(name, address1, address2, address3, address4, address5, country_code, occurred_on, cdsid) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(name, address1, address2, address3, address4, address5, country_code, occurred_on, cdsid) ⇒ Address
Returns a new instance of Address.
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/epo/ops/address.rb', line 34 def initialize(name, address1, address2, address3, address4, address5, country_code, occurred_on, cdsid) @address1 = address1 @address2 = address2 @address3 = address3 || '' @address4 = address4 || '' @address5 = address5 || '' @name = name @country_code = country_code || '' @occurred_on = occurred_on || '' @cdsid = cdsid || '' end |
Instance Attribute Details
#address1 ⇒ String
first address line. May also be a company name
25 26 27 |
# File 'lib/epo/ops/address.rb', line 25 def address1 @address1 end |
#address2 ⇒ String
second address line
25 26 27 |
# File 'lib/epo/ops/address.rb', line 25 def address2 @address2 end |
#address3 ⇒ String
third address line, may be empty
25 26 27 |
# File 'lib/epo/ops/address.rb', line 25 def address3 @address3 end |
#address4 ⇒ String
fourth address line, may be empty
25 26 27 |
# File 'lib/epo/ops/address.rb', line 25 def address4 @address4 end |
#address5 ⇒ String
fifth address line, may be empty
25 26 27 |
# File 'lib/epo/ops/address.rb', line 25 def address5 @address5 end |
#cdsid ⇒ String
some kind of id the EPO provides, not sure yet if usable as reference.
25 26 27 |
# File 'lib/epo/ops/address.rb', line 25 def cdsid @cdsid end |
#country_code ⇒ String
two letter country code of the address
25 26 27 |
# File 'lib/epo/ops/address.rb', line 25 def country_code @country_code end |
#name ⇒ String
the name of an entity (one or more persons or companies)
25 26 27 |
# File 'lib/epo/ops/address.rb', line 25 def name @name end |
#occurred_on ⇒ Date
the date an address occurred on, usually matching the entries change_gazette_num
25 26 27 |
# File 'lib/epo/ops/address.rb', line 25 def occurred_on @occurred_on end |
Instance Method Details
#equal_name_and_address?(other) ⇒ Boolean
Compare addresses by the name and address fields.
50 51 52 53 54 55 56 57 |
# File 'lib/epo/ops/address.rb', line 50 def equal_name_and_address?(other) name == other.name && address1 == other.address1 && address2 == other.address2 && address3 == other.address3 && address4 == other.address4 && address5 == other.address5 end |