knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
xsd.h
Go to the documentation of this file.
1 /*
2  * This file is part of KnowRob, please consult
3  * https://github.com/knowrob/knowrob for license details.
4  */
5 
6 #ifndef KNOWROB_XSD_H
7 #define KNOWROB_XSD_H
8 
9 #include <string>
10 #include "knowrob/terms/IRIAtom.h"
11 
12 namespace knowrob::xsd {
13  constexpr std::string_view prefix = "http://www.w3.org/2001/XMLSchema#";
14 
15  const IRIAtomPtr IRI_anyURI = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#anyURI");
16  const IRIAtomPtr IRI_string = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#string");
17  const IRIAtomPtr IRI_token = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#token");
18  const IRIAtomPtr IRI_normalizedString = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#normalizedString");
19  const IRIAtomPtr IRI_language = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#language");
20 
21  const IRIAtomPtr IRI_int = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#int");
22  const IRIAtomPtr IRI_integer = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#integer");
23  const IRIAtomPtr IRI_positiveInteger = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#positiveInteger");
24  const IRIAtomPtr IRI_negativeInteger = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#negativeInteger");
25  const IRIAtomPtr IRI_nonNegativeInteger = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#nonNegativeInteger");
26  const IRIAtomPtr IRI_nonPositiveInteger = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#nonPositiveInteger");
27  const IRIAtomPtr IRI_unsignedInt = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#unsignedInt");
28  const IRIAtomPtr IRI_long = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#long");
29  const IRIAtomPtr IRI_unsignedLong = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#unsignedLong");
30  const IRIAtomPtr IRI_short = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#short");
31  const IRIAtomPtr IRI_unsignedShort = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#unsignedShort");
32  const IRIAtomPtr IRI_byte = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#byte");
33  const IRIAtomPtr IRI_unsignedByte = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#unsignedByte");
34  const IRIAtomPtr IRI_boolean = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#boolean");
35 
36  const IRIAtomPtr IRI_decimal = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#decimal");
37  const IRIAtomPtr IRI_double = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#double");
38  const IRIAtomPtr IRI_float = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#float");
39 
40  const IRIAtomPtr IRI_date = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#date");
41  const IRIAtomPtr IRI_dateTime = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#dateTime");
42  const IRIAtomPtr IRI_duration = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#duration");
43  const IRIAtomPtr IRI_gDay = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#gDay");
44  const IRIAtomPtr IRI_gMonth = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#gMonth");
45  const IRIAtomPtr IRI_gMonthDay = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#gMonthDay");
46  const IRIAtomPtr IRI_gYear = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#gYear");
47  const IRIAtomPtr IRI_gYearMonth = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#gYearMonth");
48  const IRIAtomPtr IRI_time = IRIAtom::Tabled("http://www.w3.org/2001/XMLSchema#time");
49 
54  bool isNumericType(std::string_view iri);
55 
60  bool isDoubleType(std::string_view iri);
61 
66  bool isIntegerType(std::string_view iri);
67 
72  bool isStringType(std::string_view iri);
73 
78  bool isBooleanType(std::string_view iri);
79 
84  bool isDateType(std::string_view iri);
85 
86 } // knowrob::xsd
87 
88 #endif //KNOWROB_XSD_H
static std::shared_ptr< IRIAtom > Tabled(std::string_view stringForm)
Definition: IRIAtom.cpp:25
const IRIAtomPtr IRI_byte
Definition: xsd.h:32
const IRIAtomPtr IRI_integer
Definition: xsd.h:22
const IRIAtomPtr IRI_positiveInteger
Definition: xsd.h:23
bool isDoubleType(std::string_view iri)
Definition: xsd.cpp:89
const IRIAtomPtr IRI_unsignedByte
Definition: xsd.h:33
const IRIAtomPtr IRI_gYear
Definition: xsd.h:46
const IRIAtomPtr IRI_decimal
Definition: xsd.h:36
const IRIAtomPtr IRI_string
Definition: xsd.h:16
const IRIAtomPtr IRI_dateTime
Definition: xsd.h:41
const IRIAtomPtr IRI_gDay
Definition: xsd.h:43
const IRIAtomPtr IRI_short
Definition: xsd.h:30
const IRIAtomPtr IRI_boolean
Definition: xsd.h:34
const IRIAtomPtr IRI_language
Definition: xsd.h:19
const IRIAtomPtr IRI_long
Definition: xsd.h:28
const IRIAtomPtr IRI_nonPositiveInteger
Definition: xsd.h:26
const IRIAtomPtr IRI_normalizedString
Definition: xsd.h:18
const IRIAtomPtr IRI_gMonth
Definition: xsd.h:44
const IRIAtomPtr IRI_int
Definition: xsd.h:21
const IRIAtomPtr IRI_unsignedShort
Definition: xsd.h:31
bool isDateType(std::string_view iri)
Definition: xsd.cpp:99
const IRIAtomPtr IRI_unsignedLong
Definition: xsd.h:29
bool isStringType(std::string_view iri)
Definition: xsd.cpp:74
bool isBooleanType(std::string_view iri)
Definition: xsd.cpp:94
bool isIntegerType(std::string_view iri)
Definition: xsd.cpp:84
const IRIAtomPtr IRI_unsignedInt
Definition: xsd.h:27
const IRIAtomPtr IRI_gYearMonth
Definition: xsd.h:47
bool isNumericType(std::string_view iri)
Definition: xsd.cpp:79
const IRIAtomPtr IRI_float
Definition: xsd.h:38
const IRIAtomPtr IRI_anyURI
Definition: xsd.h:15
constexpr std::string_view prefix
Definition: xsd.h:13
const IRIAtomPtr IRI_date
Definition: xsd.h:40
const IRIAtomPtr IRI_gMonthDay
Definition: xsd.h:45
const IRIAtomPtr IRI_token
Definition: xsd.h:17
const IRIAtomPtr IRI_nonNegativeInteger
Definition: xsd.h:25
const IRIAtomPtr IRI_time
Definition: xsd.h:48
const IRIAtomPtr IRI_negativeInteger
Definition: xsd.h:24
const IRIAtomPtr IRI_duration
Definition: xsd.h:42
const IRIAtomPtr IRI_double
Definition: xsd.h:37
IRIAtomPtr iri(std::string_view ns, std::string_view name)
Definition: IRIAtom.cpp:62
std::shared_ptr< IRIAtom > IRIAtomPtr
Definition: IRIAtom.h:57