21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/csv2schema/schema.rb', line 21
def get_type(format)
{
string: 'http://www.w3.org/2001/XMLSchema#string',
numeric: 'http://www.w3.org/2001/XMLSchema#int',
float: 'http://www.w3.org/2001/XMLSchema#float',
uri: 'http://www.w3.org/2001/XMLSchema#anyURI',
boolean: 'http://www.w3.org/2001/XMLSchema#boolean',
date_db: 'http://www.w3.org/2001/XMLSchema#date',
dateTime_iso8601: 'http://www.w3.org/2001/XMLSchema#dateTime',
date_month: 'http://www.w3.org/2001/XMLSchema#gYearMonth',
dateTime_hms: 'http://www.w3.org/2001/XMLSchema#time'
}[format]
end
|