NAME
InterMine::Model::TestModel - A model to make testing easy for other modules.
SYNOPSIS
use InterMine::Model::TestModel;
# For a shared instance:
my $singleton = InterMine::Model::TestModel->instance;
# For a freshly minted model:
my $model = InterMine::Model::TestModel->new;
DESCRIPTION
This module produces a predefined version of an InterMine::Model for testing purposes. The model itself has 19 classes based around a hierarchical company structure.
To view the model as an xml file, see: http://trac.flymine.org/browser/trunk/intermine/objectstore/model/testmodel/testmodel_model.xml
Useful classes in the model are
- Employee (analogous to Gene in genomic models)
-
name (Str) age (Int) fullTime (Bool) department (Department) address (Address)
- Department (analogous to Chromosome in genomic models)
-
employees (ArrayRef[Employee]) company (Company) manager (Manager) name (Str) address (Address)
- Company (
-
departments (ArrayRef[Department]) name (Str) vatNumber (Int) contractors (ArrayRef[Contractor]) secretarys (ArrayRef[Secretary]) address (Address)
CLASS METHODS
new
returns a new instance of the test model
instance
returns a shared instance of the testmodel
In most cases you will want to use instance
, as the model is for the most part read-only.
You only need to use new
if you are testing the object cache.
SEE ALSO
AUTHOR
FlyMine <support@flymine.org>
BUGS
Please report any bugs or feature requests to support@flymine.org
.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc InterMine::Model::TestModel
You can also look for information at:
FlyMine
COPYRIGHT & LICENSE
Copyright 2006,2007,2008,2009, 2010, 2011 FlyMine, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.