from org.das2.datum import DatumUtil 
from org.virbo.dataset import SemanticOps
from java.lang import Double
def checkit( s ):
   ss= DatumUtil.splitDatumString(s)
   d= str( Double.parseDouble(ss[0]) )
   u= SemanticOps.lookupUnits(ss[1])
   print '|'+d+'|'+u.toString()+'|'
checkit( '1e12s' )
checkit( '-1.0e-6s' )
checkit( '5' )
checkit( '5 m' )
checkit( '5m' )
checkit( '4.5m^2' )
checkit( '4.5e6m^2' )
checkit( '-1' )
checkit( '-1s' )
checkit( '-1.0s' )
checkit( '-1.0e6s' )
checkit( '-1.0e-6s' )
checkit( '-5 deg N' )
checkit( '-5deg N' )
checkit( '2014.')
checkit( '2014.N')
checkit( '2014.E')
checkit( '2014.E7')
checkit( ' 10 days')
