package test;

import java.util.HashMap;

import ca.nrc.cadc.vos.VOSURI;

import it.inaf.oats.vospacebackend.utils.VOSURIParser;
/**
 *
 * @author bertocco
 */
public class VOSURIParserTest {

    public VOSURIParserTest() {
        
    }
    
    public static void main(String[] args) {
        
        String uriStr = "vos://nvo.caltech!vospace/myresults/siap-out-1.vot";
        
        try {
            
            VOSURI myvosuri = new VOSURI(uriStr);
        
            VOSURIParser parser = new VOSURIParser();
            
            HashMap parsingRes = parser.parse(myvosuri);
    
            System.out.println("scheme = " + (String)parsingRes.get("scheme"));
            System.out.println("namingAuthority = " + (String)parsingRes.get("namingAuthority")); 
            System.out.println("query = " + (String)parsingRes.get("query"));
            System.out.println("path = " + (String)parsingRes.get("path"));
            
        
        } catch (Exception e) {
            
            System.out.println("Exception in VOSURIParserTest main");
            e.printStackTrace();
            
        }
        
    }
    
}
