Updated crawled file compute in case of 1970 date.

This commit is contained in:
Christian P. MOMON 2021-05-16 11:46:11 +02:00
parent 9a23ad5551
commit 47d4a62ac7
3 changed files with 60 additions and 0 deletions

View file

@ -122,6 +122,21 @@ public class Federation extends PathPropertyList
return result; return result;
} }
/**
* Gets the crawl date.
*
* @return the crawl date
*/
public LocalDateTime getCrawlDate()
{
LocalDateTime result;
result = LocalDateTime.parse(get("crawl.datetime"));
//
return result;
}
/** /**
* Gets the crawled date. * Gets the crawled date.
* *
@ -133,6 +148,11 @@ public class Federation extends PathPropertyList
result = LocalDateTime.parse(get("crawl.file.datetime")); result = LocalDateTime.parse(get("crawl.file.datetime"));
if (result.getYear() == 1970)
{
result = getCrawlDate();
}
// //
return result; return result;
} }

View file

@ -130,6 +130,21 @@ public class Organization extends PathPropertyList
return result; return result;
} }
/**
* Gets the crawl date.
*
* @return the crawl date
*/
public LocalDateTime getCrawlDate()
{
LocalDateTime result;
result = LocalDateTime.parse(get("crawl.datetime"));
//
return result;
}
/** /**
* Gets the crawled date. * Gets the crawled date.
* *
@ -141,6 +156,11 @@ public class Organization extends PathPropertyList
result = LocalDateTime.parse(get("crawl.file.datetime")); result = LocalDateTime.parse(get("crawl.file.datetime"));
if (result.getYear() == 1970)
{
result = getCrawlDate();
}
// //
return result; return result;
} }

View file

@ -188,6 +188,21 @@ public class Service extends PathPropertyList
return result; return result;
} }
/**
* Gets the crawl date.
*
* @return the crawl date
*/
public LocalDateTime getCrawlDate()
{
LocalDateTime result;
result = LocalDateTime.parse(get("crawl.datetime"));
//
return result;
}
/** /**
* Gets the crawled date. * Gets the crawled date.
* *
@ -199,6 +214,11 @@ public class Service extends PathPropertyList
result = LocalDateTime.parse(get("crawl.file.datetime")); result = LocalDateTime.parse(get("crawl.file.datetime"));
if (result.getYear() == 1970)
{
result = getCrawlDate();
}
// //
return result; return result;
} }