class Mexico::FileSystem::LayerConnector

A typed connector between two layers (or tiers) in an transcription or annotation document.

Attributes

document[RW]

Public Class Methods

new(new_source=nil, new_target=nil, args={}) click to toggle source
# File lib/mexico/file_system/layer_connector.rb, line 41
def initialize(new_source=nil, new_target=nil, args={})
  self.source= new_source
  self.target= new_target
  args.each do |k,v|
    if self.respond_to?("#{k}=")
      send("#{k}=", v)
    end
  end
end

Public Instance Methods

identifier=(new_id) click to toggle source
# File lib/mexico/file_system/layer_connector.rb, line 27
def identifier=(new_id)
  @identifier = Mexico::Util::to_xml_id(new_id)
end
source() click to toggle source

Retrieves the source layer for this layer connector. @return [Layer] The source layer.

# File lib/mexico/file_system/layer_connector.rb, line 53
def source
  @source
end
source=(new_source_layer) click to toggle source

Sets a new source layer for this layer connector. @param new_source_layer [Layer] The layer to be set as the new source. @return [void]

# File lib/mexico/file_system/layer_connector.rb, line 60
def source=(new_source_layer)
  @source = new_source_layer
  @source_id = @source.identifier
end
target() click to toggle source

Retrieves the target layer for this layer connector. @return [Layer] The target layer.

# File lib/mexico/file_system/layer_connector.rb, line 67
def target
  @target
end
target=(new_target_layer) click to toggle source

Sets a new target layer for this layer connector. @param new_target_layer [Layer] The layer to be set as the new target. @return [void]

# File lib/mexico/file_system/layer_connector.rb, line 74
def target=(new_target_layer)
  @target = new_target_layer
  @target_id = @target.identifier
end