<commit_before>import grails.converters.*


class HeatmapLinksService {

    boolean transactional = false

    def serviceMethod() {

    }
    
    def fetchParseXml(String base) {
//        def base = "http://lpgws.nci.nih.gov/perl/heatmap?xml_dump=1"
        def url = new URL(base)
        def connection = url.openConnection()

        def resultsList = []
       
        if(connection.responseCode == 200){
          def xml = connection.content.text
          def heatmap_datasets = new XmlSlurper().parseText(xml)
          def datasets = heatmap_datasets.dataset;
         datasets.each(
		 {
			 def result = [:]
			 result.dataset_id = it.dataset_id as String 
			 result.dataset_type = it.dataset_type as String
			 result.title = it.title as String
			 result.launch_url = it.launch_url as String
			 //may want to perform a context check here and search for only those w/ proper projects
			 result.project = it.project as String
			 resultsList << result
		 }
        )
          return resultsList
          
//          result.name = geonames.geoname.name as String 
//          result.lat = geonames.geoname.lat as String
//          result.lng = geonames.geoname.lng as String
//          result.state = geonames.geoname.adminCode1 as String
//          result.country = geonames.geoname.countryCode as String
        }
        else{
          println("failed");
        }      
//        return result
      }

}
<commit_msg>updated parser based on new feed<commit_after>import grails.converters.*


class HeatmapLinksService {

    boolean transactional = false

    def serviceMethod() {

    }
    
    def fetchParseXml(String base) {
   //base should contain &project=TCGA%20GBM for example
   //parse this as json - dont copy over each prop, just take the whole feed
   
//    	def heatmap_datasets = new XmlSlurper().parse(base)
    	

        def url = new URL(base)
        def connection = url.openConnection()

        def resultsList = []
  
        return connection.content.text

   /*
        if(connection.responseCode == 200){
          def xml = connection.content.text
          def heatmap_datasets = new XmlSlurper().parseText(xml)
          def datasets = heatmap_datasets.dataset;
         datasets.each(
		 {
			 def result = [:]
			 result.dataset_id = it.dataset_id as String 
			 result.dataset_type = it.dataset_type as String
			 result.title = it.title as String
			 result.launch_url = it.launch_url as String
			 //may want to perform a context check here and search for only those w/ proper projects
			 result.project = it.project as String
			 resultsList << result
		 }
        )
          return resultsList
        }
        else{
          println("failed");
        }      
*/
      }

}

{'fraction_non_alphanumeric': 0.08509090909090909, 'fraction_numerical': 0.0036363636363636364, 'mean_word_length': 2.06347438752784, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7383063', 'n_tokens_mistral': 842, 'n_tokens_neox': 755, 'n_words': 212}