Package com.ontologycentral.estatwrap

Examples of com.ontologycentral.estatwrap.SDMXParser


  public void rdfize(String dsdPath, String dataPath, String tempDataPath, String dataLogPath, String tempTsvPath, String sdmxTTLFile)
  {
    writeLog("RDFizing updated datasets...");

    DSDParser dsd = new DSDParser();
    SDMXParser sdmx = new SDMXParser();
   
    File dir = new File(tempDataPath);
   
    File[] files = dir.listFiles();
   
    for(File f:files)
    {
     
      if(f.getName().contains(".dsd.xml"))
      {
        writeLog("Processing :" + f.getAbsolutePath());
        dsd = new DSDParser();
        dsd.xmlFilePath = f.getAbsolutePath();
        dsd.outputFilePath = dsdPath;
        dsd.serialization = "turtle";
        dsd.sdmx_codeFilePath = sdmxTTLFile;
        dsd.initObjects();
        dsd.parseFile();
      }
      else if(f.getName().contains(".sdmx.xml"))
      {
        writeLog("Processing :" + f.getAbsolutePath());
       
        sdmx = new SDMXParser();
        sdmx.outputFilePath = dataPath;
        sdmx.logFilePath = dataLogPath;
        try{
          String fileName = f.getName().substring(0,f.getName().indexOf("."));
          sdmx.downLoadTSV(fileName, f.getAbsolutePath(), tempTsvPath + fileName + ".tsv.gz");
       
        }catch(Exception ex)
        {
          writeLog("Error while processing dataset : " + ex.getMessage());
        }
View Full Code Here


   
  }

  public void extractTimeFormat(String logFilePath, String sdmxFilePath) throws Exception
  {
    SDMXParser obj = new SDMXParser();
   
    createLogFile(logFilePath);
   
    String time_format = obj.get_FREQ_fromSDMX(sdmxFilePath);
   
    if(time_format.equals("PT1M"))
      writeDataToFile("Minutely data found in : " + sdmxFilePath.substring(sdmxFilePath.lastIndexOf("/")+1));
    else if(time_format.equals("P7D"))
      writeDataToFile("Weekly data found in : " + sdmxFilePath.substring(sdmxFilePath.lastIndexOf("/")+1));
View Full Code Here

  }
 
  public void parseSDMX(String sdmxFile, String sdmxFilePath, String tsvFilePath) throws Exception
  {
    System.out.println("Parsing SDMX file : " + sdmxFile);
    SDMXParser obj = new SDMXParser(Main.sdmxDirPath);
    obj.downLoadTSV(sdmxFile, sdmxFilePath, tsvFilePath);
  }
View Full Code Here

TOP

Related Classes of com.ontologycentral.estatwrap.SDMXParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.