/[suikacvs]/messaging/manakai/lib/Message/Util/ManakaiNode.dis
Suika

Contents of /messaging/manakai/lib/Message/Util/ManakaiNode.dis

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.22 - (hide annotations) (download)
Mon Sep 26 14:37:39 2005 UTC (19 years, 9 months ago) by wakaba
Branch: MAIN
Changes since 1.21: +93 -1 lines
++ manakai/lib/Message/Markup/ChangeLog	26 Sep 2005 14:25:44 -0000
2005-09-26  Wakaba  <wakaba@suika.fam.cx>

	* SuikaWikiConfig21.dis: New mn:* properties added.
	(swcfg21:parent): Abbrevation added.

++ manakai/lib/Message/Util/ChangeLog	26 Sep 2005 14:32:24 -0000
2005-09-26  Wakaba  <wakaba@suika.fam.cx>

	* ManakaiNode.dis (new): New "className" parameter added.
	(mn:NodeRefRole): New role.
	(mn:type): New property.
	(mn:subnode0, mn:subnode1, mn:subnode2, mn:irefnode0,
	mn:origin0, mn:anydata1, mn:anydata2, mn:noderef): New properties.

	* Makefile: Rules to make "DIS/DISDump" is separeted
	from "DIS/DISDoc".

	* DIS.dis (getFor): Loads database module if unread
	"for" is referenced.
	(addResourceList, getResourceList): New method.
	(ManakaiDISModuleLite): New class.

++ manakai/lib/Message/Util/DIS/ChangeLog	26 Sep 2005 14:36:46 -0000
2005-09-26  Wakaba  <wakaba@suika.fam.cx>

	* DISDump.dis: Removes reference to DISDoc module.
	(DIS:DISDump10): Requires "XML" version "3.0" and
	"XMLVersion" version "1.1".
	(ManakaiDISImplementationDISDump): No longer extends
	the "ManakaiDISImplementationDISDoc" class.

	* Perl.dis (plLoadDISDatabaseModule): Support
	for loading "for"s and modules.
	(plCodeFragment): New "mn:NodeRefRole" role support added.

++ manakai/lib/Message/DOM/ChangeLog	26 Sep 2005 14:24:56 -0000
2005-09-26  Wakaba  <wakaba@suika.fam.cx>

	* DOMCore.dis, DOMXML.dis: New mn:* properties added.

++ manakai/lib/manakai/ChangeLog	26 Sep 2005 14:37:23 -0000
2005-09-26  Wakaba  <wakaba@suika.fam.cx>

	* DISPerl.dis (DISPerl:Regexp): New type.

