0
|
1 |
"{ Package: 'stx:goodies/xmlsuite/xquery' }"
|
|
2 |
|
|
3 |
"{ NameSpace: XQuery }"
|
|
4 |
|
|
5 |
Object subclass:#TypeItem
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'XQuery-Types'
|
|
10 |
!
|
|
11 |
|
|
12 |
TypeItem class instanceVariableNames:'theInstance'
|
|
13 |
|
|
14 |
"
|
|
15 |
No other class instance variables are inherited by this class.
|
|
16 |
"
|
|
17 |
!
|
|
18 |
|
|
19 |
|
|
20 |
!TypeItem class methodsFor:'* As yet uncategorized *'!
|
|
21 |
|
|
22 |
xsString
|
|
23 |
|
|
24 |
|
|
25 |
^TypeXSString instance
|
|
26 |
|
|
27 |
"Created: / 05-12-2007 / 15:25:15 / janfrog"
|
|
28 |
! !
|
|
29 |
|
|
30 |
!TypeItem class methodsFor:'accessing'!
|
|
31 |
|
|
32 |
attribute
|
|
33 |
|
|
34 |
^TypeAttribute instance
|
|
35 |
|
|
36 |
"Created: / 05-12-2007 / 15:17:01 / janfrog"
|
|
37 |
!
|
|
38 |
|
|
39 |
document
|
|
40 |
|
|
41 |
^TypeDocument instance
|
|
42 |
|
|
43 |
"Created: / 05-12-2007 / 15:17:08 / janfrog"
|
|
44 |
!
|
|
45 |
|
|
46 |
instance
|
|
47 |
|
|
48 |
theInstance ifNil:[theInstance := self new].
|
|
49 |
^theInstance
|
|
50 |
|
|
51 |
"Created: / 05-12-2007 / 14:48:07 / janfrog"
|
|
52 |
!
|
|
53 |
|
|
54 |
node
|
|
55 |
|
|
56 |
^TypeNode instance
|
|
57 |
|
|
58 |
"Created: / 05-12-2007 / 15:16:54 / janfrog"
|
|
59 |
!
|
|
60 |
|
|
61 |
text
|
|
62 |
|
|
63 |
^TypeText instance
|
|
64 |
|
|
65 |
"Created: / 05-12-2007 / 15:17:32 / janfrog"
|
|
66 |
!
|
|
67 |
|
|
68 |
xsBoolean
|
|
69 |
|
|
70 |
^TypeXSBoolean instance
|
|
71 |
|
|
72 |
"Created: / 05-12-2007 / 15:17:17 / janfrog"
|
|
73 |
!
|
|
74 |
|
|
75 |
xsFloat
|
|
76 |
|
|
77 |
^TypeXSFloat instance
|
|
78 |
|
|
79 |
"Created: / 05-12-2007 / 15:15:36 / janfrog"
|
|
80 |
!
|
|
81 |
|
|
82 |
xsInteger
|
|
83 |
|
|
84 |
^TypeXSInteger instance
|
|
85 |
|
|
86 |
"Created: / 05-12-2007 / 15:17:25 / janfrog"
|
|
87 |
! !
|
|
88 |
|
|
89 |
!TypeItem methodsFor:'accessing'!
|
|
90 |
|
|
91 |
supertype
|
|
92 |
|
|
93 |
^self class == TypeItem
|
|
94 |
ifFalse:[self class superclass instance]
|
|
95 |
ifTrue:[nil]
|
|
96 |
|
|
97 |
"Created: / 05-12-2007 / 14:50:02 / janfrog"
|
|
98 |
!
|
|
99 |
|
|
100 |
typeName
|
|
101 |
|
|
102 |
^self subclassResponsibility
|
|
103 |
|
|
104 |
"Created: / 05-12-2007 / 20:50:11 / janfrog"
|
|
105 |
! !
|
|
106 |
|
|
107 |
!TypeItem methodsFor:'printing'!
|
|
108 |
|
|
109 |
printOn: aStream
|
|
110 |
|
|
111 |
aStream nextPutAll: self typeName
|
|
112 |
|
|
113 |
"Created: / 05-12-2007 / 20:51:23 / janfrog"
|
|
114 |
! !
|
|
115 |
|
|
116 |
!TypeItem methodsFor:'testing'!
|
|
117 |
|
|
118 |
isSubtypeOf: anotherType
|
|
119 |
|
|
120 |
^self = anotherType
|
|
121 |
ifTrue:
|
|
122 |
[true]
|
|
123 |
ifFalse:
|
|
124 |
[self class == TypeItem
|
|
125 |
ifTrue:
|
|
126 |
[false]
|
|
127 |
ifFalse:
|
|
128 |
[self supertype isSubtypeOf: anotherType]]
|
|
129 |
|
|
130 |
"Created: / 05-12-2007 / 14:55:52 / janfrog"
|
|
131 |
!
|
|
132 |
|
|
133 |
isSupertypeOf: anotherType
|
|
134 |
|
|
135 |
^anotherType isSubtypeOf: self
|
|
136 |
|
|
137 |
"Created: / 05-12-2007 / 14:55:52 / janfrog"
|
|
138 |
! !
|
|
139 |
|
|
140 |
!TypeItem class methodsFor:'documentation'!
|
|
141 |
|
|
142 |
version
|
|
143 |
^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/xquery/XQuery__TypeItem.st,v 1.1 2007-12-05 21:10:24 vranyj1 Exp $'
|
|
144 |
! !
|