/[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.23 - (hide annotations) (download)
Tue Sep 27 05:30:45 2005 UTC (19 years, 9 months ago) by wakaba
Branch: MAIN
Changes since 1.22: +37 -18 lines
++ manakai/lib/Message/Util/ChangeLog	27 Sep 2005 05:29:27 -0000
2005-09-27  Wakaba  <wakaba@suika.fam.cx>

	* ManakaiNode.dis (ManakaiNodeStem): Use per-class
	variable for searching noderel properties instead
	of per-node properties.

++ manakai/lib/Message/DOM/ChangeLog	27 Sep 2005 05:27:35 -0000
2005-09-27  Wakaba  <wakaba@suika.fam.cx>

	* DOMCore.dis (DOMCore:nodeProp): New property.

++ manakai/lib/manakai/ChangeLog	27 Sep 2005 05:30:27 -0000
2005-09-27  Wakaba  <wakaba@suika.fam.cx>

	* XML.dis (dxm:nodeTypeName): New property.

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.23 $Date: 2005/09/26 14:37:39 $
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 wakaba 1.23 my $nt = $Message::Util::ManakaiNode::ManakaiNodeRef::Prop{
493     $node->{<H::mn:type>}
494     };
495     for my $p (@{$nt->{<H::mn:subnode2>}||[]}) {
496 wakaba 1.10 if (ref $node->{$p} eq 'ARRAY') {
497     push @n, @{$node->{$p}};
498     } elsif (ref $node->{$p} eq 'HASH') {
499     push @n, values %{$node->{$p}};
500     }
501     }
502     for my $p (@n,
503 wakaba 1.23 map {$node->{$_}} @{$nt->{<H::mn:subnode1>}||[]}) {
504 wakaba 1.10 if (ref $p eq 'ARRAY') {
505     push @node, @$p;
506     } elsif (ref $p eq 'HASH') {
507     push @node, values %$p;
508     }
509     }
510 wakaba 1.23 for my $p (@{$nt->{<H::mn:origin0>}||[]}) {
511 wakaba 1.10 unshift @node, $node->{$p} if $node->{$p};
512     ## NOTE: Puts the top of the list,
513     ## since upper-level nodes are expected to be referred
514     ## more than lower-levels.
515     }
516 wakaba 1.23 for my $p (@{$nt->{<H::mn:subnode0>}}) {
517 wakaba 1.10 push @node, $node->{$p} if $node->{$p};
518     }
519 wakaba 1.19 $checked{$node->{<H::mn:nodeID>}} = 1;
520 wakaba 1.10 }
521     }
522 wakaba 1.1
523     @IntMethod:
524     @@Name: destroy
525     @@Description:
526     @@@lang:en
527     @@@@:
528     Destructs the tree containing this node.
529     @@Return:
530     @@@PerlDef:
531 wakaba 1.10 @@@@ForCheck: ForFull
532     @@@@@:
533 wakaba 1.1 my @node = ($self);
534 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
535 wakaba 1.1 my @n;
536 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
537     if (ref $node->{$p} eq 'ARRAY') {
538     push @n, @{$node->{$p}};
539     } elsif (ref $node->{$p} eq 'HASH') {
540     push @n, values %{$node->{$p}};
541 wakaba 1.1 }
542     }
543 wakaba 1.3 for my $p (@n,
544     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
545     if (ref $p eq 'ARRAY') {
546 wakaba 1.10 push @node, grep {UNIVERSAL::isa ($_,
547     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
548 wakaba 1.19 and defined $_->{<H::mn:nodeID>}} @$p;
549 wakaba 1.3 } elsif (ref $p eq 'HASH') {
550 wakaba 1.10 push @node, grep {UNIVERSAL::isa ($_,
551     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
552 wakaba 1.19 and defined $_->{<H::mn:nodeID>}}
553 wakaba 1.3 values %$p;
554 wakaba 1.1 }
555     }
556 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:origin>}},
557     \ @{$node->{<Q::TreeCore:subnode0>}}) {
558     push @node, $node->{$p}
559     if defined $node->{$p} and
560 wakaba 1.19 defined $node->{$p}->{<H::mn:nodeID>};
561 wakaba 1.1 }
562     %$node = ();
563     }
564 wakaba 1.10 @@@PerlDef:
565     @@@@ForCheck: ForCompact
566     @@@@@:
567     my @node = ($self);
568 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
569 wakaba 1.19 next unless ref $node and defined $node->{<H::mn:nodeID>};
570 wakaba 1.10 my @n;
571 wakaba 1.23 my $nt = $Message::Util::ManakaiNode::ManakaiNodeRef::Prop{
572     $node->{<H::mn:type>}
573     };
574     for my $p (@{$nt->{<H::mn:subnode2>}}) {
575 wakaba 1.10 if (ref $node->{$p} eq 'ARRAY') {
576     push @n, @{$node->{$p}};
577     } elsif (ref $node->{$p} eq 'HASH') {
578     push @n, values %{$node->{$p}};
579     }
580     }
581     for my $p (@n,
582 wakaba 1.23 map {$node->{$_}} @{$nt->{<H::mn:subnode1>}}) {
583 wakaba 1.10 if (ref $p eq 'ARRAY') {
584     push @node, @$p;
585     } elsif (ref $p eq 'HASH') {
586     push @node, values %$p;
587     }
588     }
589 wakaba 1.23 for my $p (@{$nt->{<H::mn:origin0>}},
590     \ @{$nt->{<H::mn:subnode0>}}) {
591 wakaba 1.10 push @node, $node->{$p};
592     }
593     %$node = ();
594     }
595 wakaba 1.1 @@ImplNote:
596     @@@lang:en
597     @@@@:
598     This method is different from Perl <Perl::DESTROY> special
599     purpose method.
600     \
601     An <QUOTE::uninitialized> warning in this method might mean
602     some method puts an <Perl::undef> into a list of nodes.
603    
604     @IntMethod:
605     @@Name: importTree
606     @@Description:
607     @@@lang:en
608     @@@@:
609     Changes the tree identifier of the nodes belong to another tree
610     to be same as this node's tree identifier.
611     @@Param:
612     @@@Name: node
613     @@@Type:
614     ManakaiDOM:ManakaiDOMNodeObject
615     @@@Description:
616     @@@@lang:en
617     @@@@@:
618     Any node from the tree to change its identifier.
619     @@Return:
620     @@@PerlDef:
621 wakaba 1.10 @@@@ForCheck: ForFull
622     @@@@@:
623 wakaba 1.19 unless ($node->{<H::mn:treeID>} eq
624     $self->{<H::mn:treeID>}) {
625 wakaba 1.1 my @node = ($node);
626 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
627 wakaba 1.10 next unless UNIVERSAL::isa ($node,
628     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>);
629 wakaba 1.1 my @n;
630 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
631     if (ref $node->{$p} eq 'ARRAY') {
632     push @n, @{$node->{$p}};
633     } elsif (ref $node->{$p} eq 'HASH') {
634     push @n, values %{$node->{$p}};
635 wakaba 1.1 }
636     }
637 wakaba 1.3 for my $p (@n,
638     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
639     if (ref $p eq 'ARRAY') {
640 wakaba 1.9 push @node, grep {UNIVERSAL::isa ($_,
641     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
642 wakaba 1.19 and $_->{<H::mn:treeID>} ne
643     $self->{<H::mn:treeID>}} @$p;
644 wakaba 1.3 } elsif (ref $p eq 'HASH') {
645 wakaba 1.9 push @node, grep {UNIVERSAL::isa ($_,
646     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
647 wakaba 1.19 and $_->{<H::mn:treeID>} ne
648     $self->{<H::mn:treeID>}}
649 wakaba 1.3 values %$p;
650 wakaba 1.1 }
651     }
652 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:origin>}},
653     \ @{$node->{<Q::TreeCore:subnode0>}}) {
654     push @node, $node->{$p}
655     if defined $node->{$p} and
656 wakaba 1.19 $node->{$p}->{<H::mn:treeID>} ne
657     $self->{<H::mn:treeID>};
658 wakaba 1.1 }
659 wakaba 1.19 $node->{<H::mn:treeID>} = $self->{<H::mn:treeID>};
660 wakaba 1.1 }
661     }
662 wakaba 1.10 @@@PerlDef:
663     @@@@ForCheck: ForCompact
664     @@@@@:
665     my @node = ($node);
666 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
667 wakaba 1.10 next unless ref $node;
668 wakaba 1.20 next if ${$node->{<H::mn:treeID>}} eq
669     ${$self->{<H::mn:treeID>}};
670 wakaba 1.10 my @n;
671 wakaba 1.23 my $nt = $Message::Util::ManakaiNode::ManakaiNodeRef::Prop{
672     $node->{<H::mn:type>}
673     };
674     for my $p (@{$nt->{<H::mn:subnode2>}}) {
675 wakaba 1.10 if (ref $node->{$p} eq 'ARRAY') {
676     push @n, @{$node->{$p}};
677     } elsif (ref $node->{$p} eq 'HASH') {
678     push @n, values %{$node->{$p}};
679     }
680     }
681     for my $p (@n,
682 wakaba 1.23 map {$node->{$_}} @{$nt->{<H::mn:subnode1>}}) {
683 wakaba 1.10 if (ref $p eq 'ARRAY') {
684     push @node, @$p;
685     } elsif (ref $p eq 'HASH') {
686     push @node, values %$p;
687     }
688     }
689 wakaba 1.23 for my $p (@{$nt->{<H::mn:origin0>}},
690     \ @{$nt->{<H::mn:subnode0>}}) {
691 wakaba 1.10 push @node, $node->{$p};
692     }
693 wakaba 1.19 $node->{<H::mn:treeID>} = $self->{<H::mn:treeID>};
694 wakaba 1.10 }
695 wakaba 1.1
696     @IntMethod:
697     @@Name: changeTreeID
698     @@Description:
699     @@@lang:en
700     @@@@:
701     Changes tree identifier of all nodes traversable from this node.
702     @@Param:
703     @@@Name: treeID
704     @@@Type:
705 wakaba 1.7 DISPerl:String::ManakaiDOM:all
706 wakaba 1.1 @@@Description:
707     @@@@lang:en
708     @@@@@:
709     The new tree identifier.
710 wakaba 1.20 @@@InCase:
711 wakaba 1.21 @@@@Type: DISPerl|SCALAR||ManakaiDOM|all
712 wakaba 1.20 @@@@enDesc:
713     A reference to the new tree identifier.
714     The tree will reference the identifier as it.
715 wakaba 1.1 @@Return:
716     @@@PerlDef:
717 wakaba 1.10 @@@@ForCheck: ForFull
718     @@@@@:
719 wakaba 1.19 unless ($self->{<H::mn:treeID>} eq $treeID) {
720 wakaba 1.1 my @node = ($self);
721 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
722 wakaba 1.9 next unless UNIVERSAL::isa ($node,
723     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>);
724 wakaba 1.1 my @n;
725 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:subnode2>}}) {
726     if (ref $node->{$p} eq 'ARRAY') {
727     push @n, @{$node->{$p}};
728     } elsif (ref $node->{$p} eq 'HASH') {
729     push @n, values %{$node->{$p}};
730 wakaba 1.1 }
731     }
732 wakaba 1.3 for my $p (@n,
733     map {$node->{$_}} @{$node->{<Q::TreeCore:subnode>}}) {
734     if (ref $p eq 'ARRAY') {
735 wakaba 1.9 push @node, grep {UNIVERSAL::isa ($_,
736     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
737 wakaba 1.5 and
738 wakaba 1.19 $_->{<H::mn:treeID>} ne $treeID} @$p;
739 wakaba 1.3 } elsif (ref $p eq 'HASH') {
740 wakaba 1.9 push @node, grep {UNIVERSAL::isa ($_,
741     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>)
742 wakaba 1.19 and $_->{<H::mn:treeID>} ne $treeID}
743 wakaba 1.3 values %$p;
744 wakaba 1.1 }
745     }
746 wakaba 1.3 for my $p (@{$node->{<Q::TreeCore:origin>}},
747     \ @{$node->{<Q::TreeCore:subnode0>}}) {
748     push @node, $node->{$p}
749     if defined $node->{$p} and
750 wakaba 1.19 $node->{$p}->{<H::mn:treeID>} ne $treeID;
751 wakaba 1.1 }
752 wakaba 1.19 $node->{<H::mn:treeID>} = $treeID;
753 wakaba 1.1 }
754     }
755     @@@PerlDef:
756 wakaba 1.10 @@@@ForCheck: ForCompact
757     @@@@@:
758 wakaba 1.20 my $tid = ref $treeID ? $treeID : \$treeID;
759 wakaba 1.10 my @node = ($self);
760 wakaba 1.12 NODES: while (defined (my $node = shift @node)) {
761 wakaba 1.10 next unless ref $node;
762 wakaba 1.20 next if ${$node->{<H::mn:treeID>}} eq $$tid;
763 wakaba 1.10 my @n;
764 wakaba 1.23 my $nt = $Message::Util::ManakaiNode::ManakaiNodeRef::Prop{
765     $node->{<H::mn:type>}
766     };
767     for my $p (@{$nt->{<H::mn:subnode2>}}) {
768 wakaba 1.10 if (ref $node->{$p} eq 'ARRAY') {
769     push @n, @{$node->{$p}};
770     } elsif (ref $node->{$p} eq 'HASH') {
771     push @n, values %{$node->{$p}};
772     }
773     }
774     for my $p (@n,
775 wakaba 1.23 map {$node->{$_}} @{$nt->{<H::mn:subnode1>}}) {
776 wakaba 1.10 if (ref $p eq 'ARRAY') {
777     push @node, @$p;
778     } elsif (ref $p eq 'HASH') {
779     push @node, values %$p;
780     }
781     }
782 wakaba 1.23 for my $p (@{$nt->{<H::mn:origin0>}},
783     \ @{$nt->{<H::mn:subnode0>}}) {
784 wakaba 1.10 push @node, $node->{$p};
785     }
786 wakaba 1.20 $node->{<H::mn:treeID>} = $tid;
787 wakaba 1.1 }
788    
789     @IntMethod:
790     @@Name: isSameNode
791     @@Description:
792     @@@lang:en
793     @@@@:
794     Returns whether a node is the same as this node or not.
795     \
796     {NOTE:: The sameness is different from the equality;
797     two nodes are same iff they are same hash reference.
798     \
799     }
800     @@Operator:
801     @@@ContentType:
802     lang:Perl
803     @@@@: eq
804     @@Param:
805     @@@Name: node
806 wakaba 1.10 @@@Type: NodeStem
807 wakaba 1.1 @@@Description:
808     @@@@lang:en
809     @@@@@:
810     A node to compare with.
811     @@Return:
812     @@@Type:
813 wakaba 1.7 DISPerl:Boolean::ManakaiDOM:all
814 wakaba 1.1 @@@Description:
815     @@@@lang:en
816     @@@@@: Whether the two nodes are same or not.
817     @@@PerlDef:
818 wakaba 1.10 @@@@ForCheck: ForFull
819     @@@@@:
820 wakaba 1.1 if (ref $node and
821     UNIVERSAL::isa ($node,
822     <ClassName::ManakaiDOM:ManakaiDOMNodeObject>) and
823 wakaba 1.19 $node->{<H::mn:nodeID>} eq $self->{<H::mn:nodeID>}) {
824 wakaba 1.1 $r = true;
825     }
826 wakaba 1.10 @@@PerlDef:
827     @@@@ForCheck: ForCompact
828     @@@@@:
829     if (ref $node and
830 wakaba 1.23 UNIVERSAL::isa ($node, <ClassName::ManakaiNodeStem>) and
831 wakaba 1.19 $node->{<H::mn:nodeID>} eq $self->{<H::mn:nodeID>}) {
832 wakaba 1.10 $r = true;
833     }
834 wakaba 1.1 @IntMethod:
835     @@Name: orphanate
836     @@Description:
837     @@@lang:en
838     @@@@:
839     Notifies that this node (and its neibors if any) is no longer
840     part of the main tree. If the new tree containing this node
841     has been referred yet, then the tree is preserved except its
842     tree identifier has changed. Otherwise, i.e. the tree is
843     useless any more, then it is destructed.
844     \
845     {NOTE:: Interaction on deleting a relationship from multiply
846     organized <QUOTE::trees> (such as DOM tree and
847     styled displaying tree) is less studied. This
848     method might be modified or addition of another method(s)
849     might be required when style sheet, XBL, or other
850     technologies has been implemented.
851     \
852     }
853     @@Return:
854     @@@PerlDef:
855 wakaba 1.20 @@@@ForCheck: ForFull
856     @@@@@:
857     if ($self-><M::NodeStem.isExternallyReferred>) {
858     $self-><M::NodeStem.changeTreeID>
859     (<Code::ManakaiDOM:generateUniqueID>);
860     } else {
861     $self-><M::NodeStem.destroy>;
862     }
863     @@@PerlDef:
864     @@@@ForCheck: ForCompact
865     @@@@@:
866     if ($self-><M::NodeStem.isExternallyReferred>) {
867     $self-><M::NodeStem.changeTreeID>
868     (\(<Code::ManakaiDOM:generateUniqueID>));
869     } else {
870     $self-><M::NodeStem.destroy>;
871     }
872 wakaba 1.10 ##NodeStem
873 wakaba 1.1
874     ## -- Public node object
875    
876     ClassDef:
877 wakaba 1.10 @resourceFor: ForFull
878     @resourceFor: ForCompact
879     @resourceFor:
880     ManakaiDOM:ForIF
881    
882     @QName:
883     @@@: NodeRef
884     @@ForCheck:
885     ManakaiDOM:ForIF
886    
887 wakaba 1.1 @QName:
888 wakaba 1.10 @@@:
889     ManakaiDOM:ManakaiDOMNodeReference
890     @@ForCheck: ForFull
891    
892     @Implement:
893     @@@: NodeRef
894     @@ForCheck: ForFull
895    
896     @QName:
897     @@@: ManakaiNodeRef
898     @@ForCheck: ForCompact
899    
900     @Implement:
901     @@@: NodeRef
902     @@ForCheck: ForCompact
903    
904 wakaba 1.22 @DISLang:role:
905     @@@: mn|NodeRefRole
906     @@ForCheck: ForCompact
907    
908 wakaba 1.1 @Description:
909     @@lang:en
910     @@@:
911     References to the node object corresponding to it. From
912     applications' view, any node object is hidden and
913     <Class::ManakaiDOM:ManakaiDOMNodeReference> seems as if
914     the node itself.
915     @ImplNote:
916     @@lang:en
917     @@@:
918 wakaba 1.13 {P:: A <Class::ManakaiDOM:ManakaiDOMNodeReference> is a blessed hash
919 wakaba 1.1 reference; currently there is a hash key defined:
920     \
921     - <CODE::TreeCore:node>::: A node object
922     (<Class::ManakaiDOM:ManakaiDOMNodeObject>) to which
923     this is referring.
924 wakaba 1.13
925     - <CODE::TreeCore:isWeak>::: Whether the reference is <QUOTE::weak>
926     or not.
927     }
928    
929     @ResourceDef:
930     @@Name: free
931     @@rdf:type: DISLang|Method
932     @@enDesc:
933     Frees the grove referenced by this object. Once
934     this operation is done, results of operations to objects belonging
935     to the grove are unknown.
936     @@ForCheck: ForCompact
937     @@Return:
938     @@@PerlDef:
939 wakaba 1.19 $self->{<H::mn:node>}-><M::NodeStem.destroy>;
940 wakaba 1.1
941     @IntMethod:
942     @@Name: destroy
943     @@Description:
944     @@@lang:en
945     @@@@: Destroy this reference object.
946     @@Operator:
947     @@@ContentType:
948     lang:Perl
949     @@@@: DESTROY
950     @@Return:
951     @@@PerlDef:
952     @@@@@:
953 wakaba 1.19 my $node = $self->{<H::mn:node>};
954 wakaba 1.1 if ($node) {
955 wakaba 1.19 CORE::delete $self->{<H::mn:node>};
956     unless ($self->{<H::mn:isWeak>}) {
957     $node->{<H::mn:rc>}--;
958 wakaba 1.10 unless ($node-><M::NodeStem.isExternallyReferred>) {
959     $node-><M::NodeStem.destroy>;
960 wakaba 1.6 }
961 wakaba 1.1 }
962     } else {
963     warn ref ($self) . q{->DESTROY: there is no associated }.
964     q{node object - you have a global variable or }.
965     qq{potential memory-leak detected\n};
966     }
967     @@@@ImplNote:
968     @@@@@lang:en
969     @@@@@@:
970     {P::Warning during the global destruction might mean:
971     \
972     - there be a loop in the manakai internal implementation -
973     it should be a bug.
974     \
975     - there be a loop created by application, e.g.
976     event handler containing a reference to any node
977     belonging to the same tree.
978     \
979     - there be a global variable that contains a node reference
980     and it is not altered or <Perl::undef>ed until the global
981     destruction.
982     \
983     - or other unknown bad situation.
984     \
985     }
986     @@ImplNote:
987     @@@lang:en
988     @@@@:
989     Don't override this method unintentionally - for example,
990     inheritting <PerlModule::Tie::Array> would hide this method
991     from that class, since that module defines its own
992     destructor.
993 wakaba 1.10 ##NodeRef
994 wakaba 1.22
995     ResourceDef:
996     @QName: mn|NodeRefRole
997     @rdf:type: DISLang|Role
998     @For: =ManakaiDOM|all
999     @enDesc:
1000     The <QUOTE::dis> definition for a class which plays the role
1001     of <Q::mn|NodeRefRole> provides a set of <QUOTE::dis> properties such
1002     as <Q::mn|subnode0> which identify the set of object internal
1003     property names (or hash key names) used to construct groves.
1004    
1005     PropDef:
1006     @QName: mn|type
1007     @mn:stemName: t
1008    
1009     PropDef:
1010     @QName: mn|noderef
1011     @dataType: DISCore|QName
1012     @multipleProperties: DISCore|UnorderedList
1013    
1014     PropDef:
1015     @QName: mn|subnode0
1016     @enDesc:
1017     A property of type <Q::mn|subnode0> takes a value of
1018     reference to another node (<Q::mn|NodeStem||ManakaiDOM|Perl>)
1019     in the same grove. The referenced node is considered
1020     to make a part of the node and just one <Q::mn|origin0>
1021     property of the referenced node <kwd:MUST> have a reference
1022     to the node. That is, these properties shows
1023     a origin-subnode-relationship.
1024     @dataType: DISCore|QName
1025     @multipleProperties: DISCore|UnorderedList
1026 wakaba 1.23 @mn:stemName: s0
1027 wakaba 1.22
1028     PropDef:
1029     @QName: mn|subnode1
1030     @enDesc:
1031     A property of type <Q::mn|subnode1> is similar to <Q::mn|subnode0>
1032     properties, but its value is an array or hash reference whose
1033     values are references to subnodes.
1034     @rdfs:subPropertyOf: mn|noderef
1035     @dataType: DISCore|QName
1036     @multipleProperties: DISCore|UnorderedList
1037 wakaba 1.23 @mn:stemName: s
1038 wakaba 1.22
1039     PropDef:
1040     @QName: mn|subnode2
1041     @enDesc:
1042     A property of type <Q::mn|subnode2> is similar to <Q::mn|subnode1>
1043     properties, but its value is an array or hash reference whose
1044     values are array or hash references whose values are
1045     references to subnodes.
1046     @rdfs:subPropertyOf: mn|noderef
1047     @dataType: DISCore|QName
1048     @multipleProperties: DISCore|UnorderedList
1049 wakaba 1.23 @mn:stemName: s2
1050 wakaba 1.22
1051     PropDef:
1052     @QName: mn|origin0
1053     @rdfs:subPropertyOf: mn|noderef
1054     @dataType: DISCore|QName
1055     @multipleProperties: DISCore|UnorderedList
1056 wakaba 1.23 @mn:stemName: o
1057 wakaba 1.22
1058     PropDef:
1059     @QName: mn|irefnode0
1060     @rdfs:subPropertyOf: mn|noderef
1061     @dataType: DISCore|QName
1062     @multipleProperties: DISCore|UnorderedList
1063 wakaba 1.23 @mn:stemName: i
1064 wakaba 1.22
1065     PropDef:
1066     @QName: mn|anydata1
1067     @rdfs:subPropertyOf: mn|noderef
1068     @dataType: DISCore|QName
1069     @multipleProperties: DISCore|UnorderedList
1070 wakaba 1.23 @mn:stemName: a1
1071 wakaba 1.22
1072     PropDef:
1073     @QName: mn|anydata2
1074     @rdfs:subPropertyOf: mn|noderef
1075     @dataType: DISCore|QName
1076     @multipleProperties: DISCore|UnorderedList
1077 wakaba 1.23 @mn:stemName: a2
1078 wakaba 1.6
1079     PropDef:
1080 wakaba 1.19 @QName: mn|nodeID
1081     @enDesc:
1082     The globally unique identifier of the node.
1083     @mn:stemName: nid
1084    
1085     PropDef:
1086     @QName: mn|treeID
1087     @enDesc:
1088     The globally unique identifier of the grove to which the
1089     node belongs.
1090     @mn:stemName: tid
1091    
1092     PropDef:
1093     @QName: mn|rc
1094     @enDesc:
1095     The number of the reference that points the node.
1096     @mn:stemName: rc
1097    
1098     PropDef:
1099     @QName: mn|node
1100     @mn:refName: node
1101     @rdfs:domain: mn|NodeRef||ManakaiDOM|Perl
1102     @rdfs:range: mn|NodeStem||ManakaiDOM|Perl
1103    
1104     PropDef:
1105     @QName: mn|isWeak
1106 wakaba 1.6 @enDesc:
1107     Whether a reference is weak or not.
1108 wakaba 1.19 @rdfs:domain: mn|NodeRef||ManakaiDOM|Perl
1109 wakaba 1.16 @Type: DISPerl|Boolean
1110 wakaba 1.19 @mn:refName: w
1111    
1112     PropDef:
1113     @QName: mn|stemName
1114     @enDesc:
1115     The key name of the property when it is used in <Class::ManakaiNodeStem
1116     ::ManakaiDOM:Perl>.
1117     @dataType: DISCore|String
1118     @multipleProperties: DISCore|Single
1119     @rdfs:domain: rdfs|Property
1120     @rdfs:subPropertyOf: DISPerl|propHashKey
1121    
1122     PropDef:
1123     @QName: mn|refName
1124     @enDesc:
1125     The key name of the property when it is used in <Class::ManakaiNodeRef
1126     ::ManakaiDOM:Perl>.
1127     @dataType: DISCore|String
1128     @multipleProperties: DISCore|Single
1129     @rdfs:domain: rdfs|Property
1130     @rdfs:subPropertyOf: DISPerl|propHashKey
1131 wakaba 1.6
1132     ElementTypeBinding:
1133     @Name:PropDef
1134     @ElementType:
1135     dis:ResourceDef
1136     @ShadowContent:
1137     @@rdf:type:
1138     rdf:Property
1139 wakaba 1.16 @@For: =ManakaiDOM|all
1140 wakaba 1.6
1141     ElementTypeBinding:
1142     @Name:enDesc
1143     @ElementType:
1144     dis:Description
1145     @ShadowContent:
1146     @@lang:en
1147 wakaba 1.1
1148     ## -- Frequently used code fragments
1149    
1150     ResourceDef:
1151     @QName:
1152     ManakaiDOM:generateUniqueID
1153     @rdf:type:
1154     dis2pm:InlineCode
1155     @Description:
1156     @@lang:en
1157     @@@:
1158     Generates a global-unique opaque string.
1159     \
1160     {NOTE:: A URI reference is generated by this code.
1161     \
1162     }
1163 wakaba 1.16
1164     @For: =ManakaiDOM|Perl
1165    
1166 wakaba 1.1 @PerlDef:
1167     (
1168     sprintf 'mid:%d.%d.%s.dom.manakai@suika.fam.cx#',
1169     time, $$,
1170     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62] .
1171     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62] .
1172     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62] .
1173     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62] .
1174     ['A'..'Z', 'a'..'z', '0'..'9']->[rand 62]
1175     )
1176     ##ManakaiDOM:generateUniqueID
1177    
1178     ## -- lang:dis vocabulary
1179    
1180     TreeElementType:
1181     @QName:
1182     dis:GetProp
1183     @dataType:
1184     dis:TypeQName
1185     @rdfs:range:
1186     rdf:Property
1187     @Description:
1188     @@lang:en
1189     @@@:
1190     Gets the non-nodal value of a <Class::ManakaiDOM:ManakaiDOMNodeReference>
1191     property (actualy <Class::ManakaiDOM:ManakaiDOMNodeObject> property).
1192    
1193     TreeElementType:
1194     @QName:
1195     dis:SetProp
1196     @dataType:
1197     dis:TypeQName
1198     @rdfs:range:
1199     rdf:Property
1200     @Description:
1201     @@lang:en
1202     @@@:
1203     Sets the non-nodal value of a <Class::ManakaiDOM:ManakaiDOMNodeReference>
1204     property (actualy <Class::ManakaiDOM:ManakaiDOMNodeObject> property).
1205    
1206     ## -- Syntax sugar
1207    
1208     ElementTypeBinding:
1209     @Name: TreeElementType
1210     @ElementType:
1211     dis:ResourceDef
1212     @ShadowContent:
1213     @@rdf:type:
1214     DISLang:TreeElementType
1215 wakaba 1.16 @@For: =ManakaiDOM|all
1216 wakaba 1.1
1217     ElementTypeBinding:
1218     @Name: ClassDef
1219     @ElementType:
1220     dis:ResourceDef
1221     @ShadowContent:
1222     @@rdf:type:
1223     @@@@:
1224 wakaba 1.10 dis:MultipleResource
1225     @@@ForCheck:
1226     !ForFull !ForCompact !ManakaiDOM:ForIF
1227     @@rdf:type:
1228     @@@@:
1229     ManakaiDOM:IF
1230     @@@ForCheck:
1231     ManakaiDOM:ForIF
1232     @@rdf:type:
1233     @@@@:
1234     ManakaiDOM:Class
1235     @@@ForCheck: ForFull
1236     @@rdf:type:
1237     @@@@:
1238     ManakaiDOM:Class
1239     @@@ForCheck: ForCompact
1240 wakaba 1.2 @@ForCheck:
1241     ManakaiDOM:Perl
1242 wakaba 1.10
1243     ForDef:
1244     @QName:
1245     mn:ForFull
1246     @ISA:
1247     ManakaiDOM:ForClass
1248    
1249     ForDef:
1250     @QName:
1251     mn:ForCompact
1252     @ISA:
1253     ManakaiDOM:ForClass
1254 wakaba 1.1
1255     ElementTypeBinding:
1256     @Name: IntMethod
1257     @ElementType:
1258     dis:ResourceDef
1259     @ShadowContent:
1260     @@rdf:type:
1261     DISLang:Method
1262     @@ManakaiDOM:isForInternal:1
1263    
1264     ElementTypeBinding:
1265     @Name: Return
1266     @ElementType:
1267     dis:ResourceDef
1268     @ShadowContent:
1269     @@rdf:type:
1270     DISLang:MethodReturn
1271    
1272     ElementTypeBinding:
1273     @Name: Param
1274     @ElementType:
1275     dis:ResourceDef
1276     @ShadowContent:
1277     @@rdf:type:
1278     DISLang:MethodParameter
1279    
1280     ElementTypeBinding:
1281     @Name: PerlDef
1282     @ElementType:
1283     dis:Def
1284     @ShadowContent:
1285     @@ContentType:
1286     lang:Perl
1287    
1288     ElementTypeBinding:
1289     @Name: InCase
1290     @ElementType:
1291     dis:ResourceDef
1292     @ShadowContent:
1293     @@rdf:type:
1294     ManakaiDOM:InCase

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24