|
1 | 1 | import datetime as dt
|
2 | 2 | from enum import Enum
|
3 |
| -from typing import ForwardRef, List, Optional, Set, Union |
| 3 | +from typing import ForwardRef, List, Optional, Set, Union, NewType |
| 4 | + |
| 5 | +anyURI = NewType('anyURI', str) # noqa: N816 |
| 6 | +anySimpleType = NewType('anySimpleType', str) # noqa: N816 |
| 7 | +decimal = NewType('decimal', str) |
| 8 | +dateTimeStamp = NewType('dateTimeStamp', dt.datetime) # noqa: N816 |
| 9 | +gYear = NewType('gYear', str) # noqa: N816 |
| 10 | +gMonth = NewType('gMonth', str) # noqa: N816 |
| 11 | +gDay = NewType('gDay', str) # noqa: N816 |
| 12 | +gYearMonth = NewType('gYearMonth', str) # noqa: N816 |
| 13 | +yearMonthDuration = NewType('yearMonthDuration', str) # noqa: N816 |
| 14 | +dayTimeDuration = NewType('dayTimeDuration', str) # noqa: N816 |
| 15 | +byte = NewType('byte', int) |
| 16 | +short = NewType('short', int) |
| 17 | +long = NewType('long', int) |
| 18 | +unsignedByte = NewType('unsignedByte', int) # noqa: N816 |
| 19 | +unsignedShort = NewType('unsignedShort', int) # noqa: N816 |
| 20 | +unsignedInt = NewType('unsignedInt', int) # noqa: N816 |
| 21 | +unsignedLong = NewType('unsignedLong', int) # noqa: N816 |
| 22 | +positiveInteger = NewType('positiveInteger', int) # noqa: N816 |
| 23 | +negativeInteger = NewType('negativeInteger', int) # noqa: N816 |
| 24 | +nonPositiveInteger = NewType('nonPositiveInteger', int) # noqa: N816 |
| 25 | +nonNegativeInteger = NewType('nonNegativeInteger', int) # noqa: N816 |
| 26 | +base64Binary = NewType('base64Binary', str) # noqa: N816 |
| 27 | +hexBinary = NewType('hexBinary', str) # noqa: N816 |
| 28 | +anyURI = NewType('anyURI', str) # noqa: N816 |
| 29 | +language = NewType('language', str) |
| 30 | +normalizedString = NewType('normalizedString', str) # noqa: N816 |
| 31 | +token = NewType('token', str) |
| 32 | +NMTOKEN = NewType('NMTOKEN', str) |
| 33 | +Name = NewType('Name', str) |
| 34 | +NCName = NewType('NCName', str) |
4 | 35 |
|
5 | 36 | CONVERT_TYPE = {
|
6 | 37 | str: "xsd:string",
|
7 | 38 | bool: "xsd:boolean",
|
8 | 39 | float: "xsd:double",
|
9 | 40 | int: "xsd:integer",
|
| 41 | + long: "xsd:long", |
10 | 42 | dict: "sys:JSON",
|
| 43 | + gYear: "xsd:gYear", |
11 | 44 | dt.datetime: "xsd:dateTime",
|
12 | 45 | dt.date: "xsd:date",
|
13 | 46 | dt.time: "xsd:time",
|
14 | 47 | dt.timedelta: "xsd:duration",
|
| 48 | + anyURI : "xsd:anyURI", |
| 49 | + anySimpleType : "xsd:anySimpleType", |
| 50 | + decimal : "xsd:decimal", |
| 51 | + dateTimeStamp : "xsd:dateTimeStamp", |
| 52 | + gYear : "xsd:gYear", |
| 53 | + gMonth : "xsd:gMonth", |
| 54 | + gDay : "xsd:gDay", |
| 55 | + gYearMonth : "xsd:gYearMonth", |
| 56 | + yearMonthDuration : "xsd:yearMonthDuration", |
| 57 | + dayTimeDuration : "xsd:dayTimeDuration", |
| 58 | + byte : "xsd:byte", |
| 59 | + short : "xsd:short", |
| 60 | + long : "xsd:long", |
| 61 | + unsignedByte : "xsd:unsignedByte", |
| 62 | + unsignedShort : "xsd:unsignedShort", |
| 63 | + unsignedInt : "xsd:unsignedInt", |
| 64 | + unsignedLong : "xsd:unsignedLong", |
| 65 | + positiveInteger : "xsd:positiveInteger", |
| 66 | + negativeInteger : "xsd:negativeInteger", |
| 67 | + nonPositiveInteger : "xsd:nonPositiveInteger", |
| 68 | + nonNegativeInteger : "xsd:nonNegativeInteger", |
| 69 | + base64Binary : "xsd:base64Binary", |
| 70 | + hexBinary : "xsd:hexBinary", |
| 71 | + anyURI : "xsd:anyURI", |
| 72 | + language : "xsd:language", |
| 73 | + normalizedString : "xsd:normalizedString", |
| 74 | + token : "xsd:token", |
| 75 | + NMTOKEN : "xsd:NMTOKEN", |
| 76 | + Name : "xsd:Name", |
| 77 | + NCName : "xsd:NCName", |
15 | 78 | }
|
16 | 79 |
|
17 | 80 |
|
|
0 commit comments