entry.setTitle(new PlainTextConstruct(title));
if (parser.containsKey("weburl")) {
String url = parser.getValue("weburl");
System.out.println("... with html contents from " + url);
DocumentSource docSource = new DocumentSource(DocumentSource.Type.HTML,
url);
entry.setDocumentSource(docSource);
} else if (parser.containsKey("wikipediaurl")) {
String url = parser.getValue("wikipediaurl");
System.out.println("... with mediawiki contents from " + url);
DocumentSource docSource = new DocumentSource(DocumentSource.Type.WIKI,
url);
entry.setDocumentSource(docSource);
} else if (parser.containsKey("knolurl")) {
String url = parser.getValue("knolurl");
System.out.println("... with knol contents from " + url);
DocumentSource docSource = new DocumentSource(DocumentSource.Type.KNOL,
url);
entry.setDocumentSource(docSource);
} else if (parser.containsKey("file")) {
String filename = parser.getValue("file");
System.out.println("... with contents from file at " + filename);