InterMine::Model::TestModel - A model to make testing easy for other modules.
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;
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
name (Str) age (Int) fullTime (Bool) department (Department) address (Address)
employees (ArrayRef[Employee]) company (Company) manager (Manager) name (Str) address (Address)
departments (ArrayRef[Department]) name (Str) vatNumber (Int) contractors (ArrayRef[Contractor]) secretarys (ArrayRef[Secretary]) address (Address)
returns a new instance of the test model
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.
Please report any bugs or feature requests to
You can find documentation for this module with the perldoc command.
You can also look for information at:
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.