From: Paul M. <pj...@sa...> - 2004-06-24 15:35:26
|
Hi, I have written a very small plugin to try something out. When I create a DoTS::NAFeatureImp object and ask for its children I do not get back 2 tables that have constraints to it, TESS::ParserItem and TESS::Footprint. They are listed as children in the schema browser on www.gusdb.org. Can someone enlighten me please? Perhaps the data in my GUS instance is not correct? Paul. # ---------------------------------------------------------- # see if children of DoTS::NAFeatureImp are from # TESS.FOOTPRINT and TESS.PARSERITEM. # package GUS::Common::Plugin::Test2; @ISA = qw(GUS::PluginMgr::Plugin); use strict; use GUS::Model::DoTS::NAFeatureImp; ######################################################################## ######## # new ## sub new { my $class = shift; my $self = {}; bless($self,$class); my $usage = 'Test to see if can navigate through tables and there data '; my $easycsp = [ ]; $self->initialize({requiredDbVersion => {}, cvsRevision => '$Revision: 0.1 $', # 'cvs fills this in!, cvsTag => '$Name: $', # cvs fills this in!', name => ref($self), revisionNotes => 'Notes', easyCspOptions => $easycsp, usage => $usage }); return $self; } ######################################################################## ######## # run # sub run { my $self = shift; my $obj = GUS::Model::DoTS::NAFeatureImp->new(); my @children = $obj->getChildList(); print "Children of GUS::Model::DoTS::NAFeatureImp are;\n\n"; foreach my $child (@children) { print "$child\n"; } ## # This does the same thing as SchemaBrowser ## #my $extent = $self->getDb()->getTable('GUS::Model::DoTS::NAFeatureImp'); #my $children_ref = $extent->getChildListWithAtts(); #foreach my $key (keys %{$children_ref}) { # print "key = $key\n"; #} return 1; } 1; |