(schema.org)
+ switch (itemprop) {
+ // itemprops of main element with microdata
+ case "latitude": //
+ this.lat = Double.parseDouble(propval); // TODO: possibly overwrite existing value (multiple coordinates in document)
+ break; // TODO: risk to mix up existing coordinate if longitude not given too
+ case "longitude": //
+ this.lon = Double.parseDouble(propval); // TODO: possibly overwrite existing value (multiple coordinates in document)
+ break; // TODO: risk to mix up existing coordinate if latitude not given too
+
+ case "startDate": //
+ try {
+ // parse ISO 8601 date
+ Date startDate = ISO8601Formatter.FORMATTER.parse(propval, this.timezoneOffset).getTime();
+ this.startDates.add(startDate);
+ } catch (ParseException e) {}
+ break;
+ case "endDate":
+ try {
+ // parse ISO 8601 date
+ Date endDate = ISO8601Formatter.FORMATTER.parse(propval, this.timezoneOffset).getTime();
+ this.endDates.add(endDate);
+ } catch (ParseException e) {}
+ break;
+ }
}
}
}
diff --git a/source/net/yacy/search/schema/CollectionConfiguration.java b/source/net/yacy/search/schema/CollectionConfiguration.java
index 6e26ff390..556275392 100644
--- a/source/net/yacy/search/schema/CollectionConfiguration.java
+++ b/source/net/yacy/search/schema/CollectionConfiguration.java
@@ -87,7 +87,6 @@ import net.yacy.cora.storage.HandleSet;
import net.yacy.cora.util.CommonPattern;
import net.yacy.cora.util.ConcurrentLog;
import net.yacy.cora.util.SpaceExceededException;
-import net.yacy.crawler.retrieval.Response;
import net.yacy.document.Condenser;
import net.yacy.document.Document;
import net.yacy.document.ProbabilisticClassifier;
@@ -637,7 +636,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
final List startDates = html.getStartDates();
if (startDates.size() > 0) add(doc, CollectionSchema.startDates_dts, startDates.toArray(new Date[startDates.size()]));
- final List endDates = html.getStartDates();
+ final List endDates = html.getEndDates();
if (endDates.size() > 0) add(doc, CollectionSchema.endDates_dts, endDates.toArray(new Date[endDates.size()]));
final List articles = html.getArticles();