forked from cgirardi/newsparser
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTestParser.java
More file actions
31 lines (23 loc) · 777 Bytes
/
TestParser.java
File metadata and controls
31 lines (23 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.util.*;
import fbk.hlt.parsing.CGTDocumentInterface;
/**
* Author: Christian Girardi (cgirardi@fbk.eu)
* Date: 2-mag-2013
*/
public class TestParser implements CGTDocumentInterface {
public LinkedHashMap getHeader(String url, String text, LinkedHashMap header) {
return null;
}
public String getBody(String url, String text, LinkedHashMap header) {
String annotation = "";
if (header != null)
annotation += "HEADER METADATA: " + header.size() + "\n";
else
annotation += "NO HEADER\n";
if (text != null)
annotation += "TEXT LENGTH: " + String.valueOf(text.length()) + " chars\n";
else
annotation += "NO TEXT\n";
return annotation;
}
}