1 wakaba 1.1 Module:
2     @QName:
3     Util:ManakaiNode
4     @FullName:
5     @@lang: en
6     @@@:
7     Manakai Generic Node Implementation
8     @Namespace:
9     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/ManakaiNode#
10    
11     @Description:
12     @@lang:en
13     @@@:
14     The <Module::Util:ManakaiNode> module provides a basic
15     implementation for glaph (perhaps tree) structures.
16    
17 wakaba 1.18 @DISCore:author: DISCore|Wakaba
18 wakaba 1.1 @License:
19     license:Perl+MPL
20     @Date:
21     @@@:
22 wakaba 1.22 $Date: 2005/09/25 14:53:05 $
23 wakaba 1.1 @@ContentType:
24     dis:Date.RCS
25    
26     @Require:
27     @@Module:
28 wakaba 1.4 @@@QName:
29     DISlib:DISPerl
30 wakaba 1.1 @@@WithFor:
31     ManakaiDOM:all
32 wakaba 1.2 @@Module:
33 wakaba 1.16 @@@QName: Util|ManakaiNode
34 wakaba 1.2 @@@WithFor:
35     ManakaiDOM:Perl
36    
37     @DefaultFor:
38     ManakaiDOM:Perl
39 wakaba 1.1
40     Namespace:
41 wakaba 1.13 @DIS:
42     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS#
43 wakaba 1.1 @dis:
44     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis--
45     @dis2pm:
46     http://suika.fam.cx/~wakaba/archive/2004/11/8/dis2pm#
47 wakaba 1.4 @DISlib:
48     http://suika.fam.cx/~wakaba/archive/2004/dis/
49 wakaba 1.13 @doc:
50     http://suika.fam.cx/~wakaba/archive/2005/7/tutorial#
51 wakaba 1.1 @lang:
52     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#
53     @license:
54     http://suika.fam.cx/~wakaba/archive/2004/8/18/license#
55     @ManakaiDOM:
56     http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#
57 wakaba 1.10 @mn:
58     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/ManakaiNode#
59 wakaba 1.1 @Perl:
60     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#Perl--
61     @rdf:
62     http://www.w3.org/1999/02/22-rdf-syntax-ns#
63     @rdfs:
64     http://www.w3.org/2000/01/rdf-schema#
65     @TreeCore:\
66     @Util:
67     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/
68    
69     ResourceDef:
70     @QName:
71     Util:
72     @rdf:type:
73     dis:ModuleGroup
74     @FullName:
75     @@lang:en
76     @@@:
77     The manakai support modules
78 wakaba 1.17 @DISPerl:packageName:
79 wakaba 1.14 Message::Util::
80 wakaba 1.17 @DISPerl:interfacePackageName:
81     Message::Util::IF::
82 wakaba 1.13
83 wakaba 1.1 ## -- Internal node object
84    
85     ClassDef:
86 wakaba 1.10 @resourceFor: ForFull
87     @resourceFor: ForCompact
88     @resourceFor:
89     ManakaiDOM:ForIF
90    
91     @QName:
92     @@@: NodeStem
93     @@ForCheck:
94     ManakaiDOM:ForIF
95    
96 wakaba 1.1 @QName:
97 wakaba 1.10 @@@:
98     ManakaiDOM:ManakaiDOMNodeObject
99     @@ForCheck: ForFull
100    
101     @QName:
102     @@@: ManakaiNodeStem
103     @@ForCheck: ForCompact
104    
105     @Implement:
106     @@@: NodeStem
107     @@ForCheck: ForFull
108    
109     @Implement:
110     @@@: NodeStem
111     @@ForCheck: ForCompact
112    
113 wakaba 1.1 @Description:
114     @@lang:en
115     @@@:
116     Internal (actual) node objects that is accessed via
117     <Class::ManakaiDOM:ManakaiDOMNodeReference> objects referring it.
118     @ImplNote:
119     @@lang:en
120     @@@:
121     No public interface should be defined for any class inheriting
122     this class - applications should access to nodes only via
123     <Class::ManakaiDOM:ManakaiDOMNodeReference> objects.
124     @ImplNote:
125 wakaba 1.13 @@ForCheck: ManakaiDOM|ForClass
126 wakaba 1.1 @@lang:en
127     @@@:
128 wakaba 1.13 A <Class::> object is a blessed hash
129 wakaba 1.1 reference. Each hash key and value pair is called as a
130     <DFN::property>. Currently, several core properties
131 wakaba 1.13 are defined as listed below. Applications of this class,
132     such as <Class::DOMCore:ManakaiDOMNode::ManakaiDOM:all>,
133     defines additional properties for their own purpose and scope.
134 wakaba 1.1 \
135 wakaba 1.13 {doc:fig:: <doc:caption::Core node properties>
136    
137     {doc:figBody::
138 wakaba 1.1 \
139     - <CODE::TreeCore:origin>::: An array reference, containing
140     hash key names of <DFN::origin>
141     properties for this node.
142     \
143 wakaba 1.3 - <CODE::TreeCore:subnode0>::: An array reference, containing
144     hash key names of <DFN::subnode>
145     properties for this node.
146     \
147 wakaba 1.1 - <CODE::TreeCore:subnode>::: An array reference, containing
148 wakaba 1.3 hash key names of <DFN::subnode> list
149 wakaba 1.1 properties for this node.
150     \
151     - <CODE::TreeCore:subnode2>::: An array reference, containing
152 wakaba 1.3 hash key names of <DFN::subnode> (two steps) list
153 wakaba 1.1 properties for this node.
154     \
155     - <CODE::TreeCore:irefnode>::: An array reference, containing
156     hash key names of <DFN::irefnode>
157     properties for this node.
158     \
159     - <CODE::TreeCore:anydata>::: An array reference, containing
160 wakaba 1.3 hash key names of <DFN::anydata> list
161     properties for this node.
162 wakaba 1.1 \
163     - <CODE::TreeCore:anydata2>::: An array reference, containing
164 wakaba 1.3 hash key names of <DFN::anydata> (two steps) list properties
165 wakaba 1.1 for this node.
166 wakaba 1.13 }
167 wakaba 1.1 }
168    
169     @IntMethod:
170     @@Name: new
171     @@Description:
172     @@@lang:en
173     @@@@:
174     Constructs a new instance of
175     <Class::ManakaiDOM:ManakaiDOMNodeObject> and returns it.
176 wakaba 1.22 @@Param:
177     @@@ForCheck: ForCompact
178     @@@Name: className
179     @@@Type: DISLang|String||ManakaiDOM|all
180     @@@enDesc:
181     The name of a class which is typically used as reference
182     to the node. The class <kwd:SHOULD> implement the
183     <IF::NodeRef> interface. The <QUOTE::dis> definition
184     for the class <kwd:SHOULD> play the role of <Q::mn|NodeRefRole
185     ||ManakaiDOM|all>.
186 wakaba 1.1 @@Return:
187 wakaba 1.10 @@@Type: NodeStem
188 wakaba 1.1 @@@Description:
189     @@@@lang:en
190     @@@@@:
191     The newly created <Class::ManakaiDOM:ManakaiDOMNodeObject> instance.
192 wakaba 1.7 @@@PerlDef:
193 wakaba 1.20 @@@@ForCheck: ForFull
194     @@@@@:
195 wakaba 1.1 $r = bless {
196     <Q::TreeCore:origin> => [],
197 wakaba 1.3 <Q::TreeCore:subnode0> => [],
198 wakaba 1.1 <Q::TreeCore:subnode> => [],
199     <Q::TreeCore:subnode2> => [],
200     <Q::TreeCore:irefnode> => [],
201     <Q::TreeCore:anydata> => [],
202     <Q::TreeCore:anydata2> => [],
203 wakaba 1.19 <H::mn:rc> => 0,
204     <H::mn:treeID> => <Code::ManakaiDOM:generateUniqueID>,
205     <H::mn:nodeID> => <Code::ManakaiDOM:generateUniqueID>,
206 wakaba 1.1 }, ref $self || $self;
207 wakaba 1.20 @@@PerlDef:
208     @@@@ForCheck: ForCompact
209     @@@@@:
210     $r = bless {
211     <Q::TreeCore:origin> => [],
212     <Q::TreeCore:subnode0> => [],
213     <Q::TreeCore:subnode> => [],
214     <Q::TreeCore:subnode2> => [],
215     <Q::TreeCore:irefnode> => [],
216     <Q::TreeCore:anydata> => [],
217     <Q::TreeCore:anydata2> => [],
218 wakaba 1.22 <H::mn:type> => $className,
219 wakaba 1.20 <H::mn:rc> => 0,
220     <H::mn:treeID> => \ (<Code::ManakaiDOM:generateUniqueID>),
221     <H::mn:nodeID> => <Code::ManakaiDOM:generateUniqueID>,
222     }, ref $self || $self;
223 wakaba 1.10
224 wakaba 1.1 @IntMethod:
225     @@Name: newReference
226     @@Description:
227     @@@lang:en
228     @@@@:
229     Creates a new reference to this node and returns it.
230 wakaba 1.6 @@DISCore:isDeprecated:
231     @@@@:1
232     @@@DISCore:alt: getNewReference
233 wakaba 1.10 @@ForCheck: ForFull
234 wakaba 1.1 @@Param:
235     @@@Name: class
236     @@@Type:
237 wakaba 1.7 Perl:package-name::ManakaiDOM:all
238 wakaba 1.1 @@@Description:
239     @@@@lang:en
240     @@@@@:
241     A Perl class package name with which the newly created
242     reference is blessed. The <P::class> class must be a
243     subclass of <Class::ManakaiDOM:ManakaiDOM:ManakaiDOMNodeReference>.
244     @@Return:
245     @@@Type:
246     ManakaiDOM:ManakaiDOMNodeReference
247     @@@Description:
248     @@@@lang:en
249     @@@@@:
250     The newly created node reference.
251     @@@PerlDef:
252     $r = bless {
253 wakaba 1.19 <H::mn:node> => $self,
254 wakaba 1.7 }, ref $class ? ref $class : defined $class ? $class :
255 wakaba 1.1 <ClassName::ManakaiDOM:ManakaiDOMNodeReference>;
256 wakaba 1.19 $self->{<H::mn:rc>}++;
257 wakaba 1.6
258     @ResourceDef:
259     @@QName: getNewReference
260     @@rdf:type:
261     dis2pm:BlockCode
262 wakaba 1.20 @@ForCheck: ForCompact
263 wakaba 1.6 @@Description:
264     @@@lang:en
265     @@@@:
266     Creates a new node reference object.
267     @@ResourceDef:
268     @@@rdf:type:
269     DISPerl:CodeParameter
270     @@@Name: $object
271 wakaba 1.10 @@@Type: NodeStem
272 wakaba 1.6 @@@In:1
273     @@@enDesc:
274     A node object for which a reference is created.
275     @@@DISPerl:paramStyle: var
276     @@ResourceDef:
277     @@@rdf:type:
278     DISPerl:CodeParameter
279     @@@Name: $ref
280 wakaba 1.10 @@@Type: NodeRef
281 wakaba 1.6 @@@Out:1
282     @@@enDesc:
283     A node reference for <P::$object>. It may or may not
284     be same as <P::$object>.
285     @@@DISPerl:paramStyle: var
286     @@ResourceDef:
287     @@@rdf:type:
288     DISPerl:CodeParameter
289     @@@Name: $class
290     @@@Type:
291     Perl:package-name::ManakaiDOM:all
292     @@@enDesc:
293     A package name with which <P::$ref> is blessed.
294     @@@In:1
295     @@@DISPerl:paramStyle: any
296     @@PerlDef:
297 wakaba 1.19 $object->{<H::mn:rc>}++;
298 wakaba 1.6 $ref = bless {
299 wakaba 1.19 <H::mn:node> => $object,
300 wakaba 1.6 }, $class;
301    
302     @ResourceDef:
303     @@QName: getWeakReference
304     @@rdf:type:
305     dis2pm:BlockCode
306 wakaba 1.20 @@ForCheck: ForCompact
307 wakaba 1.6 @@Description:
308     @@@lang:en
309     @@@@:
310     Creates a new weak node reference object.
311     \
312     The weak node reference is actually a node reference
313     except that this code fragment does not increment
314     the reference count of the object. When all non-weak
315     references to the object are destructed, then
316     the object is destructed and any operation via
317     weak references will lead unexpected result.
318     \
319     {NOTE:: It is intended that internal code creates a weak reference
320     so that it gets access to public interface.
321     \
322     }
323     @@ResourceDef:
324     @@@rdf:type:
325     DISPerl:CodeParameter
326     @@@Name: $object
327 wakaba 1.10 @@@Type: NodeStem
328 wakaba 1.6 @@@In:1
329     @@@enDesc:
330     A node object for which a reference is created.
331     @@@DISPerl:paramStyle: var
332     @@ResourceDef:
333     @@@rdf:type:
334     DISPerl:CodeParameter
335     @@@Name: $ref
336 wakaba 1.10 @@@Type: NodeRef
337 wakaba 1.6 @@@Out:1
338     @@@enDesc:
339     A node reference for <P::$object>. It may or may not
340     be same as <P::$object>.
341     @@@DISPerl:paramStyle: var
342     @@ResourceDef:
343     @@@rdf:type:
344     DISPerl:CodeParameter
345     @@@Name: $class
346     @@@Type:
347     Perl:package-name::ManakaiDOM:all
348     @@@enDesc:
349     A package name with which <P::$ref> is blessed.
350     @@@In:1
351     @@@DISPerl:paramStyle: any
352     @@PerlDef:
353     $ref = bless {
354 wakaba 1.19 <H::mn:node> => $object,
355     <H::mn:isWeak> => true,
356 wakaba 1.8 }, $class;
357    
358     @ResourceDef:
359     @@QName: getWeakRef
360     @@rdf:type:
361     dis2pm:InlineCode
362 wakaba 1.10 @@ForCheck: ForFull
363 wakaba 1.8 @@Description:
364     @@@lang:en
365     @@@@:
366     Creates a new weak node reference object.
367     \
368     The weak node reference is actually a node reference
369     except that this code fragment does not increment
370     the reference count of the object. When all non-weak
371     references to the object are destructed, then
372     the object is destructed and any operation via
373     weak references will lead unexpected result.
374     \
375     {NOTE:: It is intended that internal code creates a weak reference
376     so that it gets access to public interface.
377     \
378     }
379     @@ResourceDef:
380     @@@rdf:type:
381     DISPerl:CodeParameter
382     @@@Name: $object
383 wakaba 1.10 @@@Type: NodeStem
384 wakaba 1.8 @@@In:1
385     @@@enDesc:
386     A node object for which a reference is created.
387     @@@DISPerl:paramStyle: var
388     @@ResourceDef:
389     @@@rdf:type:
390     DISPerl:CodeParameter
391     @@@Name: $class
392     @@@Type:
393     Perl:package-name::ManakaiDOM:all
394     @@@enDesc:
395     A package name with which <P::$ref> is blessed.
396     @@@In:1
397     @@@DISPerl:paramStyle: any
398     @@PerlDef:
399 wakaba 1.9 (bless {
400 wakaba 1.19 <H::mn:node> => $object,
401     <H::mn:isWeak> => true,
402 wakaba 1.9 }, $class)
403 wakaba 1.6
404 wakaba 1.1 @IntMethod:
405     @@Name: isExternallyReferred
406     @@Description:
407     @@@lang:en
408     @@@@:
409     Checks whether the tree containing this node has been referred
410     from the outside of the tree or not.
411     @@Return:
412     @@@Type:
413 wakaba 1.7 DISPerl:Boolean::ManakaiDOM:all
414 wakaba 1.1 @@@InCase:
415 wakaba 1.15 @@@@Value:
416     @@@@@@:1
417     @@@@@ContentType: DISCore|Boolean
418 wakaba 1.1 @@@@Description:
419     @@@@@lang:en
420     @@@@@@:
421     There is one or more nodes in the tree that has been
422     referred via <Class::ManakaiDOM:ManakaiDOMNodeReference> objects.
423     @@@InCase:
424 wakaba 1.15 @@@@Value:
425     @@@@@@:0
426     @@@@@ContentType: DISCore|Boolean
427 wakaba 1.1 @@@@Description:
428     @@@@@lang:en
429     @@@@@@: No external reference found.
430     @@@PerlDef:
431 wakaba 1.10 @@@@ForCheck: ForFull
432     @@@@@:
433 wakaba 1.19 if ($self->{<H::mn:rc>}) {
434 wakaba 1.1 $r = true;
435     } else {
436     my @node = ($self);
437     my %checked;
438 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
439 wakaba 1.9 next unless UNIVERSAL::isa ($node,
440     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>);
441 wakaba 1.19 if ($node->{<H::mn:rc>}) {
442 wakaba 1.1 $r = true;
443     last NODES;
444 wakaba 1.19 } elsif ($checked{$node->{<H::mn:nodeID>}}) {
445 wakaba 1.1 next NODES;
446     }
447     my @n;
448 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
449     if (ref $node->{$p} eq 'ARRAY') {
450     push @n, @{$node->{$p}};
451     } elsif (ref $node->{$p} eq 'HASH') {
452     push @n, values %{$node->{$p}};
453 wakaba 1.1 }
454     }
455 wakaba 1.3 for my $p (@n,
456     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
457     if (ref $p eq 'ARRAY') {
458     push @node, @$p;
459     } elsif (ref $p eq 'HASH') {
460     push @node, values %$p;
461 wakaba 1.1 }
462     }
463 wakaba 1.6 for my $p (@{$node->{<Q::TreeCore:origin>}}) {
464     unshift @node, $node->{$p} if $node->{$p};
465     ## NOTE: Puts the top of the list,
466     ## since upper-level nodes are expected to be referred
467     ## more than lower-levels.
468     }
469     for my $p (@{$node->{<Q::TreeCore:subnode0>}}) {
470 wakaba 1.3 push @node, $node->{$p} if $node->{$p};
471 wakaba 1.1 }
472 wakaba 1.19 $checked{$node->{<H::mn:nodeID>}} = true;
473 wakaba 1.1 }
474     }
475 wakaba 1.10 @@@PerlDef:
476     @@@@ForCheck: ForCompact
477     @@@@@:
478 wakaba 1.19 if ($self->{<H::mn:rc>}) {
479 wakaba 1.10 $r = true;
480     } else {
481     my @node = ($self);
482     my %checked;
483 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
484 wakaba 1.10 next unless ref $node;
485 wakaba 1.19 if ($node->{<H::mn:rc>}) {
486 wakaba 1.10 $r = true;
487     last NODES;
488 wakaba 1.19 } elsif ($checked{$node->{<H::mn:nodeID>}}) {
489 wakaba 1.10 next NODES;
490     }
491     my @n;
492     for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
493     if (ref $node->{$p} eq 'ARRAY') {
494     push @n, @{$node->{$p}};
495     } elsif (ref $node->{$p} eq 'HASH') {
496     push @n, values %{$node->{$p}};
497     }
498     }
499     for my $p (@n,
500     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
501     if (ref $p eq 'ARRAY') {
502     push @node, @$p;
503     } elsif (ref $p eq 'HASH') {
504     push @node, values %$p;
505     }
506     }
507     for my $p (@{$node->{<Q::TreeCore:origin>}}) {
508     unshift @node, $node->{$p} if $node->{$p};
509     ## NOTE: Puts the top of the list,
510     ## since upper-level nodes are expected to be referred
511     ## more than lower-levels.
512     }
513     for my $p (@{$node->{<Q::TreeCore:subnode0>}}) {
514     push @node, $node->{$p} if $node->{$p};
515     }
516 wakaba 1.19 $checked{$node->{<H::mn:nodeID>}} = 1;
517 wakaba 1.10 }
518     }
519 wakaba 1.1
520     @IntMethod:
521     @@Name: destroy
522     @@Description:
523     @@@lang:en
524     @@@@:
525     Destructs the tree containing this node.
526     @@Return:
527     @@@PerlDef:
528 wakaba 1.10 @@@@ForCheck: ForFull
529     @@@@@:
530 wakaba 1.1 my @node = ($self);
531 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
532 wakaba 1.1 my @n;
533 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
534     if (ref $node->{$p} eq 'ARRAY') {
535     push @n, @{$node->{$p}};
536     } elsif (ref $node->{$p} eq 'HASH') {
537     push @n, values %{$node->{$p}};
538 wakaba 1.1 }
539     }
540 wakaba 1.3 for my $p (@n,
541     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
542     if (ref $p eq 'ARRAY') {
543 wakaba 1.10 push @node, grep {UNIVERSAL::isa ($_,
544     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
545 wakaba 1.19 and defined $_->{<H::mn:nodeID>}} @$p;
546 wakaba 1.3 } elsif (ref $p eq 'HASH') {
547 wakaba 1.10 push @node, grep {UNIVERSAL::isa ($_,
548     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
549 wakaba 1.19 and defined $_->{<H::mn:nodeID>}}
550 wakaba 1.3 values %$p;
551 wakaba 1.1 }
552     }
553 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:origin>}},
554     \ @{$node->{<Q::TreeCore:subnode0>}}) {
555     push @node, $node->{$p}
556     if defined $node->{$p} and
557 wakaba 1.19 defined $node->{$p}->{<H::mn:nodeID>};
558 wakaba 1.1 }
559     %$node = ();
560     }
561 wakaba 1.10 @@@PerlDef:
562     @@@@ForCheck: ForCompact
563     @@@@@:
564     my @node = ($self);
565 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
566 wakaba 1.19 next unless ref $node and defined $node->{<H::mn:nodeID>};
567 wakaba 1.10 my @n;
568     for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
569     if (ref $node->{$p} eq 'ARRAY') {
570     push @n, @{$node->{$p}};
571     } elsif (ref $node->{$p} eq 'HASH') {
572     push @n, values %{$node->{$p}};
573     }
574     }
575     for my $p (@n,
576     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
577     if (ref $p eq 'ARRAY') {
578     push @node, @$p;
579     } elsif (ref $p eq 'HASH') {
580     push @node, values %$p;
581     }
582     }
583     for my $p (@{$node->{<Q::TreeCore:origin>}},
584     \ @{$node->{<Q::TreeCore:subnode0>}}) {
585     push @node, $node->{$p};
586     }
587     %$node = ();
588     }
589 wakaba 1.1 @@ImplNote:
590     @@@lang:en
591     @@@@:
592     This method is different from Perl <Perl::DESTROY> special
593     purpose method.
594     \
595     An <QUOTE::uninitialized> warning in this method might mean
596     some method puts an <Perl::undef> into a list of nodes.
597    
598     @IntMethod:
599     @@Name: importTree
600     @@Description:
601     @@@lang:en
602     @@@@:
603     Changes the tree identifier of the nodes belong to another tree
604     to be same as this node's tree identifier.
605     @@Param:
606     @@@Name: node
607     @@@Type:
608     ManakaiDOM:ManakaiDOMNodeObject
609     @@@Description:
610     @@@@lang:en
611     @@@@@:
612     Any node from the tree to change its identifier.
613     @@Return:
614     @@@PerlDef:
615 wakaba 1.10 @@@@ForCheck: ForFull
616     @@@@@:
617 wakaba 1.19 unless ($node->{<H::mn:treeID>} eq
618     $self->{<H::mn:treeID>}) {
619 wakaba 1.1 my @node = ($node);
620 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
621 wakaba 1.10 next unless UNIVERSAL::isa ($node,
622     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>);
623 wakaba 1.1 my @n;
624 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
625     if (ref $node->{$p} eq 'ARRAY') {
626     push @n, @{$node->{$p}};
627     } elsif (ref $node->{$p} eq 'HASH') {
628     push @n, values %{$node->{$p}};
629 wakaba 1.1 }
630     }
631 wakaba 1.3 for my $p (@n,
632     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
633     if (ref $p eq 'ARRAY') {
634 wakaba 1.9 push @node, grep {UNIVERSAL::isa ($_,
635     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
636 wakaba 1.19 and $_->{<H::mn:treeID>} ne
637     $self->{<H::mn:treeID>}} @$p;
638 wakaba 1.3 } elsif (ref $p eq 'HASH') {
639 wakaba 1.9 push @node, grep {UNIVERSAL::isa ($_,
640     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
641 wakaba 1.19 and $_->{<H::mn:treeID>} ne
642     $self->{<H::mn:treeID>}}
643 wakaba 1.3 values %$p;
644 wakaba 1.1 }
645     }
646 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:origin>}},
647     \ @{$node->{<Q::TreeCore:subnode0>}}) {
648     push @node, $node->{$p}
649     if defined $node->{$p} and
650 wakaba 1.19 $node->{$p}->{<H::mn:treeID>} ne
651     $self->{<H::mn:treeID>};
652 wakaba 1.1 }
653 wakaba 1.19 $node->{<H::mn:treeID>} = $self->{<H::mn:treeID>};
654 wakaba 1.1 }
655     }
656 wakaba 1.10 @@@PerlDef:
657     @@@@ForCheck: ForCompact
658     @@@@@:
659     my @node = ($node);
660 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
661 wakaba 1.10 next unless ref $node;
662 wakaba 1.20 next if ${$node->{<H::mn:treeID>}} eq
663     ${$self->{<H::mn:treeID>}};
664 wakaba 1.10 my @n;
665     for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
666     if (ref $node->{$p} eq 'ARRAY') {
667     push @n, @{$node->{$p}};
668     } elsif (ref $node->{$p} eq 'HASH') {
669     push @n, values %{$node->{$p}};
670     }
671     }
672     for my $p (@n,
673     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
674     if (ref $p eq 'ARRAY') {
675     push @node, @$p;
676     } elsif (ref $p eq 'HASH') {
677     push @node, values %$p;
678     }
679     }
680     for my $p (@{$node->{<Q::TreeCore:origin>}},
681     \ @{$node->{<Q::TreeCore:subnode0>}}) {
682     push @node, $node->{$p};
683     }
684 wakaba 1.19 $node->{<H::mn:treeID>} = $self->{<H::mn:treeID>};
685 wakaba 1.10 }
686 wakaba 1.1
687     @IntMethod:
688     @@Name: changeTreeID
689     @@Description:
690     @@@lang:en
691     @@@@:
692     Changes tree identifier of all nodes traversable from this node.
693     @@Param:
694     @@@Name: treeID
695     @@@Type:
696 wakaba 1.7 DISPerl:String::ManakaiDOM:all
697 wakaba 1.1 @@@Description:
698     @@@@lang:en
699     @@@@@:
700     The new tree identifier.
701 wakaba 1.20 @@@InCase:
702 wakaba 1.21 @@@@Type: DISPerl|SCALAR||ManakaiDOM|all
703 wakaba 1.20 @@@@enDesc:
704     A reference to the new tree identifier.
705     The tree will reference the identifier as it.
706 wakaba 1.1 @@Return:
707     @@@PerlDef:
708 wakaba 1.10 @@@@ForCheck: ForFull
709     @@@@@:
710 wakaba 1.19 unless ($self->{<H::mn:treeID>} eq $treeID) {
711 wakaba 1.1 my @node = ($self);
712 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
713 wakaba 1.9 next unless UNIVERSAL::isa ($node,
714     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>);
715 wakaba 1.1 my @n;
716 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
717     if (ref $node->{$p} eq 'ARRAY') {
718     push @n, @{$node->{$p}};
719     } elsif (ref $node->{$p} eq 'HASH') {
720     push @n, values %{$node->{$p}};
721 wakaba 1.1 }
722     }
723 wakaba 1.3 for my $p (@n,
724     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
725     if (ref $p eq 'ARRAY') {
726 wakaba 1.9 push @node, grep {UNIVERSAL::isa ($_,
727     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
728 wakaba 1.5 and
729 wakaba 1.19 $_->{<H::mn:treeID>} ne $treeID} @$p;
730 wakaba 1.3 } elsif (ref $p eq 'HASH') {
731 wakaba 1.9 push @node, grep {UNIVERSAL::isa ($_,
732     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
733 wakaba 1.19 and $_->{<H::mn:treeID>} ne $treeID}
734 wakaba 1.3 values %$p;
735 wakaba 1.1 }
736     }
737 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:origin>}},
738     \ @{$node->{<Q::TreeCore:subnode0>}}) {
739     push @node, $node->{$p}
740     if defined $node->{$p} and
741 wakaba 1.19 $node->{$p}->{<H::mn:treeID>} ne $treeID;
742 wakaba 1.1 }
743 wakaba 1.19 $node->{<H::mn:treeID>} = $treeID;
744 wakaba 1.1 }
745     }
746     @@@PerlDef:
747 wakaba 1.10 @@@@ForCheck: ForCompact
748     @@@@@:
749 wakaba 1.20 my $tid = ref $treeID ? $treeID : \$treeID;
750 wakaba 1.10 my @node = ($self);
751 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
752 wakaba 1.10 next unless ref $node;
753 wakaba 1.20 next if ${$node->{<H::mn:treeID>}} eq $$tid;
754 wakaba 1.10 my @n;
755     for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
756     if (ref $node->{$p} eq 'ARRAY') {
757     push @n, @{$node->{$p}};
758     } elsif (ref $node->{$p} eq 'HASH') {
759     push @n, values %{$node->{$p}};
760     }
761     }
762     for my $p (@n,
763     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
764     if (ref $p eq 'ARRAY') {
765     push @node, @$p;
766     } elsif (ref $p eq 'HASH') {
767     push @node, values %$p;
768     }
769     }
770     for my $p (@{$node->{<Q::TreeCore:origin>}},
771     \ @{$node->{<Q::TreeCore:subnode0>}}) {
772     push @node, $node->{$p};
773     }
774 wakaba 1.20 $node->{<H::mn:treeID>} = $tid;
775 wakaba 1.1 }
776    
777     @IntMethod:
778     @@Name: isSameNode
779     @@Description:
780     @@@lang:en
781     @@@@:
782     Returns whether a node is the same as this node or not.
783     \
784     {NOTE:: The sameness is different from the equality;
785     two nodes are same iff they are same hash reference.
786     \
787     }
788     @@Operator:
789     @@@ContentType:
790     lang:Perl
791     @@@@: eq
792     @@Param:
793     @@@Name: node
794 wakaba 1.10 @@@Type: NodeStem
795 wakaba 1.1 @@@Description:
796     @@@@lang:en
797     @@@@@:
798     A node to compare with.
799     @@Return:
800     @@@Type:
801 wakaba 1.7 DISPerl:Boolean::ManakaiDOM:all
802 wakaba 1.1 @@@Description:
803     @@@@lang:en
804     @@@@@: Whether the two nodes are same or not.
805     @@@PerlDef:
806 wakaba 1.10 @@@@ForCheck: ForFull
807     @@@@@:
808 wakaba 1.1 if (ref $node and
809     UNIVERSAL::isa ($node,
810     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>) and
811 wakaba 1.19 $node->{<H::mn:nodeID>} eq $self->{<H::mn:nodeID>}) {
812 wakaba 1.1 $r = true;
813     }
814 wakaba 1.10 @@@PerlDef:
815     @@@@ForCheck: ForCompact
816     @@@@@:
817     if (ref $node and
818     UNIVERSAL::isa ($node, <ClassName::NodeStem>) and
819 wakaba 1.19 $node->{<H::mn:nodeID>} eq $self->{<H::mn:nodeID>}) {
820 wakaba 1.10 $r = true;
821     }
822 wakaba 1.1 @IntMethod:
823     @@Name: orphanate
824     @@Description:
825     @@@lang:en
826     @@@@:
827     Notifies that this node (and its neibors if any) is no longer
828     part of the main tree. If the new tree containing this node
829     has been referred yet, then the tree is preserved except its
830     tree identifier has changed. Otherwise, i.e. the tree is
831     useless any more, then it is destructed.
832     \
833     {NOTE:: Interaction on deleting a relationship from multiply
834     organized <QUOTE::trees> (such as DOM tree and
835     styled displaying tree) is less studied. This
836     method might be modified or addition of another method(s)
837     might be required when style sheet, XBL, or other
838     technologies has been implemented.
839     \
840     }
841     @@Return:
842     @@@PerlDef:
843 wakaba 1.20 @@@@ForCheck: ForFull
844     @@@@@:
845     if ($self-><M::NodeStem.isExternallyReferred>) {
846     $self-><M::NodeStem.changeTreeID>
847     (<Code::ManakaiDOM:generateUniqueID>);
848     } else {
849     $self-><M::NodeStem.destroy>;
850     }
851     @@@PerlDef:
852     @@@@ForCheck: ForCompact
853     @@@@@:
854     if ($self-><M::NodeStem.isExternallyReferred>) {
855     $self-><M::NodeStem.changeTreeID>
856     (\(<Code::ManakaiDOM:generateUniqueID>));
857     } else {
858     $self-><M::NodeStem.destroy>;
859     }
860 wakaba 1.10 ##NodeStem
861 wakaba 1.1
862     ## -- Public node object
863    
864     ClassDef:
865 wakaba 1.10 @resourceFor: ForFull
866     @resourceFor: ForCompact
867     @resourceFor:
868     ManakaiDOM:ForIF
869    
870     @QName:
871     @@@: NodeRef
872     @@ForCheck:
873     ManakaiDOM:ForIF
874    
875 wakaba 1.1 @QName:
876 wakaba 1.10 @@@:
877     ManakaiDOM:ManakaiDOMNodeReference
878     @@ForCheck: ForFull
879    
880     @Implement:
881     @@@: NodeRef
882     @@ForCheck: ForFull
883    
884     @QName:
885     @@@: ManakaiNodeRef
886     @@ForCheck: ForCompact
887    
888     @Implement:
889     @@@: NodeRef
890     @@ForCheck: ForCompact
891    
892 wakaba 1.22 @DISLang:role:
893     @@@: mn|NodeRefRole
894     @@ForCheck: ForCompact
895    
896 wakaba 1.1 @Description:
897     @@lang:en
898     @@@:
899     References to the node object corresponding to it. From
900     applications' view, any node object is hidden and
901     <Class::ManakaiDOM:ManakaiDOMNodeReference> seems as if
902     the node itself.
903     @ImplNote:
904     @@lang:en
905     @@@:
906 wakaba 1.13 {P:: A <Class::ManakaiDOM:ManakaiDOMNodeReference> is a blessed hash
907 wakaba 1.1 reference; currently there is a hash key defined:
908     \
909     - <CODE::TreeCore:node>::: A node object
910     (<Class::ManakaiDOM:ManakaiDOMNodeObject>) to which
911     this is referring.
912 wakaba 1.13
913     - <CODE::TreeCore:isWeak>::: Whether the reference is <QUOTE::weak>
914     or not.
915     }
916    
917     @ResourceDef:
918     @@Name: free
919     @@rdf:type: DISLang|Method
920     @@enDesc:
921     Frees the grove referenced by this object. Once
922     this operation is done, results of operations to objects belonging
923     to the grove are unknown.
924     @@ForCheck: ForCompact
925     @@Return:
926     @@@PerlDef:
927 wakaba 1.19 $self->{<H::mn:node>}-><M::NodeStem.destroy>;
928 wakaba 1.1
929     @IntMethod:
930     @@Name: destroy
931     @@Description:
932     @@@lang:en
933     @@@@: Destroy this reference object.
934     @@Operator:
935     @@@ContentType:
936     lang:Perl
937     @@@@: DESTROY
938     @@Return:
939     @@@PerlDef:
940     @@@@@:
941 wakaba 1.19 my $node = $self->{<H::mn:node>};
942 wakaba 1.1 if ($node) {
943 wakaba 1.19 CORE::delete $self->{<H::mn:node>};
944     unless ($self->{<H::mn:isWeak>}) {
945     $node->{<H::mn:rc>}--;
946 wakaba 1.10 unless ($node-><M::NodeStem.isExternallyReferred>) {
947     $node-><M::NodeStem.destroy>;
948 wakaba 1.6 }
949 wakaba 1.1 }
950     } else {
951     warn ref ($self) . q{->DESTROY: there is no associated }.
952     q{node object - you have a global variable or }.
953     qq{potential memory-leak detected\n};
954     }
955     @@@@ImplNote:
956     @@@@@lang:en
957     @@@@@@:
958     {P::Warning during the global destruction might mean:
959     \
960     - there be a loop in the manakai internal implementation -
961     it should be a bug.
962     \
963     - there be a loop created by application, e.g.
964     event handler containing a reference to any node
965     belonging to the same tree.
966     \
967     - there be a global variable that contains a node reference
968     and it is not altered or <Perl::undef>ed until the global
969     destruction.
970     \
971     - or other unknown bad situation.
972     \
973     }
974     @@ImplNote:
975     @@@lang:en
976     @@@@:
977     Don't override this method unintentionally - for example,
978     inheritting <PerlModule::Tie::Array> would hide this method
979     from that class, since that module defines its own
980     destructor.
981 wakaba 1.10 ##NodeRef
982 wakaba 1.22
983     ResourceDef:
984     @QName: mn|NodeRefRole
985     @rdf:type: DISLang|Role
986     @For: =ManakaiDOM|all
987     @enDesc:
988     The <QUOTE::dis> definition for a class which plays the role
989     of <Q::mn|NodeRefRole> provides a set of <QUOTE::dis> properties such
990     as <Q::mn|subnode0> which identify the set of object internal
991     property names (or hash key names) used to construct groves.
992    
993     PropDef:
994     @QName: mn|type
995     @mn:stemName: t
996    
997     PropDef:
998     @QName: mn|noderef
999     @dataType: DISCore|QName
1000     @multipleProperties: DISCore|UnorderedList
1001    
1002     PropDef:
1003     @QName: mn|subnode0
1004     @enDesc:
1005     A property of type <Q::mn|subnode0> takes a value of
1006     reference to another node (<Q::mn|NodeStem||ManakaiDOM|Perl>)
1007     in the same grove. The referenced node is considered
1008     to make a part of the node and just one <Q::mn|origin0>
1009     property of the referenced node <kwd:MUST> have a reference
1010     to the node. That is, these properties shows
1011     a origin-subnode-relationship.
1012     @dataType: DISCore|QName
1013     @multipleProperties: DISCore|UnorderedList
1014    
1015     PropDef:
1016     @QName: mn|subnode1
1017     @enDesc:
1018     A property of type <Q::mn|subnode1> is similar to <Q::mn|subnode0>
1019     properties, but its value is an array or hash reference whose
1020     values are references to subnodes.
1021     @rdfs:subPropertyOf: mn|noderef
1022     @dataType: DISCore|QName
1023     @multipleProperties: DISCore|UnorderedList
1024    
1025     PropDef:
1026     @QName: mn|subnode2
1027     @enDesc:
1028     A property of type <Q::mn|subnode2> is similar to <Q::mn|subnode1>
1029     properties, but its value is an array or hash reference whose
1030     values are array or hash references whose values are
1031     references to subnodes.
1032     @rdfs:subPropertyOf: mn|noderef
1033     @dataType: DISCore|QName
1034     @multipleProperties: DISCore|UnorderedList
1035    
1036     PropDef:
1037     @QName: mn|origin0
1038     @rdfs:subPropertyOf: mn|noderef
1039     @dataType: DISCore|QName
1040     @multipleProperties: DISCore|UnorderedList
1041    
1042     PropDef:
1043     @QName: mn|irefnode0
1044     @rdfs:subPropertyOf: mn|noderef
1045     @dataType: DISCore|QName
1046     @multipleProperties: DISCore|UnorderedList
1047    
1048     PropDef:
1049     @QName: mn|anydata1
1050     @rdfs:subPropertyOf: mn|noderef
1051     @dataType: DISCore|QName
1052     @multipleProperties: DISCore|UnorderedList
1053    
1054     PropDef:
1055     @QName: mn|anydata2
1056     @rdfs:subPropertyOf: mn|noderef
1057     @dataType: DISCore|QName
1058     @multipleProperties: DISCore|UnorderedList
1059 wakaba 1.6
1060     PropDef:
1061 wakaba 1.19 @QName: mn|nodeID
1062     @enDesc:
1063     The globally unique identifier of the node.
1064     @mn:stemName: nid
1065    
1066     PropDef:
1067     @QName: mn|treeID
1068     @enDesc:
1069     The globally unique identifier of the grove to which the
1070     node belongs.
1071     @mn:stemName: tid
1072    
1073     PropDef:
1074     @QName: mn|rc
1075     @enDesc:
1076     The number of the reference that points the node.
1077     @mn:stemName: rc
1078    
1079     PropDef:
1080     @QName: mn|node
1081     @mn:refName: node
1082     @rdfs:domain: mn|NodeRef||ManakaiDOM|Perl
1083     @rdfs:range: mn|NodeStem||ManakaiDOM|Perl
1084    
1085     PropDef:
1086     @QName: mn|isWeak
1087 wakaba 1.6 @enDesc:
1088     Whether a reference is weak or not.
1089 wakaba 1.19 @rdfs:domain: mn|NodeRef||ManakaiDOM|Perl
1090 wakaba 1.16 @Type: DISPerl|Boolean
1091 wakaba 1.19 @mn:refName: w
1092    
1093     PropDef:
1094     @QName: mn|stemName
1095     @enDesc:
1096     The key name of the property when it is used in <Class::ManakaiNodeStem
1097     ::ManakaiDOM:Perl>.
1098     @dataType: DISCore|String
1099     @multipleProperties: DISCore|Single
1100     @rdfs:domain: rdfs|Property
1101     @rdfs:subPropertyOf: DISPerl|propHashKey
1102    
1103     PropDef:
1104     @QName: mn|refName
1105     @enDesc:
1106     The key name of the property when it is used in <Class::ManakaiNodeRef
1107     ::ManakaiDOM:Perl>.
1108     @dataType: DISCore|String
1109     @multipleProperties: DISCore|Single
1110     @rdfs:domain: rdfs|Property
1111     @rdfs:subPropertyOf: DISPerl|propHashKey
1112 wakaba 1.6
1113     ElementTypeBinding:
1114     @Name:PropDef
1115     @ElementType:
1116     dis:ResourceDef
1117     @ShadowContent:
1118     @@rdf:type:
1119     rdf:Property
1120 wakaba 1.16 @@For: =ManakaiDOM|all
1121 wakaba 1.6
1122     ElementTypeBinding:
1123     @Name:enDesc
1124     @ElementType:
1125     dis:Description
1126     @ShadowContent:
1127     @@lang:en
1128 wakaba 1.1
1129     ## -- Frequently used code fragments
1130    
1131     ResourceDef:
1132     @QName:
1133     ManakaiDOM:generateUniqueID
1134     @rdf:type:
1135     dis2pm:InlineCode
1136     @Description:
1137     @@lang:en
1138     @@@:
1139     Generates a global-unique opaque string.
1140     \
1141     {NOTE:: A URI reference is generated by this code.
1142     \
1143     }
1144 wakaba 1.16
1145     @For: =ManakaiDOM|Perl
1146    
1147 wakaba 1.1 @PerlDef:
1148     (
1149     sprintf 'mid:%d.%d.%s.dom.manakai@suika.fam.cx#',
1150     time, $$,
1151     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62] .
1152     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62] .
1153     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62] .
1154     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62] .
1155     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62]
1156     )
1157     ##ManakaiDOM:generateUniqueID
1158    
1159     ## -- lang:dis vocabulary
1160    
1161     TreeElementType:
1162     @QName:
1163     dis:GetProp
1164     @dataType:
1165     dis:TypeQName
1166     @rdfs:range:
1167     rdf:Property
1168     @Description:
1169     @@lang:en
1170     @@@:
1171     Gets the non-nodal value of a <Class::ManakaiDOM:ManakaiDOMNodeReference>
1172     property (actualy <Class::ManakaiDOM:ManakaiDOMNodeObject> property).
1173    
1174     TreeElementType:
1175     @QName:
1176     dis:SetProp
1177     @dataType:
1178     dis:TypeQName
1179     @rdfs:range:
1180     rdf:Property
1181     @Description:
1182     @@lang:en
1183     @@@:
1184     Sets the non-nodal value of a <Class::ManakaiDOM:ManakaiDOMNodeReference>
1185     property (actualy <Class::ManakaiDOM:ManakaiDOMNodeObject> property).
1186    
1187     ## -- Syntax sugar
1188    
1189     ElementTypeBinding:
1190     @Name: TreeElementType
1191     @ElementType:
1192     dis:ResourceDef
1193     @ShadowContent:
1194     @@rdf:type:
1195     DISLang:TreeElementType
1196 wakaba 1.16 @@For: =ManakaiDOM|all
1197 wakaba 1.1
1198     ElementTypeBinding:
1199     @Name: ClassDef
1200     @ElementType:
1201     dis:ResourceDef
1202     @ShadowContent:
1203     @@rdf:type:
1204     @@@@:
1205 wakaba 1.10 dis:MultipleResource
1206     @@@ForCheck:
1207     !ForFull !ForCompact !ManakaiDOM:ForIF
1208     @@rdf:type:
1209     @@@@:
1210     ManakaiDOM:IF
1211     @@@ForCheck:
1212     ManakaiDOM:ForIF
1213     @@rdf:type:
1214     @@@@:
1215     ManakaiDOM:Class
1216     @@@ForCheck: ForFull
1217     @@rdf:type:
1218     @@@@:
1219     ManakaiDOM:Class
1220     @@@ForCheck: ForCompact
1221 wakaba 1.2 @@ForCheck:
1222     ManakaiDOM:Perl
1223 wakaba 1.10
1224     ForDef:
1225     @QName:
1226     mn:ForFull
1227     @ISA:
1228     ManakaiDOM:ForClass
1229    
1230     ForDef:
1231     @QName:
1232     mn:ForCompact
1233     @ISA:
1234     ManakaiDOM:ForClass
1235 wakaba 1.1
1236     ElementTypeBinding:
1237     @Name: IntMethod
1238     @ElementType:
1239     dis:ResourceDef
1240     @ShadowContent:
1241     @@rdf:type:
1242     DISLang:Method
1243     @@ManakaiDOM:isForInternal:1
1244    
1245     ElementTypeBinding:
1246     @Name: Return
1247     @ElementType:
1248     dis:ResourceDef
1249     @ShadowContent:
1250     @@rdf:type:
1251     DISLang:MethodReturn
1252    
1253     ElementTypeBinding:
1254     @Name: Param
1255     @ElementType:
1256     dis:ResourceDef
1257     @ShadowContent:
1258     @@rdf:type:
1259     DISLang:MethodParameter
1260    
1261     ElementTypeBinding:
1262     @Name: PerlDef
1263     @ElementType:
1264     dis:Def
1265     @ShadowContent:
1266     @@ContentType:
1267     lang:Perl
1268    
1269     ElementTypeBinding:
1270     @Name: InCase
1271     @ElementType:
1272     dis:ResourceDef
1273     @ShadowContent:
1274     @@rdf:type:
1275     ManakaiDOM:InCase

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24