author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 05 Feb 2016 02:32:40 +0000 | |
changeset 303 | 04365cd0296b |
parent 296 | ea3dbc023c80 |
permissions | -rw-r--r-- |
0 | 1 |
"{ Package: 'stx:goodies/xmlsuite/xpath' }" |
2 |
||
3 |
"{ NameSpace: XMLv2 }" |
|
4 |
||
5 |
OrderedCollection subclass:#XPathExpression |
|
35
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
6 |
instanceVariableNames:'absolute parent startPosition stopPosition line' |
0 | 7 |
classVariableNames:'' |
8 |
poolDictionaries:'' |
|
9 |
category:'XML Suite-XPath' |
|
10 |
! |
|
11 |
||
12 |
||
13 |
!XPathExpression methodsFor:'accessing'! |
|
14 |
||
15 |
absolute |
|
16 |
^ absolute |
|
17 |
||
18 |
"Created: / 16-11-2007 / 08:35:44 / janfrog" |
|
19 |
! |
|
20 |
||
21 |
absolute:aBoolean |
|
22 |
absolute := aBoolean. |
|
23 |
||
24 |
"Created: / 16-11-2007 / 08:35:44 / janfrog" |
|
25 |
! |
|
26 |
||
35
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
27 |
line |
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
28 |
^ line |
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
29 |
|
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
30 |
"Created: / 01-12-2008 / 16:00:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
31 |
! |
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
32 |
|
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
33 |
line:anInteger |
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
34 |
line := anInteger. |
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
35 |
|
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
36 |
"Created: / 01-12-2008 / 16:00:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
37 |
! |
b70630fb532b
Added instvar line: to XPathExpression to be polymorph with Perseus::ASTNode
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
38 |
|
0 | 39 |
nodeTypeIcon |
40 |
||
41 |
^nil |
|
42 |
||
43 |
"Created: / 17-11-2007 / 14:48:55 / janfrog" |
|
44 |
! |
|
45 |
||
46 |
nodeTypeName |
|
47 |
||
48 |
^'XPathExpression' |
|
49 |
||
50 |
"Created: / 17-11-2007 / 14:48:46 / janfrog" |
|
51 |
! |
|
52 |
||
24
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
53 |
parent |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
54 |
^ parent |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
55 |
|
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
56 |
"Created: / 22-11-2008 / 08:11:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
57 |
! |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
58 |
|
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
59 |
parent:something |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
60 |
parent := something. |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
61 |
|
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
62 |
"Created: / 22-11-2008 / 08:11:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
63 |
! |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
64 |
|
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
65 |
source |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
66 |
|
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
67 |
^parent |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
68 |
ifNil:[nil] |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
69 |
ifNotNil:[parent source] |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
70 |
|
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
71 |
"Created: / 22-11-2008 / 08:11:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
72 |
! |
9a2db6739a5a
added required methods #parent, #parent: and #source to the XPathExpression
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
73 |
|
0 | 74 |
startPosition |
75 |
^ startPosition |
|
76 |
||
77 |
"Created: / 17-11-2007 / 14:41:21 / janfrog" |
|
78 |
! |
|
79 |
||
80 |
startPosition:anInteger |
|
81 |
startPosition := anInteger. |
|
82 |
||
83 |
"Created: / 17-11-2007 / 14:41:21 / janfrog" |
|
84 |
! |
|
85 |
||
86 |
stopPosition |
|
87 |
^ stopPosition |
|
88 |
||
89 |
"Created: / 17-11-2007 / 14:41:21 / janfrog" |
|
90 |
! |
|
91 |
||
92 |
stopPosition:anInteger |
|
93 |
stopPosition := anInteger. |
|
94 |
||
95 |
"Created: / 17-11-2007 / 14:41:21 / janfrog" |
|
96 |
! ! |
|
97 |
||
5
0dd7521c54b7
Loaded into & commited from 5.3.6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
98 |
|
0 | 99 |
!XPathExpression methodsFor:'debugging'! |
100 |
||
101 |
childrenDictionary |
|
102 |
||
103 |
| childrenDictionary | |
|
104 |
childrenDictionary := OrderedDictionary new. |
|
105 |
self keysAndValuesDo: |
|
106 |
[:index :locationStep| |
|
107 |
childrenDictionary |
|
108 |
at:'[',index printString,']' |
|
109 |
put: locationStep]. |
|
110 |
^childrenDictionary |
|
111 |
||
112 |
"Created: / 17-11-2007 / 14:42:08 / janfrog" |
|
113 |
! ! |
|
114 |
||
115 |
!XPathExpression methodsFor:'printing'! |
|
116 |
||
117 |
displayString |
|
118 |
||
119 |
^self printString |
|
120 |
||
121 |
"Created: / 15-11-2007 / 22:57:51 / janfrog" |
|
122 |
! |
|
123 |
||
124 |
printOn: stream |
|
125 |
||
126 |
self |
|
127 |
do:[:locationStep|locationStep printOn: stream] |
|
128 |
separatedBy:[stream nextPut:$/] |
|
129 |
||
130 |
"Created: / 15-11-2007 / 22:10:10 / janfrog" |
|
131 |
! ! |
|
132 |
||
133 |
!XPathExpression methodsFor:'testing'! |
|
134 |
||
135 |
isAbsolute |
|
136 |
||
137 |
^absolute |
|
138 |
||
139 |
"Created: / 16-11-2007 / 08:36:08 / janfrog" |
|
140 |
! |
|
141 |
||
142 |
isPerseusASTNode |
|
143 |
||
144 |
^true |
|
145 |
||
146 |
"Created: / 17-11-2007 / 14:41:48 / janfrog" |
|
147 |
! ! |
|
148 |
||
149 |
!XPathExpression methodsFor:'visiting'! |
|
150 |
||
151 |
acceptVisitor:aVisitor |
|
152 |
"Double dispatch back to the visitor, passing my type encoded in |
|
153 |
the selector (visitor pattern)" |
|
154 |
||
155 |
"stub code automatically generated - please change if required" |
|
156 |
||
157 |
^ aVisitor visitXPathExpression:self |
|
158 |
||
159 |
"Created: / 17-11-2007 / 15:10:43 / janfrog" |
|
160 |
! ! |
|
161 |
||
162 |
!XPathExpression class methodsFor:'documentation'! |
|
163 |
||
164 |
version |
|
165 |
^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/xpath/XMLv2__XPathExpression.st,v 1.2 2007-11-18 08:54:48 vranyj1 Exp $' |
|
166 |
! ! |