[Bio] / CatalogServices / testVersionWriting Repository:
ViewVC logotype

View of /CatalogServices/testVersionWriting

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (annotate)
Fri Nov 19 23:22:48 2004 UTC (15 years, 6 months ago) by efrank
Branch: MAIN
CVS Tags: before-dynamics-persistence, lwc, post-st-migration2, treatman-lastDay-0, preTreatmanDyn, post-st-migration, HEAD
Changes since 1.1: +1 -1 lines
migrate FoundryId to FoundryInfo.

rewrite base object model classes in KahOM and FoundryId to use SchemaTools
   for their data nuggets.

code runs package level test for these two packages successfully.

everything else is now broken.....

we'r ready for the migration.

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


from FaST.BssFactory import  BssFactory
from CatalogServices.Catalog import Catalog
from FoundryInfo.FoundryItemKey import FoundryItemKey

print "starting"

catalog = Catalog.instance()
b=BssFactory()
catalog.addDataFactory( b )

bssTop=b.getCatalogTop()

#guniea pig
catalogEntry = bssTop.entries()[-1]

print catalogEntry
origName=catalogEntry.name()
print "testing on ", origName

foundryItemKey = catalogEntry.getFoundryItem()
print foundryItemKey
factory = Catalog.instance().lookupFactory( foundryItemKey.getFoundryId() )
fid= foundryItemKey.getFoundryId()
print fid
print fid.getName()
print fid.getType()
print fid.getIdVal()
print factory
top = factory.getRecoElemByFoundryItemKey( foundryItemKey)

fik=catalog.open( "/Bss/Aiba and  Matsuoka, Citric Acid Flux Analysis V4")
print "open fik", fik
print "are two equal?" , foundryItemKey.equals( fik )

newFik=b.writeReconstruction( origName+"v", top, commit=1)
print "newFik is ", newFik
catalogEntry.setFoundryItem( newFik )

newFik=b.writeReconstruction( origName+"o", top, commit=1)
print "newFik is ", newFik
catalogEntry.setFoundryItem( newFik )

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3