[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Thu Aug 19 22:30:52 UTC 2004
mwilkinson
Thu Aug 19 18:30:52 EDT 2004
Update of /home/repository/moby/moby-live/Perl/MOBY/RDF
In directory pub.open-bio.org:/tmp/cvs-serv1173/MOBY/RDF
Modified Files:
InOutArticlesRDF.pm
Log Message:
it was getting too painful to parse the RDF (and determine correct vs incorrectc formatting) without any predicates indicating the type of input article, so I added three new predicates: Simple, Collection, Secondary
moby-live/Perl/MOBY/RDF InOutArticlesRDF.pm,1.9,1.10
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/RDF/InOutArticlesRDF.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Perl/MOBY/RDF/InOutArticlesRDF.pm 2004/08/17 17:34:17 1.9
+++ /home/repository/moby/moby-live/Perl/MOBY/RDF/InOutArticlesRDF.pm 2004/08/19 22:30:52 1.10
@@ -120,13 +120,29 @@
my @articles = $self->articles;
my $Bag = $self->{Bag};
- my $li = 0;
+# my $li = 0;
foreach my $IN(@articles){
- ++$li;
- my $LI = $Thingy->new(RDF_NS, "_$li"); # <rdf:li> nodes - need to be numbered :_1, :_2, etc
my $input = &nextsimple;
- my $statement = new RDF::Core::Statement($Thingy, $LI, $input);
- $model->addStmt($statement);
+ if ($IN->isSimple){
+ my $LI = $Thingy->new(MP, "SimpleArticle"); # <rdf:li> nodes - need to be numbered :_1, :_2, etc
+ my $statement = new RDF::Core::Statement($Thingy, $LI, $input);
+ $model->addStmt($statement);
+ } elsif ($IN->isCollection){
+ my $LI = $Thingy->new(MP, "CollectionArticle"); # <rdf:li> nodes - need to be numbered :_1, :_2, etc
+ my $statement = new RDF::Core::Statement($Thingy, $LI, $input);
+ $model->addStmt($statement);
+ } elsif ($IN->isSecondary){
+ my $LI = $Thingy->new(MP, "SecondaryArticle"); # <rdf:li> nodes - need to be numbered :_1, :_2, etc
+ my $statement = new RDF::Core::Statement($Thingy, $LI, $input);
+ $model->addStmt($statement);
+ } else {
+ print STDERR "the InOutArticlesRDF got a service instance input or output that was not a simple, collection, nor secondary???\n";
+ return;
+ }
+# ++$li;
+ #my $LI = $Thingy->new(RDF_NS, "_$li"); # <rdf:li> nodes - need to be numbered :_1, :_2, etc
+ #my $statement = new RDF::Core::Statement($Thingy, $LI, $input);
+ #$model->addStmt($statement);
#<Description about bnode1>
# <rdf:_1 bnode2>
@@ -153,8 +169,6 @@
}
} elsif ($IN->isSecondary) {
&_addSecondary($model, $input, $IN);
- } else {
- print STDERR "the InOutArticlesRDF got a service instance input or output that was not a simple, collection, nor secondary???\n";
}
}
}
More information about the MOBY-guts
mailing list