mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
*) Trying to set the document title properly
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@154 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
285936d778
commit
7994c485f1
|
@ -125,6 +125,14 @@ public class pdfParser extends AbstractParser implements Parser {
|
|||
|
||||
byte[] contents = out.toByteArray();
|
||||
|
||||
if ((docTitle == null) || (docTitle.length() == 0)) {
|
||||
docTitle = ((contents.length > 80)? new String(contents, 0, 80):new String(contents)).
|
||||
replaceAll("\r\n"," ").
|
||||
replaceAll("\n"," ").
|
||||
replaceAll("\r"," ").
|
||||
replaceAll("\t"," ");
|
||||
}
|
||||
|
||||
/*
|
||||
* public document(URL location, String mimeType,
|
||||
String keywords, String shortTitle, String longTitle,
|
||||
|
|
Loading…
Reference in New Issue
Block a user