Data Types

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/boolean
json:boolean
true, false JSON boolean value
http://www.w3.org/2001/XMLSchema/boolean
xsd:boolean
xs:boolean
true, 1
false, 0
XML boolean value, can be "true", "false", "0", or "1".
http://www.w3.org/2001/XMLSchema/gDay
xsd:gDay
xs:gDay
1, 02 XML Gregorian date day part
http://www.w3.org/2001/XMLSchema/gMonth
xsd:gMonth
xs:gMonth
06, 6, 11 XML Gregorian date month part
http://www.w3.org/2001/XMLSchema/gYear
xsd:gYear
xs:gYear
2001 XML Gregorian date year part.
http://www.w3.org/2001/XMLSchema/gMonthDay
xsd:gMonthDay
xs:gMonthDay
01-05, 1-5 XML Gregorian date month and day.
http://www.w3.org/2001/XMLSchema/gYearMonth
xsd:gYearMonth
xs:gYearMonth
2002-01, 2002-1 XML Gregorian date year and month.
http://www.w3.org/2001/XMLSchema/date
xsd:date
xs:date
2002-02-15
2002-02-15+0300
2002-02-15Z
XML date.
http://www.w3.org/2001/XMLSchema/time
xsd:time
xs:time
13:20:00-05:00
13:20:00
XML time.
http://www.w3.org/2001/XMLSchema/dateTime
xsd:dateTime
xs:dateTime
2002-10-10T12:00:00-05:00
2002-10-10T17:00:00Z
XML date-time.
https:/json-schema.org/date
json:date
2006-01-02 RFC3339 JSON date.
https:/json-schema.org/date-time
json:date-time
2006-01-02T15:04:05Z07:00 RFC3339 JSON date-time.
https:/json-schema.org/time
json:time
15:04:05Z07:00 RFC3339 JSON time.
https://unixtime.org/time
unix:time
1649979010 UNIX Epoch time in seconds.
https://unixtime.org/timeNano
unix:timeNano
1649979038230000000 UNIX Epoch time in nanoseconds
https://lschema.org/dateTime
ls: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/date
ls: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/time
ls: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.

Pattern date-time

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.