Class: BioInterchange::TextMining::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/biointerchange/textmining/process.rb

Constant Summary collapse

UNSPECIFIED =

Constants that describe process types.

0
SOFTWARE =
1
WEBSERVICE =
2
MANUAL =
3
VERSION =

Dictionary of viable metadata keys.

0

Instance Method Summary collapse

Constructor Details

#initialize(name, uri, type = UNSPECIFIED, metadata = {}, date = nil) ⇒ Process

Creates a new process representation.

name

identification of the software/service/curator involved in the process, e.g. “ABNER” or “Peter Smith”

uri

details about the processes origin, e.g. “pages.cs.wisc.edu/~bsettles/abner/” or “[email protected]

date

date-time when the process was carried out, which may be nil if the date-time is unknown

type

classification of the described process

metadata

a hash that holds additional information about the process via dictionary defined keywords, e.g. { Process::VERSION => ‘0.0.1alpha’ }



21
22
23
24
25
26
27
# File 'lib/biointerchange/textmining/process.rb', line 21

def initialize(name, uri, type = UNSPECIFIED,  = {}, date = nil)
  @name = name
  @uri = uri
  @date = date
  @type = type
  @metadata = 
end

Instance Method Details

#dateObject

Returns the date-time when this process was carried out, or nil otherwise if the information is not available.



41
42
43
# File 'lib/biointerchange/textmining/process.rb', line 41

def date
  @date
end

#metadataObject

Returns additional meta-data associated with this process.



51
52
53
# File 'lib/biointerchange/textmining/process.rb', line 51

def 
  @metadata.clone.freeze
end

#nameObject

Returns the name of the process.



30
31
32
# File 'lib/biointerchange/textmining/process.rb', line 30

def name
  @name
end

#typeObject

Returns the type of this process.



46
47
48
# File 'lib/biointerchange/textmining/process.rb', line 46

def type
  @type
end

#uriObject

Returns the URI that has further details about the process, which can also be the form of an email address in cases where the process describes human driven annotation.



36
37
38
# File 'lib/biointerchange/textmining/process.rb', line 36

def uri
  @uri
end