@Override
	public void getResults(Course curr, StyledDocument doc) {
		// TODO Auto-generated method stub
		
		
		// Load the default style and add it as the "regular" text
		Style def = StyleContext.getDefaultStyleContext().getStyle( StyleContext.DEFAULT_STYLE );

		Style regular = doc.addStyle( "regular", def );

		// Create a bold style
		Style bold = doc.addStyle( "bold", regular );
		StyleConstants.setBold( bold, true );
		
		

		Map<String,Object> data = curr.getCourseInfo();

		Set<String> keys = data.keySet();
		Iterator<String> kIter = keys.iterator();

		while(kIter.hasNext())
		{
			String key = kIter.next();

			try {
				

				if (key == CourseData.INSTRUCTOR.toString())
				{
				}
				else
				{
					doc.insertString( doc.getLength(), key, bold);
					doc.insertString(doc.getLength(), ": ",regular);

					String val = curr.getValue(key).toString().replace("[", "");
					val = val.replace("]", "");
					
					
					doc.insertString(doc.getLength(), val + "  ", regular);
				}

			} catch (BadLocationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}


		}
		Object ins = curr.getValue(CourseData.INSTRUCTOR.toString());
		
		if (ins != null)
		{
			
			try {
				doc.insertString( doc.getLength(), CourseData.INSTRUCTOR.toString(), bold);
				doc.insertString(doc.getLength(), ": ",regular);
			} catch (BadLocationException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}

			String val = curr.getValue(CourseData.INSTRUCTOR.toString()).toString().replace("[", "");
			val = val.replace("]", "");
			
			ArrayList<String> names = (ArrayList<String>) ins;

			for (int i = 0; i < names.size(); i++)
			{

				//ArrayList<String> names = parseNames(val);

				//String text = names.get(i);
				String text = parseNames(names.get(i));


				String url = "http://google.com/search?btnI=1&q=site%3Ahttp%3A//www.ratemyprofessors.com/ShowRatings.jsp%3Ftid%3D%20%22York%20College%20of%20Pennsylvania%22" + text;

				text = text.replace("%20", " ").trim();


				try {

					SimpleAttributeSet attr = new SimpleAttributeSet();
					attr.addAttribute(StyleConstants.Underline, Boolean.TRUE);
					attr.addAttribute(StyleConstants.Foreground, Color.BLUE);


					SimpleAttributeSet hrefAttr = new SimpleAttributeSet();
					hrefAttr.addAttribute(HTML.Attribute.HREF, url.toString());



					SimpleAttributeSet attrs = new SimpleAttributeSet();
					attrs.addAttribute(HTML.Tag.A, hrefAttr);

					// Add the text along with its attributes.

					int offset = doc.getLength();
					int length = text.length();

					doc.insertString(doc.getLength(), text, attr);


					doc.setCharacterAttributes(offset, length, attrs, false);
					//doc.setCharacterAttributes(offset, length, attr, false);


				}
				catch (BadLocationException e) {
					e.printStackTrace(System.err);
				}        

			}

			try {
				doc.insertString(doc.getLength(), "  ", regular);
			} catch (BadLocationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		
		

	}