LSA stores data as uninterpreted string of bytes. Values can be stored
as node or edge properties. The default node property to store an
ingested value is https://lschema.org/nodeValue. An optional
https://lschema.org/valueType term specifies the data type of the
value. If a value has no value type or an unrecognized value type, it
is stored and processed as a raw string. LSA recognizes the following
value types and can perform conversions between compatible values:
| valueType | Examples | Description |
|---|---|---|
https:/json-schema.org/booleanjson:boolean |
true, false | JSON boolean value |
http://www.w3.org/2001/XMLSchema/booleanxsd:booleanxs:boolean |
true, 1 false, 0 |
XML boolean value, can be "true", "false", "0", or "1". |
http://www.w3.org/2001/XMLSchema/gDayxsd:gDayxs:gDay |
1, 02 | XML Gregorian date day part |
http://www.w3.org/2001/XMLSchema/gMonthxsd:gMonthxs:gMonth |
06, 6, 11 | XML Gregorian date month part |
http://www.w3.org/2001/XMLSchema/gYearxsd:gYearxs:gYear |
2001 | XML Gregorian date year part. |
http://www.w3.org/2001/XMLSchema/gMonthDayxsd:gMonthDayxs:gMonthDay |
01-05, 1-5 | XML Gregorian date month and day. |
http://www.w3.org/2001/XMLSchema/gYearMonthxsd:gYearMonthxs:gYearMonth |
2002-01, 2002-1 | XML Gregorian date year and month. |
http://www.w3.org/2001/XMLSchema/datexsd:datexs:date |
2002-02-15 2002-02-15Z |
XML date. |
http://www.w3.org/2001/XMLSchema/timexsd:timexs:time |
13:20:00 |
XML time. |
http://www.w3.org/2001/XMLSchema/dateTimexsd:dateTimexs:dateTime |
XML date-time. | |
https:/json-schema.org/datejson:date |
2006-01-02 | RFC3339 JSON date. |
https:/json-schema.org/date-timejson:date-time |
RFC3339 JSON date-time. | |
https:/json-schema.org/timejson:time |
15:04:05Z07:00 | RFC3339 JSON time. |
https://unixtime.org/timeunix:time |
1649979010 | UNIX Epoch time in seconds. |
https://unixtime.org/timeNanounix:timeNano |
UNIX Epoch time in nanoseconds | |
https://lschema.org/dateTimels:dateTime |
See below | Date-time based on a pattern. The pattern is given in
https://lschema.org/goTimeFormat, ls:goTimeFormat,
https://lschema.org/momentTimeFormat, or ls:momentTimeFormat.
|
https://lschema.org/datels:date |
See below | Date based on a pattern. The pattern is given in
https://lschema.org/goTimeFormat, ls:goTimeFormat,
https://lschema.org/momentTimeFormat, or ls:momentTimeFormat.
|
https://lschema.org/timels:time |
See below | Time based on a pattern. The pattern is given in
https://lschema.org/goTimeFormat, ls:goTimeFormat,
https://lschema.org/momentTimeFormat, or ls:momentTimeFormat.
|
If none of the standard date-time patterns do not match the data at hand, it is possible to provide a pattern to process date, time, or date-time values.
To process a date value that looks like January 1 2020, use:
{
"@id": "attr1",
"@type": "Value",
"valueType": "ls:date",
"momentTimeFormat": "MMMM D YYYY"
}The annotation ls:momentTimeFormat allows specifying format using
the Go implementation of JS Moment library
conventions.
The ls:goTimeFormat allows specifying date/time format using the Go
standard library time
format.