# -*- perl -*-
# DO NOT EDIT - This file is generated by UML2CODE.
# From template: $Id: PerlTemplate.txt,v 1.12 2003/05/11 06:16:02 stephens Exp $

package UML::MetaModel::Model_Management::ElementImport;

use 5.6.1;
use strict;
use warnings;

#################################################################
# Version
#

our $VERSION = do { my @r = (q$Revision: 1.12 $ =~ /\d+/g); sprintf "%d." . "%03d" x $#r, @r };

#################################################################
# Dependencies
#



use Carp qw(croak confess);

#################################################################
# Generalizations
#

use base qw(

  UML::MetaModel::__ObjectBase

);

#################################################################
# Exports
#

our @EXPORT_OK = qw(
);
our %EXPORT_TAGS = ( ':all' => \@EXPORT_OK );





#################################################################
# Validation
#


=head2 __validate_type

  UML::MetaModel::Model_Management::ElementImport->__validate_type($value);

Returns true if $value is a valid value of UML::MetaModel::Model_Management::ElementImport.

=cut
sub __validate_type($$)
{
  my ($self, $x) = @_;

  no warnings;

  UNIVERSAL::isa($x, 'UML::MetaModel::Model_Management::ElementImport')  ;
}


=head2 __typecheck

  UML::MetaModel::Model_Management::ElementImport->__typecheck($value, $msg);

Calls C<confess()> with C<$msg> if C<UML::MetaModel::Model_Management::ElementImport-E<GT>__validate_type($value)> is false.

=cut
sub __typecheck
{
  my ($self, $x, $msg) = @_;

  confess("typecheck: $msg: type 'UML::MetaModel::Model_Management::ElementImport': value '$x'")
    unless __validate_type($self, $x);
}


=head2 isaElementImport

Returns true if receiver is a C<UML::MetaModel::Model_Management::ElementImport>.
Other receivers will return false.

=cut
sub isaElementImport { 1 }


=head2 isaModel_Management__ElementImport

Returns true if receiver is a C<UML::MetaModel::Model_Management::ElementImport>.
Other receivers will return false.
This is the fully qualified version of the C<isaElementImport> method.

=cut
sub isaModel_Management__ElementImport { 1 }


#################################################################
# Introspection
#

=head2 __model_name 

  my $name = $obj_or_package->__model_name;

Returns the UML Model name (C<'Model_Management::ElementImport'>) for an object or package of
this Classifier.

=cut
sub __model_name { 'Model_Management::ElementImport' }




  


  


  



# ASSOC: 
# ASSOC: 

  


#################################################################
# Class Attributes
#


          

#################################################################
# Initialization
#

 
=head2 __intialize

Initialize all slots in this Classifier.
Does not initlaize slots in Generalizations.

See also: C<_initialize>.

=cut
sub __initialize
{
  my ($self) = @_;

  # Attributes

    # Attribute visibility
  if ( exists $self->{'visibility'} ) {
    my $x = $self->{'visibility'};
    $self->{'visibility'} = undef;
    $self->set_visibility($x);
  } else {
      }
  
    # Attribute alias
  if ( exists $self->{'alias'} ) {
    my $x = $self->{'alias'};
    $self->{'alias'} = undef;
    $self->set_alias($x);
  } else {
      }
  
    # Attribute isSpecification
  if ( exists $self->{'isSpecification'} ) {
    my $x = $self->{'isSpecification'};
    $self->{'isSpecification'} = undef;
    $self->set_isSpecification($x);
  } else {
      }
  


  # Associations

  # AssociationEnd 
  #   1
  #  <--> 
  #  importedElement 1 UML::MetaModel::Foundation::Core::ModelElement.
    if ( defined $self->{'importedElement'} ) {
    my $x = $self->{'importedElement'};
    $self->{'importedElement'} = undef;
    $self->set_importedElement($x);
  }
  

  $self;
}


my $__initialize_use;

=head2 _intialize

Initialize all slots in this Classifier and all Generalizations.

See also: C<__initialize>.

=cut
sub _initialize
{
  my ($self) = @_;

  # $DB::single = 1;

  unless ( ! $__initialize_use ) {
    $__initialize_use = 1;
  }

  $self->UML::MetaModel::Model_Management::ElementImport::__initialize;

  $self;
}
      

#################################################################
# Attributes
#



#################################################################
# Attribute visibility
# type = UML::MetaModel::Foundation::Data_Types::VisibilityKind
# multiplicity = 1

=head2 visibility

  my $val = $obj->visibility;

Returns the value of Attribute visibility.

=cut
sub visibility ($)
{
  my ($self) = @_;

  $self->{'visibility'};
}


=head2 set_visibility

  $obj->set_visibility($val);

Sets the value of Attribute visibility.
C<$val> must be of type C<UML::MetaModel::Foundation::Data_Types::VisibilityKind>.
Returns C<$obj>.

=cut
sub set_visibility ($$)
{
  my ($self, $val) = @_;

  $self->__use('UML::MetaModel::Foundation::Data_Types::VisibilityKind')->__typecheck($val, "UML::MetaModel::Model_Management::ElementImport.visibility");

  $self->{'visibility'} = $val;

  $self
}

#################################################################
# Attribute alias
# type = UML::MetaModel::Foundation::Data_Types::Name
# multiplicity = 1

=head2 alias

  my $val = $obj->alias;

Returns the value of Attribute alias.

=cut
sub alias ($)
{
  my ($self) = @_;

  $self->{'alias'};
}


=head2 set_alias

  $obj->set_alias($val);

Sets the value of Attribute alias.
C<$val> must be of type C<UML::MetaModel::Foundation::Data_Types::Name>.
Returns C<$obj>.

=cut
sub set_alias ($$)
{
  my ($self, $val) = @_;

  $self->__use('UML::MetaModel::Foundation::Data_Types::Name')->__typecheck($val, "UML::MetaModel::Model_Management::ElementImport.alias");

  $self->{'alias'} = $val;

  $self
}

#################################################################
# Attribute isSpecification
# type = UML::MetaModel::Foundation::Data_Types::Boolean
# multiplicity = 1

=head2 isSpecification

  my $val = $obj->isSpecification;

Returns the value of Attribute isSpecification.

=cut
sub isSpecification ($)
{
  my ($self) = @_;

  $self->{'isSpecification'};
}


=head2 set_isSpecification

  $obj->set_isSpecification($val);

Sets the value of Attribute isSpecification.
C<$val> must be of type C<UML::MetaModel::Foundation::Data_Types::Boolean>.
Returns C<$obj>.

=cut
sub set_isSpecification ($$)
{
  my ($self, $val) = @_;

  $self->__use('UML::MetaModel::Foundation::Data_Types::Boolean')->__typecheck($val, "UML::MetaModel::Model_Management::ElementImport.isSpecification");

  $self->{'isSpecification'} = $val;

  $self
}


#################################################################
# Association
#


#################################################################
# AssociationEnd  => importedElement
# type = UML::MetaModel::Foundation::Core::ModelElement
# multiplicity = 1

=head2 importedElement

  my $val = $obj->importedElement;

Returns the AssociationEnd value of type C<UML::MetaModel::Foundation::Core::ModelElement>.

=cut
sub importedElement ($)
{
  my ($self) = @_;
		  
  $self->{'importedElement'};
}


=head2 set_importedElement

  $obj->set_importedElement($val);

Sets the AssociationEnd value.
C<$val> must of of type C<UML::MetaModel::Foundation::Core::ModelElement>.
Returns C<$obj>.

=cut
sub set_importedElement ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'importedElement'}) ne $val ) { # Recursion lock

    $self->__use('UML::MetaModel::Foundation::Core::ModelElement')->__typecheck($val, "UML::MetaModel::Model_Management::ElementImport.importedElement");

    $self->{'importedElement'} = $val;                 # Recursion lock
    # Remove and add associations with other ends.
          }
		  
  $self;
}


