« February 2009 | Main | April 2009 »

March 13, 2009

truncated dates in ISO 8601

I have looked into the truncated date issue. From wikipedia article on ISO 8601 you find:
"The standard also allows for calendar dates to be written with reduced precision. For example, one may write "1981-04" to mean "1981 April", and one may simply write "1981" to refer to that year or "19" to refer to that century." So if we use the date "1981", we will be compliant to iso 8601 ( latest version : iso 8601:2004). The only issue raised was that the software developer must decide on a way to compare dates of different precision , i.e. is 1981 before or after 1981-02. I did not look into this very deeply but I could find no standard for this. I won't spend any time on this comparison issue right now. Here are a couple of other URLs
FAQ on ISO 8601 Allowed values for MODS attributes (including datetime) ISO 8601 examples

March 11, 2009

Googlebot probing our AgEcon search engine

The Googlebot is sending in simple search requests to AgEcon. This calls our search engine. The IP that was sent the commands was 66.249.70.195 which is a legitimate google robot.

Start time : 01/Mar/2009:04:02:25
Stop time: 04/Mar/2009:09:33:29
Number of Commands: 70
Break down of commands:
query number
bse 41
Canavari 16
EQIP 13

A couple of notes, Google employs more IPs than 66.249.70.195, so there may be other queries being sent to our simple search interface. Also the ip 66.249.70.195 sent a total of 48,736 requests in that time range, so this is a small effort. I do not know why they are doing this. It may be an attempt to confirm that they are getting all the papers by "Canavari". A type of sanity check on their crawler, but I don't really know.

March 9, 2009

sql for rollup stats in the dspace database

A) Find all the item handles that belong to a community with a community id of 4

SELECT handle.handle FROM community2item, handle WHERE community2item.item_id = handle.resource_id AND handle.resource_type_id = 2 AND community2item.community_id = 4

B) Turning a community handle into a resource id (community id)

SELECT handle.resource_id FROM handle WHERE handle=125 AND resource_type_id=4;

resource_id
-------------
4
Note: resource_type_id=4 means community.

C) Substitute B into A -> Item handles in terms of community handle

SELECT count (handle) FROM community2item, handle WHERE community2item.item_id = handle.resource_id AND handle.resource_type_id = 2 AND community2item.community_id = (SELECT handle.resource_id FROM handle WHERE handle=125 AND resource_type_id=4);

Note: resource_type_id=2 means item.

March 6, 2009

truncated dates are iso 8601 compliant

I have looked into the truncated date issue. From wikipedia on iso 8601 you find:

"The standard also allows for calendar dates to be written with reduced precision. For example, one may write "1981-04" to mean "1981 April", and one may simply write "1981" to refer to that year or "19" to refer to that century."
So if we use the date "1981", we will be compliant to iso 8601 ( latest version : iso 8601:2004). The only issue raised was that the software developer must decide on a way to compare dates of different precision , i.e. is 1981 before or after 1981-02. I did not look into this very deeply but I could find no standard for this. I won't spend any time on this comparison issue right now.
Here are a couple of other URLs FAQ on ISO 8601 Info on allowed values for MODS attributes (including datetime) Date time format examples