-
-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
116 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// timeline.java | ||
// (C) 2009 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany | ||
// first published 27.02.2009 on http://yacy.net | ||
// | ||
// This is a part of YaCy, a peer-to-peer based web search engine | ||
// | ||
// $LastChangedDate: 2009-02-10 01:06:59 +0100 (Di, 10 Feb 2009) $ | ||
// $LastChangedRevision: 5586 $ | ||
// $LastChangedBy: orbiter $ | ||
// | ||
// LICENSE | ||
// | ||
// This program is free software; you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation; either version 2 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program; if not, write to the Free Software | ||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
||
import java.util.Date; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import net.yacy.cora.protocol.RequestHeader; | ||
import net.yacy.search.EventTracker; | ||
import net.yacy.search.Switchboard; | ||
import net.yacy.server.serverObjects; | ||
import net.yacy.server.serverSwitch; | ||
|
||
public final class timeline_p { | ||
|
||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) { | ||
// return variable that accumulates replacements | ||
final Switchboard sb = (Switchboard) env; | ||
|
||
final serverObjects prop = new serverObjects(); | ||
if ((post == null) || (env == null)) return prop; | ||
|
||
|
||
final String[] data = post.get("data", "").split(","); // a string of word hashes that shall be searched and combined | ||
Map<String, Map<Date, EventTracker.Event>> proc = new HashMap<>(); | ||
for (String s: data) proc.put(s, null); | ||
|
||
/* | ||
while (i.hasNext() && c < count) { | ||
entry = i.next(); | ||
lm = new Date(entry.lastModified()); | ||
lms = GenericFormatter.ANSIC_FORMATTER.format(lm); | ||
prop.put("event_" + c + "_time", lms); // like "Wed May 01 1963 00:00:00 GMT-0600" | ||
prop.put("event_" + c + "_isDuration", 0); // 0 (only a point) or 1 (period of time) | ||
prop.put("event_" + c + "_isDuration_duration", 0); // 0 (only a point) or 1 (period of time) | ||
prop.putHTML("event_" + c + "_type", "type"); // short title of the event | ||
prop.putHTML("event_" + c + "_description", ""); // long description of the event | ||
c++; | ||
} | ||
prop.put("event", c); | ||
*/ | ||
return prop; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<timeline> | ||
#{event}# | ||
<event time="#[time]#" isDuration=#(isDuration)#"false"::duration="#[duration]#"#(/isDuration)# type="#[type]#"> | ||
#[description]# | ||
</event> | ||
#{/event}# | ||
</timeline> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.