Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nonNegativeInteger datatype recognition #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/plaza/rdf/implementations/common.clj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
(= "float" (.toLowerCase (keyword-to-string lit))) XSDDatatype/XSDfloat
(= "int" (.toLowerCase (keyword-to-string lit))) XSDDatatype/XSDint
(= "integer" (.toLowerCase (keyword-to-string lit))) XSDDatatype/XSDinteger
(= "nonnegativeinteger" (.toLowerCase (keyword-to-string lit))) XSDDatatype/XSDnonNegativeInteger
(= "long" (.toLowerCase (keyword-to-string lit))) XSDDatatype/XSDlong
(= "string" (.toLowerCase (keyword-to-string lit))) XSDDatatype/XSDstring
:else (make-custom-type literal)))))
Expand All @@ -70,6 +71,7 @@
"float" (keyword lit)
"int" (keyword lit)
"integer" (keyword lit)
"nonNegativeInteger" (keyword lit)
"long" (keyword lit)
"string" (keyword lit)
nil))))
Expand Down
2 changes: 2 additions & 0 deletions src/plaza/rdf/implementations/sesame.clj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
(= "float" (.toLowerCase (keyword-to-string lit))) "http://www.w3.org/2001/XMLSchema#float"
(= "int" (.toLowerCase (keyword-to-string lit))) "http://www.w3.org/2001/XMLSchema#int"
(= "integer" (.toLowerCase (keyword-to-string lit))) "http://www.w3.org/2001/XMLSchema#integer"
(= "nonnegativeinteger" (.toLowerCase (keyword-to-string lit))) "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
(= "long" (.toLowerCase (keyword-to-string lit))) "http://www.w3.org/2001/XMLSchema#long"
(= "string" (.toLowerCase (keyword-to-string lit))) "http://www.w3.org/2001/XMLSchema#string"
:else literal))))
Expand All @@ -61,6 +62,7 @@
(= "http://www.w3.org/2001/XMLSchema#float" (str (.getDatatype lit))) (.floatValue lit)
(= "http://www.w3.org/2001/XMLSchema#int" (str (.getDatatype lit))) (.intValue lit)
(= "http://www.w3.org/2001/XMLSchema#integer" (str (.getDatatype lit))) (.integerValue lit)
(= "http://www.w3.org/2001/XMLSchema#nonNegativeInteger" (str (.getDatatype lit))) (.integerValue lit)
(= "http://www.w3.org/2001/XMLSchema#long" (str (.getDatatype lit))) (.longValue lit)
(= "http://www.w3.org/2001/XMLSchema#string" (str (.getDatatype lit))) (.stringValue lit)
true (.stringValue lit))))
Expand Down