Exemple #1
0
from java.io import IOException;
from java.io import InputStream;
from java.net import MalformedURLException;
from java.net import URL;
from java.net import URI;
from java.net import URISyntaxException;
from java.util import List;
from java.util import Iterator;
from java.util import ArrayList;
from java.lang import Object;
from org import jdom
from org.apache import log4j;

print("This is thredds.__init__()")
#tempURI = java.net.URI
inFileName = "/home/cui/Dropbox/projects/ccesf/code/backesg/esg/esg-octopus/plugouts/thredds/config.xml"
outFileName = "/home/cui/Dropbox/projects/ccesf/code/backesg/esg/esg-octopus/plugouts/thredds/cat_out.xml"
arg = [inFileName, outFileName]
my_main = CatalogGen.main(arg)
#tmpURI = java.net.URI( inFileName)
#configFile = java.io.File( inFileName )
#tmpURI = configFile.toURI()
#configDocURL = tmpURI.toURL()
#log = java.lang.StringBuffer();
 
#catGen = thredds.cataloggen.CatalogGen(configDocURL)
#if catGen.isValid(log):
#   catGen.expand()
#   catGen.writeCatalog(outFileName)
     
Exemple #2
0
from java.net import URISyntaxException;
from java.util import List;
from java.util import Iterator;
from java.util import ArrayList;
from java.lang import Object;
from org import jdom
from opendap import dap

from org.apache import log4j;

from ucar.nc2.units import DateType;
from java.lang import StringBuilder

print("This is thredds.__init__()")
#tempURI = java.net.URI
inFileName = "/home/cui/Dropbox/projects/ccesf/code/backesg/esg/esg-octopus/plugouts/thredds/example_v1.xml"
outFileName = "/home/cui/Dropbox/projects/ccesf/code/backesg/esg/esg-octopus/plugouts/thredds/cat_out.xml"
arg = [inFileName, outFileName]
#my_main = CatalogGen.main(arg)
tmpURI = URI( inFileName)
configFile = File( inFileName )
tmpURI = configFile.toURI()
configDocURL = tmpURI.toURL()
log = StringBuilder()
 
catGen = CatalogGen(configDocURL)
if catGen.isValid(log):
  catGen.expand()
  catGen.writeCatalog(outFileName)