=head2 add_importedElement

  $obj->add_importedElement($val);

Adds the AssociationEnd value.
C<$val> must of of type C<UML::MetaModel::Foundation::Core::ModelElement>.
Throws exception if a value already exists.
Returns C<$obj>.

=cut
sub add_importedElement ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'importedElement'}) ne $val ) { # Recursion lock
    $self->__use('UML::MetaModel::Foundation::Core::ModelElement')->__typecheck($val, "UML::MetaModel::Model_Management::ElementImport.importedElement");
      
    # confess("UML::MetaModel::Model_Management::ElementImport::importedElement: too many")
    # if defined $self->{'importedElement'};

    $self->{'importedElement'} = $val;                 # Recursion lock

    # Remove and add associations with other ends.
        
  }

  $self;
}


=head2 remove_importedElement

  $obj->remove_importedElement($val);

Removes the Association to C<$val>.
Returns C<$obj>.

=cut
sub remove_importedElement ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'importedElement'}) eq $val ) { # Recursion lock
    $val = $self->{'importedElement'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
  }
}


=head2 clear_importedElement

  $obj->clear_importedElement;

Clears the Association.
Returns C<$obj>.

=cut
sub clear_importedElement ($@)
{
  my ($self) = @_;

  my $old;
  if ( defined ($old = $self->{'importedElement'}) ) { # Recursion lock
    my $val = $self->{'importedElement'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
  }

  $self;
}






############################################################################

1; # is true!

############################################################################

### Keep these comments at end of file: ks.perl@kurtstephens.com 2003/04/06 ###
### Local Variables: ###
### mode:perl ###
### perl-indent-level:2 ###
### perl-continued-statement-offset:0 ###
### perl-brace-offset:0 ###
### perl-label-offset:0 ###
### End: ###

