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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Fri Feb 25 07:32:35 2005 UTC (20 years, 4 months ago) by wakaba
Branch: MAIN
Changes since 1.2: +737 -173 lines
lib/Message/Util/DIS.dis: Now compilable

1 wakaba 1.1 Module:
2     @QName:
3     Util:DIS
4     @FullName:
5     @@lang: en
6     @@@:
7     <QUOTE::DIS> Object Model
8     @Namespace:
9     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS#
10    
11     @Description:
12     @@lang:en
13     @@@:
14     This module provides an object model for <QUITE::dis> document format.
15    
16     @Author:
17     @@FullName: Wakaba
18     @@Mail: w@suika.fam.cx
19     @License:
20     @@@:
21     license:Perl+MPL
22     @@Original:
23     @@@FullName:
24     manakai <CODE::lib/manakai/dis.pl>
25     @@@Year:2004
26     @@@Author:
27     @@@@FullName:Wakaba
28     @@@@Mail:w@suika.fam.cx
29     @Date:
30     @@@:
31 wakaba 1.3 $Date: 2005/02/22 08:21:00 $
32 wakaba 1.1 @@ContentType:
33     dis:Date.RCS
34    
35     @Require:
36     @@Module:
37     @@@Name: SuikaWikiConfig21
38     @@@WithFor:
39 wakaba 1.3 swcfg21:ForLatest
40     @@Module:
41     @@@Name: DIS
42     @@@WithFor:
43     DIS:ForLatest
44    
45     @DefaultFor:
46     DIS:ForLatest
47 wakaba 1.1
48     Namespace:
49     @DIS:
50     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS#
51     @dis:
52     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis--
53     @dis2pm:
54     http://suika.fam.cx/~wakaba/archive/2004/11/8/dis2pm#
55 wakaba 1.3 @DOMCore:
56     http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#
57     @DOMLS:
58     http://suika.fam.cx/~wakaba/archive/2004/dom/ls#
59     @DOMMain:
60     http://suika.fam.cx/~wakaba/archive/2004/dom/main#
61     @infoset:
62     http://www.w3.org/2001/04/infoset#
63 wakaba 1.1 @lang:
64     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#
65     @license:
66     http://suika.fam.cx/~wakaba/archive/2004/8/18/license#
67     @ManakaiDOM:
68     http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#
69 wakaba 1.3 @MDOMX:
70     http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#
71 wakaba 1.1 @owl:
72     http://www.w3.org/2002/07/owl#
73     @Perl:
74     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#Perl--
75     @rdf:
76     http://www.w3.org/1999/02/22-rdf-syntax-ns#
77     @rdfs:
78     http://www.w3.org/2000/01/rdf-schema#
79 wakaba 1.3 @swcfg21:
80     http://suika.fam.cx/~wakaba/archive/2005/swcfg21#
81 wakaba 1.1 @TreeCore:\
82     @Util:
83     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/
84    
85     ## -- "For" definitions
86    
87     ForDef:
88     @QName:
89     DIS:ForLatest
90     @Description:
91     @@lang:en
92     @@@:
93     For latest version of the <Module::Util:DIS> module implementation
94     @ISA:
95     ManakaiDOM:Perl
96    
97     ## -- Features
98    
99     ElementTypeBinding:
100     @Name: FeatureDef
101     @ElementType:
102     dis:ResourceDef
103     @ShadowContent:
104     @@rdf:type:
105     DOMMain:DOMFeature
106     @@AliasFor:
107     @@@@:
108     ::ManakaiDOM:all
109     @@@For:
110     !=ManakaiDOM:all
111    
112     ElementTypeBinding:
113     @Name: FeatureVerDef
114     @ElementType:
115     dis:ResourceDef
116     @ShadowContent:
117     @@rdf:type:
118     DOMMain:DOMFeature
119    
120     ElementTypeBinding:
121     @Name: featureQName
122     @ElementType:
123     dis:AppName
124     @ShadowContent:
125     @@ContentType:
126     dis:TypeQName
127    
128     FeatureDef:
129     @QName: Core
130     @FeatureVerDef:
131     @@QName: CoreFeature10
132     @@Version: 1.0
133     @@ISA: Core
134     @@FullName:
135     @@@lang:en
136     @@@@:
137     The <QUOTE::dis> object model, version 1.0
138     @@Description:
139     @@@lang:en
140     @@@@:
141     The <QUOTE::dis> object model, version 1.0.
142     @@DOMMain:requireFeature:
143     swcfg21:CoreFeature21
144    
145     ## -- SuikaWikiConfig/2.1 extended classes
146    
147     ClsDef:
148     @ClsQName: ManakaiDISImplementation
149     @ClsISA:
150 wakaba 1.3 swcfg21:ManakaiSWCFGImplementation::swcfg21:ForLatest
151 wakaba 1.1 @Description:
152     @@lang:en
153     @@@:
154     A <QUOTE::dis> implementation object.
155    
156     @Method:
157     @@Name: createDISDocument
158     @@Description:
159     @@@lang:en
160     @@@@:
161     Creates an empty <Class::ManakaiDISDocument> object.
162     @@Return:
163     @@@Type:ManakaiDISDocument
164     @@@Description:
165     @@@@lang:en
166     @@@@@:
167     The newly created <QUOTE::dis> document object.
168     @@@PerlDef:
169 wakaba 1.3 $r = $self-><M::swcfg21:SWCFGImplementation::swcfg21:ForLatest
170     .createSWCFGDocument>;
171     $r-><AS::swcfg21:SWCFGDocument::swcfg21:ForLatest
172     .defaultElementTypeNamespaceURI>
173 wakaba 1.1 (<Q::dis:>);
174    
175     @Method:
176 wakaba 1.2 @@Name: createDISParser
177     @@Description:
178     @@@lang:en
179     @@@@:
180 wakaba 1.1 Creates a <Class::ManakaiDISParser> object.
181 wakaba 1.2 @@Return:
182     @@@Type: ManakaiDISParser
183     @@@Description:
184     @@@@lang:en
185     @@@@@:
186 wakaba 1.1 A newly created <QUOTE::dis> parser.
187 wakaba 1.2 @@@PerlDef:
188 wakaba 1.3 $r = bless $self-><M::swcfg21:SWCFGImplementation::swcfg21:ForLatest
189     .createSWCFGParser>,
190 wakaba 1.1 <ClassName::ManakaiDISParser>;
191    
192     @Method:
193 wakaba 1.2 @@Name: createDISDatabase
194 wakaba 1.1 @@Description:
195     @@@lang:en
196     @@@@:
197 wakaba 1.2 Creates a new <QUOTE::dis> database.
198 wakaba 1.1 @@Return:
199 wakaba 1.2 @@@Type:ManakaiDISDatabase
200     @@Description:
201     @@@lang:en
202     @@@@:
203     A newly created <QUOTE::dis> parser.
204     @@PerlDef:
205     $r = bless {
206     forDef => {
207     <Q::ManakaiDOM:all> => {
208     uri => <Q::ManakaiDOM:all>,
209     isa => {<Q::ManakaiDOM:all> => 1},
210     revISA => {},
211     },
212     },
213     resDef => {},
214 wakaba 1.3 }, <ClassName::ManakaiDISDatabase>;
215    
216     @Method:
217     @@Name: tfurisToURI
218     @@Description:
219     @@@lang:en
220     @@@@:
221     Converts a pair of name URI reference and <QUOTE::for> URI reference
222     into a <TYPE::dis:TFQNames>-expanded URI reference.
223     @@Param:
224     @@@Name: typeURI
225     @@@Type: NameURI
226     @@@Description:
227     @@@@lang:en
228     @@@@@:
229     A URI reference to identify a resource.
230     @@@InCase:
231     @@@@Value:
232     @@@@@is-null:1
233     @@@@Description:
234     @@@@@lang:en
235     @@@@@@:
236     Equivalent to <Q::DOMMain:any> (for historical reason).
237     @@Param:
238     @@@Name: forURI
239     @@@Type: ForURI
240     @@@Description:
241     @@@@lang:en
242     @@@@@:
243     A <QUOTE::for> URI reference.
244     @@@InCase:
245     @@@@Value:
246     @@@@@is-null:1
247     @@@@Description:
248     @@@@@lang:en
249     @@@@@@:
250     Equivalent to <QUOTE::for all>, i.e. <Q::ManakaiDOM:all>.
251     @@Return:
252     @@@Type:
253     DISCore:TFURI::ManakaiDOM:all
254     @@@Description:
255     @@@@lang:en
256     @@@@@:
257     The <TYPE::dis:TFQNames>-expanded URI references.
258     @@@PerlDef:
259     $typeURI = <Q::DOMMain:any> unless defined $typeURI;
260     $forURI = <Q::ManakaiDOM:all> unless defined $forURI;
261     if ($forURI eq <Q::ManakaiDOM:all>) {
262     $r = $typeURI;
263     } else {
264     ## NOTE: [RFC 3986]
265     ## fragment := *(pchar / "/" / "?")
266     ## pchar := unreserved / pct-encoded / sub-delims / [:@]
267     ## unreserved := ALPHA / DIGIT / [._~-]
268     ## sub-delims := [!$&'()*+,;=]
269     ## NOTE: [XPointer Framework]
270     ## SchemeData := *EscapedData
271     ## EscapedData := NormalChar / "^(" / "^)" / "^^"
272     ## / "(" SchemeData ")"
273     ## NormalChar := UnicodeChar - [()^]
274     for my $uri ($typeURI, $forURI) {
275     $uri =~ s{([^0-9A-Za-z:;?=_./-])}{sprintf '%%%02X', ord $1}ge;
276     }
277     $r =qq<data:,200411tf#xmlns(t=data:,200411tf%23)>.
278     qq<t:tf($typeURI,$forURI)>;
279     }
280 wakaba 1.2
281 wakaba 1.1 ##DISImplementation
282    
283     ClsDef:
284     @ClsQName: ManakaiDISParser
285     @ClsISA:
286 wakaba 1.3 swcfg21:ManakaiSWCFGParser::swcfg21:ForLatest
287 wakaba 1.1 @Description:
288     @@lang:en
289     @@@:
290     A SuikaWikiConfig/2.1 parser that returns <QUOTE::dis> object.
291     @Method:
292 wakaba 1.3 @@Name: parse
293     @@Description:
294     @@@lang:en
295     @@@@:
296 wakaba 1.1 Parses a <QUOTE::dis> document and returns it as an object tree.
297 wakaba 1.3 @@Param:
298     @@@Name: input
299     @@@Type:
300     DOMLS:LSInput::ManakaiDOM:ManakaiDOM3
301     @@@Description:
302     @@@@lang:en
303     @@@@@:
304 wakaba 1.1 The input source.
305 wakaba 1.3 @@Return:
306     @@@Type: ManakaiDISDocument
307     @@@Description:
308     @@@@lang:en
309     @@@@@:
310 wakaba 1.1 The <QUOTE::dis> document object created from the <P::input>.
311     @@@RaiseException:
312     @@@@@:
313     swcfg21:SWCFG_PARSE_ERR
314     @@@@Description:
315     @@@@@lang:en
316     @@@@@@:
317     The <IF::swcfg21:SWCFGParser> was unable to load the SuikaWikiConfig
318     document.
319     @@@PerlDef:
320     __DEEP{
321 wakaba 1.3 $r = $self-><M::swcfg21:ManakaiSWCFGParser
322     ::swcfg21:ForLatest.parse> ($input);
323 wakaba 1.1 }__;
324     if (defined $r) {
325     $r = bless $r, <ClassName::ManakaiDISDocument>;
326     }
327     ##DISParser
328    
329     ClsDef:
330     @ClsQName: ManakaiDISNode
331     @ClsISA:
332 wakaba 1.3 swcfg21:ManakaiSWCFGNode::swcfg21:ForLatest
333 wakaba 1.1 @Description:
334     @@lang:en
335     @@@:
336     <QUOTE::dis> node objects.
337    
338     @MethodRedef:
339     @@Name:lookupNamespacePrefix
340     @@Description:
341     @@@lang:en
342     @@@@:
343     Looks up the namespace prefix associated to the given
344     namespace URI. The default namespaces are ignored.
345     @@Param:
346     @@@Name:namespaceURI
347 wakaba 1.3 @@@Type: AnyURI
348 wakaba 1.1 @@@Description:
349     @@@@lang:en
350     @@@@@:
351     The namespace URI to look for.
352     @@@InCase:
353     @@@@Value:
354     @@@@@is-null:1
355     @@@@Description:
356     @@@@@lang:en
357     @@@@@@:
358     The <DOM::null> namespace.
359     @@NamedParam:
360     @@@Name: makeNewBinding
361     @@@Type:
362     DOMMain:boolean
363     @@@Description:
364     @@@@lang:en
365     @@@@@:
366     Whether a new namespace prefix should be bound when
367     no namespace URI has been associated yet.
368     @@@InCase:
369     @@@@Value:true
370     @@@@Description:
371     @@@@@lang:en
372     @@@@@@:
373     New binding is made if no prefix associated.
374     @@@InCase:
375     @@@@Value:false
376     @@@@Description:
377     @@@@@lang:en
378     @@@@@@:
379     Simply returns the <DOM::null> if no prefix associated.
380     @@Return:
381     @@@Type:
382 wakaba 1.3 DISCore:NamespacePrefix::ManakaiDOM:all
383 wakaba 1.1 @@@Description:
384     @@@@lang:en
385     @@@@@:
386     An associated namespace prefix. If more than one prefix
387     are associated to the namespace URI, the returned prefix
388     is implementation dependent.
389     @@@InCase:
390     @@@@Value:
391     @@@@@is-null:1
392     @@@@Description:
393     @@@@@lang:en
394     @@@@@@:
395     No associated namespace prefix found.
396     @@@PerlDef:
397     $r = null;
398 wakaba 1.3 my $od = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
399     .ownerDocument> || $self;
400 wakaba 1.1 my $binds = $od->{<Q::TreeCore:node>}->{<Q::nsBinding>};
401     if (defined $namespaceURI) {
402     FIND: {
403     for my $prefix (keys %$binds) {
404     if (defined $binds->{$prefix} and
405     $binds->{$prefix} eq $namespaceURI) {
406     $r = $prefix;
407     last FIND;
408     }
409     }
410     last FIND unless $makeNewBinding;
411     ## Not found
412     if ($namespaceURI =~ /(\w+)$/) {
413     my $prefix = $1;
414     unless (exists $binds->{$prefix}) {
415     $binds->{$prefix} = $namespaceURI;
416     $r = $prefix;
417     last FIND;
418     }
419     }
420     my $i = 1;
421     {
422     unless (exists $binds->{'ns'.$i}) {
423     $binds->{$r = 'ns'.$i} = $namespaceURI;
424     last FIND;
425     }
426     $i++;
427     redo;
428     }
429     } # FIND
430     } else { ## Null namespace
431     FIND: {
432     if (exists $binds->{'nu'.'ll'} and not defined $binds->{'nu'.'ll'}) {
433     $r = 'nu'.'ll';
434     last FIND;
435     }
436     for my $prefix (keys %$binds) {
437     if (not defined $prefix) {
438     $r = $prefix;
439     last FIND;
440     }
441     }
442     last FIND unless $makeNewBinding;
443     ## Not found
444     my $i = '';
445     {
446     unless (exists $binds->{'nu'.'ll'.$i}) {
447     $binds->{$r = 'nu'.'ll'.$i} = null;
448     last FIND;
449     }
450     $i++;
451     redo;
452     }
453     }
454     }
455     ## TODO: Module ns support
456    
457     @MethodRedef:
458     @@Name:lookupNamespaceURI
459     @@Description:
460     @@@lang:en
461     @@@@:
462     Looks up the namespace URI associated to the given prefix.
463     @@Param:
464     @@@Name:prefix
465     @@@Type:
466 wakaba 1.3 DISCore:NamespacePrefix::ManakaiDOM:all
467 wakaba 1.1 @@@Description:
468     @@@@lang:en
469     @@@@@:
470     The namespace URI to look for.
471     @@NamedParam:
472     @@@Name: makeNewBinding
473     @@@Type:
474     DOMMain:boolean
475     @@@Description:
476     @@@@lang:en
477     @@@@@:
478     Whether a new binding should be created if no namespace URI
479     is associated with the <P::prefix> or not.
480     @@@InCase:
481     @@@@Value:true
482     @@@@Description:
483     @@@@@lang:en
484     @@@@@@:
485     A new binding to the temporary namespace URI
486     exactly same as <P::prefix> is created
487     if no binding found.
488     @@@InCase:
489     @@@@Value:false
490     @@@@Description:
491     @@@@@lang:en
492     @@@@@@:
493     No new binding is created if no binding found. Note that
494     even if no association newly created, this method
495     returns the <DOM::null> value.
496     @@Return:
497 wakaba 1.3 @@@Type: AnyURI
498 wakaba 1.1 @@@Description:
499     @@@@lang:en
500     @@@@@:The associated namespace URI.
501     @@@InCase:
502     @@@@Value:
503     @@@@@is-null:1
504     @@@@Description:
505     @@@@@lang:en
506     @@@@@@:
507 wakaba 1.3 No namespace URI is associated to the prefix or
508 wakaba 1.1 the <DOM::null> namespace is associated.
509     @@@PerlDef:
510 wakaba 1.3 my $od = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
511     .ownerDocument> || $self;
512 wakaba 1.1 my $binds = $od->{<Q::TreeCore:node>}->{<Q::nsBinding>};
513     if (exists $binds->{$prefix}) {
514     $r = $binds->{$prefix};
515     } elsif ($makeNewBinding) {
516     $r = $binds->{$prefix} = $prefix;
517     } else {
518     $r = null;
519     }
520     ## TODO: Module ns support
521    
522     @IntMethod:
523     @@Name:getNodeReference
524     @@Description:
525     @@@lang:en
526     @@@@:
527     Returns a new reference to the node object.
528     @@ManakaiDOM:isStatic:1
529     @@Param:
530     @@@Name:object
531     @@@Type:
532     ManakaiDOM:ManakaiDOMNodeObject::ManakaiDOM:Perl
533     @@@Description:
534     @@@@lang:en
535     @@@@@:
536     The node object to be referred.
537     @@Return:
538     @@@Type: ManakaiDISNode
539     @@@Description:
540     @@@@lang:en
541     @@@@@:
542     A newly created reference.
543     @@@PerlDef:
544     my $class;
545     if ($object->{<Q::nodeType>} eq '#element') {
546     $class = <ClassName::ManakaiDISElement>;
547     } elsif ($object->{<Q::nodeType>} eq '#comment') {
548     $class = <ClassName::ManakaiDISComment>;
549     } elsif ($object->{<Q::nodeType>} eq '#document') {
550     $class = <ClassName::ManakaiDISDocument>;
551     } elsif ($object->{<Q::nodeType>} eq '#fragment') {
552     $class = <ClassName::ManakaiDISDocumentFragment>;
553     } else {
554     __ASSERT{DISPerl:invariant::
555     msg => {qq[Node type: "$object->{<Q::nodeType>}" ].
556     qq[(ref: "@{[ref $object]}")]},
557     }__;
558     }
559     $r = $object-><M::ManakaiDOM:ManakaiDOMNodeObject::ManakaiDOM:Perl
560     .newReference> ($class);
561    
562 wakaba 1.2 @Attr:
563     @@Name:ownerDISDocument
564     @@Description:
565     @@@lang:en
566     @@@@:
567     The <QUOTE::dis> document object associated with this node.
568     @@Get:
569 wakaba 1.3 @@@Type:ManakaiDISDocument
570 wakaba 1.2 @@@Description:
571     @@@@lang:en
572     @@@@@:
573     The document object associated with this node.
574     @@@InCase:
575     @@@@Value:
576     @@@@@is-null:1
577     @@@@Description:
578     @@@@@lang:en
579     @@@@@@:
580     This node is a document node.
581     @@@PerlDef:
582     $r = <ClassM::ManakaiDISNode.getNodeReference>
583     ($self->{<Q::TreeCore:node>}->{<Q::DOMCore:ownerDocument>})
584     if $self->{<Q::TreeCore:node>}->{<Q::DOMCore:ownerDocument>};
585 wakaba 1.1 ##DISNode
586    
587     ClsDef:
588     @ClsQName: ManakaiDISElement
589     @ClsISA:
590 wakaba 1.3 swcfg21:ManakaiSWCFGElement::swcfg21:ForLatest
591 wakaba 1.1 @ClsISA: ManakaiDISNode
592     @Description:
593     @@lang:en
594     @@@:
595     <QUOTE::dis> element node objects.
596    
597     @Method:
598     @@Name: forMatch
599     @@Description:
600     @@@lang:en
601     @@@@:
602     Tests whether this element is for a <QUOTE::for> or not.
603     @@Param:
604     @@@Name: forArg
605     @@@Type: ForURI
606     @@@Description:
607     @@@@lang:en
608     @@@@@:
609     The <QUOTE::For> URI reference to test against.
610     @@Param:
611     @@@Name: forpArg
612     @@@Type: ForURIList
613     @@@Description:
614     @@@@lang:en
615     @@@@@:
616     The <QUOTE::For+> URI references to test against.
617     @@@InCase:
618     @@@@Value:
619     @@@@@is-null:1
620     @@@@Description:
621     @@@@@lang:en
622     @@@@@@:
623     No additional <QUOTE::For> URI reference.
624 wakaba 1.3 Equivalent to an empty array reference.
625 wakaba 1.1 @@Return:
626     @@@Type:
627     DOMMain:boolean
628     @@@Description:
629     @@@@lang:en
630     @@@@@:
631     Whether this element is for <P::forArg> and <P::forpArg> or not.
632 wakaba 1.2 @@@UndeclaredPrefixException:
633     @@@NoDBException:
634     @@@PerlDef:
635 wakaba 1.3 $forArg = <Q::ManakaiDOM:all> unless defined $forArg;
636     $forpArg ||= [];
637 wakaba 1.2
638     FORMATCH: {
639     __DEEP{
640     my @ce = @{$self-><AG::ManakaiDISElement.disChildElements>};
641     for my $ce (@ce) {
642 wakaba 1.3 my $et = $ce-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
643     .expandedURI>;
644 wakaba 1.2 if ($et eq <Q::dis:ForCheck>) {
645 wakaba 1.3 my $for = [split /\s+/, $ce-><AG::swcfg21:SWCFGNode
646     ::swcfg21:ForLatest.value>];
647 wakaba 1.2 FCs: for my $f (@$for) {
648     if ($f =~ /^!=(.+)$/) { ## -- NOT EQUAL TO
649     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
650     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
651     -><AG::ManakaiDISDocument.disDatabase>
652     -><M::ManakaiDISDatabase.getFor> ($uri);
653     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
654 wakaba 1.3 for my $arg_uri ($forArg, @{$forpArg}) {
655 wakaba 1.2 if ($uri eq $arg_uri) {
656     $r = false;
657     last FORMATCH;
658     }
659     }
660     } elsif ($f =~ /^!(.+)$/) { ## -- NOT ISA
661     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
662     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
663     -><AG::ManakaiDISDocument.disDatabase>
664     -><M::ManakaiDISDatabase.getFor> ($uri);
665     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
666 wakaba 1.3 for my $arg_uri ($forArg, @{$forpArg}) {
667 wakaba 1.2 if ($f-><M::ManakaiDISForDefinition.isaURI> ($arg_uri)) {
668     $r = false;
669     last FORMATCH;
670     }
671     }
672     } elsif ($f =~ /^=(.+)$/) { ## -- EQUAL TO
673     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
674     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
675     -><AG::ManakaiDISDocument.disDatabase>
676     -><M::ManakaiDISDatabase.getFor> ($uri);
677     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
678 wakaba 1.3 for my $arg_uri ($forArg, @{$forpArg}) {
679 wakaba 1.2 if ($arg_uri eq $uri) {
680     next FCs;
681     }
682     }
683     $r = false;
684     last FORMATCH;
685     } else { ## -- ISA
686     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
687     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
688     -><AG::ManakaiDISDocument.disDatabase>
689     -><M::ManakaiDISDatabase.getFor> ($uri);
690     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
691 wakaba 1.3 for my $arg_uri ($forArg, @{$forpArg}) {
692 wakaba 1.2 if ($f-><M::ManakaiDISForDefinition.isaURI> ($arg_uri)) {
693     next FCs;
694     }
695     }
696     $r = false;
697     last FORMATCH;
698     }
699     } # FCs
700     } # dis:ForCheck
701     } # children
702    
703     my $has_for = false;
704     for my $ce (@ce) {
705 wakaba 1.3 if ($self-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
706     .expandedURI> eq
707 wakaba 1.2 <Q::dis:For>) {
708 wakaba 1.3 my $for = [split /\s+/, $ce-><AG::swcfg21:SWCFGNode
709     ::swcfg21:ForLatest.value>];
710 wakaba 1.2 my $ok = true;
711     $has_for = true;
712     AFOR: for my $f (@$for) {
713     if ($f =~ /^!=(.+)$/) { ## -- NOT EQUAL TO
714     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
715     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
716     -><AG::ManakaiDISDocument.disDatabase>
717     -><M::ManakaiDISDatabase.getFor> ($uri);
718     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
719 wakaba 1.3 if ($uri eq $forArg) {
720 wakaba 1.2 $ok = false;
721     last AFOR;
722     }
723     } elsif ($f =~ /^!(.+)$/) { ## -- NOT ISA
724     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
725     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
726     -><AG::ManakaiDISDocument.disDatabase>
727     -><M::ManakaiDISDatabase.getFor> ($uri);
728     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
729 wakaba 1.3 if ($f-><M::ManakaiDISForDefinition.isaURI> ($forArg)) {
730 wakaba 1.2 $ok = false;
731     last AFOR;
732     }
733     } elsif ($f =~ /^=(.+)$/) { ## -- EQUAL TO
734     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
735     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
736     -><AG::ManakaiDISDocument.disDatabase>
737     -><M::ManakaiDISDatabase.getFor> ($uri);
738     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
739 wakaba 1.3 unless ($uri eq $forArg) {
740 wakaba 1.2 $ok = false;
741     last AFOR;
742     }
743     } else { ## -- ISA
744     my $uri = $self-><AG::ManakaiDISElement.qnameToURI> ($1);
745     my $f = $self-><AG::ManakaiDISNode.ownerDISDocument>
746     -><AG::ManakaiDISDocument.disDatabase>
747     -><M::ManakaiDISDatabase.getFor> ($uri);
748     $f-><AG::ManakaiDISForDefinition.isReferred> ($ce);
749 wakaba 1.3 unless ($f-><M::ManakaiDISForDefinition.isaURI> ($forArg)) {
750 wakaba 1.2 $ok = false;
751     last AFOR;
752     }
753     }
754     } # AFOR
755 wakaba 1.3 if ($ok) {
756     $r = true;
757     last FORMATCH;
758     }
759 wakaba 1.2 } # dis:For
760     } # $ce
761     $r = $has_for ? false : true;
762     }__;
763     } # FORMATCH
764 wakaba 1.1
765     @Method:
766     @@Name: mediaTypeMatch
767     @@Description:
768     @@@lang:en
769     @@@@:
770     Tests whether the content media type of this element matches to
771     a type or not.
772     @@Param:
773     @@@Name: mediaType
774     @@@Type: MediaTypeURI
775     @@@Description:
776     @@@@lang:en
777     @@@@@:
778     A media type URI reference to test against.
779     @@Param:
780 wakaba 1.3 @@@Name: defaultMediaType
781 wakaba 1.1 @@@Type: MediaTypeURI
782     @@@Description:
783     @@@@lang:en
784     @@@@@:
785     The default media type for this element.
786     @@@InCase:
787     @@@@Value:
788     @@@@@is-null:1
789     @@@@Description:
790     @@@@@lang:en
791     @@@@@@:
792     No default type provided. All <P::mediaType> will match.
793     @@Return:
794     @@@Type:
795     DOMMain:boolean
796     @@@Description:
797     @@@@lang:en
798     @@@@@:
799     Whether this element is of <P::mediaType> or not.
800 wakaba 1.2 @@@PerlDef:
801     if (defined $mediaType) {
802     __DEEP{
803     my $ctn = $self-><M::ManakaiDISElement.disGetAttribute>
804     (<Q::dis:ContentType>);
805     my $ct;
806     $ct = $ctn-><AG::ManakaiDISElement.qnameValueURI> if $ctn;
807     $ct = $defaultMediaType unless defined $ct;
808     my $res = $self-><AG::ManakaiDISNode.ownerDISDocument>
809     -><AG::ManakaiDISDocument.disDatabase>
810     -><M::ManakaiDISDatabase.getResource> ($ct);
811     $res-><AS::ManakaiDISResourceDefinition.isReferred> ($ctn or $self);
812     unless ($res-><M::ManakaiDISResourceDefinition.subsetOfURI> ($ct)) {
813     $r = false;
814     } else {
815     $r = true;
816     }
817     }__;
818     } else {
819     $r = true;
820     }
821 wakaba 1.1
822     @Method:
823     @@Name: prefixToURI
824     @@Description:
825     @@@lang:en
826     @@@@:
827     Converts a namespace prefix into associated URI reference.
828     @@Param:
829     @@@Name: prefix
830     @@@Type:
831 wakaba 1.3 DISCore:NamespacePrefix::ManakaiDOM:all
832 wakaba 1.1 @@@Description:
833     @@@@lang:en
834     @@@@@:
835     A namespace prefix to look for.
836     @@@InCase:
837     @@@@Value:
838     @@@@@is-null:1
839     @@@@Description:
840     @@@@@lang:en
841     @@@@@@:
842     Returns the default namespace URI.
843     @@NodeParam:
844     @@Return:
845 wakaba 1.3 @@@Type: AnyURI
846 wakaba 1.1 @@@Description:
847     @@@@lang:en
848     @@@@@: The URI references associated.
849     @@@UndeclaredPrefixException:
850     @@@PerlDef:
851 wakaba 1.3 if (defined $prefix) {
852 wakaba 1.1 __DEEP{
853 wakaba 1.3 $r = $self-><M::swcfg21:SWCFGNode::swcfg21:ForLatest
854     .lookupNamespaceURI> ($prefix);
855 wakaba 1.1 }__;
856     unless (defined $r) {
857     __EXCEPTION{UNDECLARED_NS_PREFIX_ERR::
858     infoset:prefix => {$prefix},
859     MDOMX:param-name => 'prefix',
860     DIS:sourceNode => {$node},
861     }__;
862     }
863     } else {
864     ## TODO: default namespace
865     }
866    
867     @Method:
868     @@QName: qnameToURI
869     @@Description:
870     @@@lang:en
871     @@@@:
872     Converts a qualified name (<TYPE::dis:TypeQName>) to
873     an expanded URI reference.
874     @@Param:
875     @@@Name: qname
876     @@@Type:
877     dis:TypeQName
878     @@@Description:
879     @@@@lang:en
880     @@@@@:
881     A qualified name.
882     @@NodeParam:
883     @@Return:
884     @@@Type: AnyURI
885     @@@Description:
886     @@@@lang:en
887     @@@@@:
888     The expanded URI reference.
889     @@@UndeclaredPrefixException:
890     @@@PerlDef:
891     $qname =~ s/^\s+//; $qname =~ s/\s+$//;
892     my ($prefix, $lname) = split /:/, $qname;
893     __DEEP{
894     if (defined $lname) {
895     $r = $self-><M::ManakaiDISElement.prefixToURI> ($prefix) . $lname;
896     } else { ## In default namespace
897     $r = $self-><M::ManakaiDISElement.prefixToURI> (null) . $prefix;
898     }
899     }
900    
901     @Method:
902     @@QName: qnameToPair
903     @@Description:
904     @@@lang:en
905     @@@@:
906     Converts a qualified name (<TYPE::dis:TypeQName>) to
907     a pair of namespace URI and local name.
908     @@Param:
909     @@@Name: qname
910     @@@Type:
911     dis:TypeQName
912     @@@Description:
913     @@@@lang:en
914     @@@@@:
915     A qualified name.
916     @@NodeParam:
917     @@Return:
918     @@@Type:
919     Perl:ARRAY
920     @@@Description:
921     @@@@lang:en
922     @@@@@:
923     A list of namespace URI and local name.
924     @@@UndeclaredPrefixException:
925     @@@PerlDef:
926     $qname =~ s/^\s+//; $qname =~ s/\s+$//;
927     my ($prefix, $lname) = split /:/, $qname;
928     __DEEP{
929     if (defined $lname) {
930     $r = [$self-><M::ManakaiDISElement.prefixToURI> ($prefix), $lname];
931     } else { ## In default namespace
932     $r = [$self-><M::ManakaiDISElement.prefixToURI> (null), $prefix];
933     }
934     }
935    
936     @Method:
937 wakaba 1.3 @@Name: tfqnamesToURI
938 wakaba 1.1 @@Description:
939     @@@lang:en
940     @@@@:
941 wakaba 1.3 Converts a <TYPE::dis:TFQNames>
942 wakaba 1.1 into an expanded URI reference.
943     @@Param:
944     @@@Name: tfqnames
945     @@@Type:
946 wakaba 1.3 dis:TFQNames
947 wakaba 1.1 @@@Description:
948     @@@@lang:en
949     @@@@@:
950 wakaba 1.3 A <TYPE::dis:TFQNames> to identify a resource.
951 wakaba 1.1 @@Param:
952     @@@Name: defaultTypeURI
953     @@@Type: NameURI
954     @@@Description:
955     @@@@lang:en
956     @@@@@:
957     A name URI reference used if it is missing from
958     <P::tfqnames>.
959     @@@InCase:
960     @@@@Value:
961     @@@@@is-null:1
962     @@@@Description:
963     @@@@@lang:en
964     @@@@@@:
965     Equivalent to <Q::DOMMain:any>.
966     @@Param:
967     @@@Name: defaultForURI
968     @@@Type: ForURI
969     @@@Description:
970     @@@@lang:en
971     @@@@@:
972     A <QUOTE::for> URI reference used if it is missing from
973     <P::tfqnames>.
974     @@@InCase:
975     @@@@Value:
976     @@@@@is-null:1
977     @@@@Description:
978     @@@@@lang:en
979     @@@@@@:
980     Equivalent to <QUOTE::for all>, i.e. <Q::ManakaiDOM:all>.
981     @@NodeParam:
982     @@Return:
983     @@@Type:
984 wakaba 1.3 DISCore:TFURI::ManakaiDOM:all
985 wakaba 1.1 @@@Description:
986     @@@@lang:en
987     @@@@@:
988 wakaba 1.3 The <TYPE::dis:TFQNames>-expanded URI references.
989 wakaba 1.1 @@@UndeclaredPrefixException:
990     @@@PerlDef:
991     my ($typeq, $forq) = split /\s*::\s*/, $tfqnames, 2;
992     my ($typeURI, $forURI);
993     if (defined $forq) {
994     __DEEP{
995     $typeURI = $typeq eq ''
996     ? defined $defaultTypeURI ? $defaultTypeURI
997     : <Q::DOMMain:any>
998     : $self-><M::ManakaiDISElement.qnameToURI> ($typeq, %opt);
999     }__;
1000     if (length $forq) {
1001     $forURI = $self-><M::ManakaiDISElement.qnameToURI> ($forq, %opt);
1002     } else {
1003     $forURI = <Q::ManakaiDOM:all>;
1004     }
1005     } else { ## "For" omitted
1006     __DEEP{
1007     $typeURI = $typeq eq ''
1008     ? defined $defaultTypeURI ? $defaultTypeURI
1009     : <Q::DOMMain:any>
1010     : $self-><M::ManakaiDISElement.qnameToURI> ($typeq, %opt);
1011     }__;
1012 wakaba 1.3 $forURI = defined $defaultForURI ? $defaultForURI
1013     : <Q::ManakaiDOM:all>;
1014 wakaba 1.1 }
1015     __DEEP{
1016 wakaba 1.3 $r = $self-><AG::ManakaiDISNode.ownerDISDocument>
1017     -><AG::swcfg21:SWCFGDocument::swcfg21:ForLatest
1018     .implementation>
1019     -><M::ManakaiDISImplementation.tfurisToURI>
1020 wakaba 1.1 ($typeURI, $forURI);
1021     }__;
1022 wakaba 1.2
1023     @Method:
1024     @@Name: disGetAttribute
1025     @@enDesc:
1026     Gets an attribute node.
1027     @@Param:
1028     @@@Name: attrName
1029     @@@Type: AnyURI
1030     @@@enDesc:
1031     The name expanded URI of the node to retrieve.
1032     @@ForParam:
1033     @@ForpParam:
1034     @@MediaTypeParam:
1035     @@MediaTypeDefaultParam:
1036     @@Return:
1037     @@@Type: ManakaiDISElement
1038     @@@enDesc:
1039     The attribute (property) element node.
1040     @@@nullCase:
1041     @@@@enDesc:
1042     No attribute node found.
1043     @@@PerlDef:
1044     for my $c (@{$self->{src}-><AG::ManakaiDISElement.disChildElements>}) {
1045 wakaba 1.3 if ($c-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
1046     .expandedURI> eq $attrName and
1047 wakaba 1.2 $c-><AG::ManakaiDISElement.forMatch> ($forArg, $forpArg) and
1048     $c-><AG::ManakaiDISElement.mediaTypeMatch>
1049 wakaba 1.3 ($mediaType, $defaultMediaType)) {
1050 wakaba 1.2 $r = $c;
1051     last;
1052     }
1053     }
1054    
1055     @Method:
1056     @@Name: disGetAttributeList
1057     @@enDesc:
1058     Gets attribute nodes.
1059 wakaba 1.3 @@Param:
1060     @@@Name: attrName
1061     @@@Type: AnyURI
1062     @@@enDesc:
1063     The name expanded URI of the node to retrieve.
1064 wakaba 1.2 @@ForParam:
1065     @@ForpParam:
1066     @@MediaTypeParam:
1067     @@MediaTypeDefaultParam:
1068     @@Return:
1069     @@@Type: ManakaiDISElementList
1070     @@@enDesc:
1071     The attribute (property) element nodes.
1072     @@@PerlDef:
1073     $r = bless [], <ClassName::ManakaiDISElementList>;
1074     for my $c (@{$self->{src}-><AG::ManakaiDISElement.disChildElements>}) {
1075 wakaba 1.3 if ($c-><AG::swcfg21:SWCFGElement::swcfg21:ForLatest
1076     .expandedURI> eq $attrName and
1077 wakaba 1.2 $c-><AG::ManakaiDISElement.forMatch> ($forArg, $forpArg) and
1078     $c-><AG::ManakaiDISElement.mediaTypeMatch>
1079 wakaba 1.3 ($mediaType, $defaultMediaType)) {
1080 wakaba 1.2 push @$r, $c;
1081     }
1082     }
1083    
1084     @Attr:
1085     @@Name: disChildElements
1086     @@Type: ManakaiDISElementList
1087     @@enDesc:
1088     A list of child elements.
1089     @@Get:
1090     @@@enDesc:
1091     The current snapshot of child nodes.
1092     @@@PerlDef:
1093 wakaba 1.3 $r = bless [@{$self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest
1094     .childNodes>}],
1095 wakaba 1.2 <ClassName::ManakaiDISElementList>;
1096    
1097     @Attr:
1098     @@Name: qnameValueURI
1099     @@enDesc:
1100     The element value (written as <TYPE::dis:TypeQName>), as URI reference.
1101     \
1102     {NOTE:: What should be if list value?
1103     \
1104     }
1105     @@Get:
1106     @@@Type:AnyURI
1107     @@@nullCase:
1108     @@@@enDesc:
1109     No value.
1110     @@@UndeclaredPrefixException:
1111 wakaba 1.3 @@@PerlDef:
1112     my $v = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest.value>;
1113 wakaba 1.2 if (defined $v and not ref $v eq 'ARRAY') {
1114     __DEEP{
1115     $r = $self-><AG::ManakaiDISElement.qnameToURI> ($v);
1116     }__;
1117     } else {
1118     $r = null;
1119     }
1120    
1121     @Attr:
1122 wakaba 1.3 @@Name: tfqnamesValueURI
1123 wakaba 1.2 @@enDesc:
1124 wakaba 1.3 The element value (written as <TYPE::dis:TFQNames>),
1125 wakaba 1.2 as URI reference.
1126     \
1127     {NOTE:: What should be if list value?
1128     \
1129     }
1130     @@Get:
1131     @@@Type:ResourceURI
1132     @@@nullCase:
1133     @@@@enDesc:
1134     No value.
1135     @@@UndeclaredPrefixException:
1136 wakaba 1.3 @@@PerlDef:
1137     my $v = $self-><AG::swcfg21:SWCFGNode::swcfg21:ForLatest.value>;
1138 wakaba 1.2 if (defined $v and not ref $v eq 'ARRAY') {
1139     __DEEP{
1140 wakaba 1.3 $r = $self-><AG::ManakaiDISElement.tfqnamesToURI> ($v);
1141 wakaba 1.2 }__;
1142     } else {
1143     $r = null;
1144     }
1145 wakaba 1.1 ##DISElement
1146    
1147     ClsDef:
1148 wakaba 1.2 @ClsQName: ManakaiDISElementList
1149     @enDesc:
1150     @@lang:en
1151     @@@:
1152     Lists of elements.
1153     \
1154     {NOTE:: <Class::ManakaiDISElementList> is <QUOTE::dead>;
1155     later changes to the tree does not affect this type of objects.
1156     \
1157     }
1158     ##DISElementList
1159    
1160     ClsDef:
1161 wakaba 1.1 @ClsQName: ManakaiDISComment
1162     @ClsISA:
1163 wakaba 1.3 swcfg21:ManakaiSWCFGComment::swcfg21:ForLatest
1164 wakaba 1.1 @ClsISA: ManakaiDISNode
1165     @Description:
1166     @@lang:en
1167     @@@:
1168     <QUOTE::dis> comment node objects.
1169     ##DISComment
1170    
1171     ClsDef:
1172     @ClsQName: ManakaiDISDocumentFragment
1173     @ClsISA:
1174 wakaba 1.3 swcfg21:ManakaiSWCFGDocumentFragment::swcfg21:ForLatest
1175 wakaba 1.1 @ClsISA: ManakaiDISNode
1176     @Description:
1177     @@lang:en
1178     @@@:
1179     <QUOTE::dis> document fragment node objects.
1180     ##DISDocumentFragment
1181    
1182     ClsDef:
1183     @ClsQName: ManakaiDISDocument
1184     @ClsISA:
1185 wakaba 1.3 swcfg21:ManakaiSWCFGDocument::swcfg21:ForLatest
1186 wakaba 1.1 @ClsISA: ManakaiDISNode
1187     @Description:
1188     @@lang:en
1189     @@@:
1190     <QUOTE::dis> document node objects.
1191 wakaba 1.2
1192     @Attr:
1193     @@Name: disDatabase
1194     @@enDesc:
1195     Associated <QUOTE::dis> database.
1196    
1197     @@Type: ManakaiDISDatabase
1198     @@Get:
1199     @@@NoDBException:
1200     @@@PerlDef:
1201     if ($self->{<Q::TreeCore:node>}->{<Q::db>}) {
1202     $self = $self->{<Q::TreeCore:node>}->{<Q::db>};
1203     } else {
1204     __EXCEPTION{NO_ASSOCIATED_DB_ERR}__;
1205     }
1206     @@Set:
1207     @@@PerlDef:
1208     $self->{<Q::TreeCore:node>}->{<Q::db>} = $given;
1209     require Scalar::Util;
1210     Scalar::Util::weaken ($self->{<Q::TreeCore:node>}->{<Q::db>});
1211 wakaba 1.1 ##DISDocument
1212 wakaba 1.2
1213     PropDef:
1214     @QName: db
1215     @enDesc:
1216     Associated <QUOTE::dis> database.
1217     @rdfs:domain: ManakaiDISDocument
1218     @rdfs:range: ManakaiDISDatabase
1219    
1220     ## -- Definition object database
1221    
1222     ClsDef:
1223     @ClsQName: ManakaiDISDatabase
1224     @enDesc:
1225     Resource database created from <QUOTE::dis> source data.
1226    
1227     @Method:
1228     @@Name: getModule
1229     @@Description:
1230     @@@lang:en
1231     @@@@:
1232     Returns a <QUOTE::dis> module definition.
1233     @@Param:
1234     @@@Name: modURI
1235     @@@Type: ModuleURI
1236     @@@Description:
1237     @@@@lang:en
1238     @@@@@:
1239     A <QUOTE::dis> module URI reference.
1240     @@Return:
1241     @@@Type: ManakaiDISModuleDefinition
1242     @@@Description:
1243     @@@@lang:en
1244     @@@@@:
1245     The module definition.
1246     @@@PerlDef:
1247     if (defined $self->{modDef}->{$modURI}) {
1248     $r = $self->{modDef}->{$modURI};
1249     } else {
1250     $r = $self->{modDef}->{$modURI}
1251     = bless {
1252     uri => $modURI,
1253     db => $self,
1254     for => <Q::ManakaiDOM:all>,
1255     forp => [],
1256     }, <ClassName::ManakaiDISModuleDefinition>;
1257     require Scalar::Util;
1258     Scalar::Util::weaken ($r->{db});
1259     }
1260    
1261     @Method:
1262     @@Name: getFor
1263     @@Description:
1264     @@@lang:en
1265     @@@@:
1266     Returns a <QUOTE::for> definition object.
1267     @@Param:
1268     @@@Name: forURI
1269     @@@Type: ForURI
1270     @@@Description:
1271     @@@@lang:en
1272     @@@@@:
1273     A <QUOTE::for> URI reference.
1274     @@@InCase:
1275     @@@@Value:
1276     @@@@@is-null:1
1277     @@@@Description:
1278     @@@@@lang:en
1279     @@@@@@:
1280     Defaulted to <Q::ManakaiDOM:all>.
1281     @@Return:
1282     @@@Type: ManakaiDISForDefinition
1283     @@@PerlDef:
1284     $forURI = <Q::ManakaiDOM:all> unless defined $forURI;
1285     if (defined $self->{forDef}->{$forURI}) {
1286     $r = $self->{forDef}->{$forURI};
1287     } else {
1288     $r = $self->{forDef}->{$forURI}
1289     = bless {
1290     uri => $forURI,
1291     isa => {<Q::ManakaiDOM:all> => true},
1292     revISA => {},
1293     db => $self,
1294     }, <ClassName::ManakaiDISForDefinition>;
1295     $self->{forDef}->{<Q::ManakaiDOM:all>}->{revISA}->{$forURI} = true;
1296     require Scalar::Util;
1297     Scalar::Util::weaken ($r->{db});
1298     }
1299    
1300     @Method:
1301     @@Name: getResource
1302     @@Description:
1303     @@@lang:en
1304     @@@@:
1305     Returns a <QUOTE::dis> resource definition.
1306     @@Param:
1307     @@@Name: resURI
1308     @@@Type: ResourceURI
1309     @@@Description:
1310     @@@@lang:en
1311     @@@@@:
1312     A <QUOTE::dis> resource URI reference.
1313 wakaba 1.3 @@@nullCase:
1314 wakaba 1.2 @@@@Description:
1315     @@@@@lang:en
1316     @@@@@@:
1317     Defaulted to <Q::DOMMain:any>.
1318     @@Return:
1319     @@@Type: ManakaiDISResourceDefinition
1320     @@@Description:
1321     @@@@lang:en
1322     @@@@@:
1323     The resource definition.
1324     @@@PerlDef:
1325     $resURI = <Q::DOMMain:any> unless defined $resURI;
1326     if (defined $self->{resDef}->{$resURI}) {
1327     $r = $self->{resDef}->{$resURI};
1328     } else {
1329     $r = $self->{resDef}->{$resURI}
1330     = bless {
1331     uri => $resURI,
1332     subOf => {},
1333     supOf => {},
1334     db => $self,
1335     for => <Q::ManakaiDOM:all>,
1336     forp => [],
1337     }, <ClassName::ManakaiDISResourceDefinition>;
1338     require Scalar::Util;
1339     Scalar::Util::weaken ($r->{db});
1340     }
1341 wakaba 1.3
1342     @Method:
1343     @@Name: getSourceFile
1344     @@enDesc:
1345     Gets <QUOTE::dis> source document.
1346     @@Param:
1347     @@@Name: fileName
1348     @@@Type: FileURI
1349     @@@enDesc:
1350     A URI reference identifying a file.
1351     @@Return:
1352     @@@Type: ManakaiDISDocument
1353     @@@enDesc:
1354     The <QUOTE::dis> source document.
1355     @@@nullCase:
1356     @@@@enDesc:
1357     No document associated with that <P::fileName>.
1358     @@@PerlDef:
1359     $r = $self->{<Q::sourceFile>}->{$fileName};
1360     @Method:
1361     @@Name: setSourceFile
1362     @@enDesc:
1363     Puts <QUOTE::dis> source document object.
1364     @@Param:
1365     @@@Name: fileName
1366     @@@Type: FileURI
1367     @@@enDesc:
1368     A URI reference identifying a file. If there is alredy a
1369     source document, then the association has been updated.
1370     @@Param:
1371     @@@Name: doc
1372     @@@Type: ManakaiDISDocument
1373     @@@enDesc:
1374     The document object to set.
1375     @@Return:
1376     @@@PerlDef:
1377     $self->{<Q::sourceFile>}->{$fileName} = $doc;
1378 wakaba 1.2 ##DISDatabase
1379    
1380 wakaba 1.3 PropDef:
1381     @QName: sourceFile
1382     @enDesc:
1383     Source <QUOTE::dis> documents.
1384     @rdfs:domain: ManakaiDISDatabase
1385     @rdfs:range: ManakaiDISDocument
1386    
1387 wakaba 1.2 ClsDef:
1388     @ClsQName: ManakaiDISModuleDefinition
1389     @enDesc:
1390     <QUOTE::dis> module definitions.
1391     @ClsISA: ManakaiDISPropertyAccessor
1392    
1393     @Attr:
1394     @@Name: uri
1395     @@Type: ModuleURI
1396     @@Description:
1397     @@@lang:en
1398     @@@@:
1399     The URI reference of this <QUOTE::dis> module.
1400     @@Get:
1401     @@@PerlDef:
1402     $r = $self->{uri};
1403    
1404     @Attr:
1405     @@Name: nameURI
1406     @@Type: NameURI
1407     @@enDesc:
1408     The URI reference of this module, without
1409     <QUOTE::for> identifier.
1410     @@Get:
1411 wakaba 1.3 @@@PerlDef:
1412 wakaba 1.2 $r = $self->{uri};
1413    
1414     @Attr:
1415     @@Name: localName
1416     @@enDesc:
1417     The local name of this module.
1418     @@Type:
1419 wakaba 1.3 DISCore:LocalName::ManakaiDOM:all
1420 wakaba 1.2 @@Get:
1421     @@@PerlDef:
1422     $r = $self->{localName};
1423    
1424     @Attr:
1425     @@Name: namespaceURI
1426     @@Type: AnyURI
1427     @@enDesc:
1428     The namespace URI of the name of this resource.
1429     @@Get:
1430     @@@PerlDef:
1431     $r = $self->{namespaceURI};
1432    
1433     @Attr:
1434     @@Name: forURI
1435     @@Type: ForURI
1436     @@enDesc:
1437     The <QUOTE::for> URI reference for which this module is defined.
1438     @@Get:
1439     @@@PerlDef:
1440     $r = $self->{for};
1441    
1442     @Attr:
1443     @@Name: isDefined
1444     @@Description:
1445     @@@lang:en
1446     @@@@:
1447     Whether this module is defined or not.
1448     @@Type:
1449     DOMMain:boolean
1450     @@Get:
1451     @@@PerlDef:
1452     $r = $self->{<Q::isDefined>};
1453    
1454     ## TODO: exception handler
1455     ##DISModuleDefinition
1456    
1457     ClsDef:
1458     @ClsQName: ManakaiDISForDefinition
1459     @Description:
1460     @@lang:en
1461     @@@:
1462     <QUOTE::dis> <QUOTE::for> definitions.
1463    
1464     @Attr:
1465     @@Name: uri
1466     @@Type: ForURI
1467     @@Description:
1468     @@@lang:en
1469     @@@@:
1470     The URI reference of this <QUOTE::for>.
1471     @@Get:
1472     @@@PerlDef:
1473     $r = $self->{uri};
1474    
1475     @Method:
1476     @@Name: isaURI
1477     @@Description:
1478     @@@lang:en
1479     @@@@:
1480     Whether this <QUOTE::for> is-a another <QUOTE::for> or not.
1481     @@Param:
1482     @@@Name: superURI
1483     @@@Type: ForURI
1484     @@@Description:
1485     @@@@lang:en
1486     @@@@@:
1487     Another <QUOTE::for> URI reference to test.
1488     @@Return:
1489     @@@Type:
1490     DOMMain:boolean
1491     @@@TrueCase:
1492     @@@@enDesc:
1493     <P::superURI> is a super-<QUOTE::for> of this <QUOTE::for>.
1494     @@@FalseCase:
1495     @@@@enDesc:
1496     <P::superURI> is not a super-<QUOTE::for> of this <QUOTE::for>.
1497     @@@PerlDef:
1498     $r = $self->{uri} eq $superURI ? true : $self->{isa}->{$superURI};
1499    
1500     @Attr:
1501     @@Name: isDefined
1502     @@Description:
1503     @@@lang:en
1504     @@@@:
1505     Whether this <QUOTE::for> is already defined or not.
1506     @@Type:
1507     DOMMain:boolean
1508     @@Get:
1509     @@@TrueCase:
1510     This <QUOTE::for> is already defined.
1511     @@@FalseCase:
1512     This <QUOTE::for> is not defined.
1513     @@@PerlDef:
1514     $r = $self->{<Q::isDefined>};
1515    
1516     @Attr:
1517     @@Name: isReferred
1518     @@Description:
1519     @@@lang:en
1520     @@@@:
1521     Whether this <QUOTE::for> is referred somewhere or not.
1522     @@Type:
1523     DOMMain:any
1524     @@Get:
1525     @@@InCase:
1526     @@@@Type:ManakaiDISElement
1527     @@@@enDesc:
1528     This <QUOTE::for> is referred by the element.
1529     @@@nullCase:
1530     This <QUOTE::for> is not referred.
1531     @@@PerlDef:
1532     $r = $self->{<Q::isReferred>};
1533     @@Set:
1534     @@@InCase:
1535     @@@@Type:ManakaiDISElement
1536     @@@@enDesc:
1537     This <QUOTE::for> is referred by the element.
1538     @@@PerlDef:
1539     $self->{<Q::isReferred>} = true if $given;
1540    
1541     @Attr:
1542     @@Name: definingModule
1543     @@Description:
1544     @@@lang:en
1545     @@@@:
1546     The <QUOTE::dis> module in which this <QUOTE::for> is defined.
1547     @@Type: ManakaiDISModuleDefinition
1548     @@Get:
1549     @@@Description:
1550     @@@@lang:en
1551     @@@@@:
1552     The module object.
1553 wakaba 1.3 @@@nullCase:
1554 wakaba 1.2 @@@@Description:
1555     @@@@@lang:en
1556     @@@@@@:
1557     This <QUOTE::for> is not associated to any module.
1558     @@@PerlDef:
1559     $r = $self->{db}
1560     -><M::ManakaiDISDatabase.getResource>
1561     ($self->{<Q::definingModule>})
1562     if defined $self->{<Q::definingModule>};
1563    
1564     @Method:
1565     @@Name: readDefinition
1566     @@enDesc:
1567     Reads <QUOTE::for> definition and sets attributes.
1568     @@Param:
1569     @@@Name: forDefElement
1570     @@@Type: ManakaiDISElement
1571     @@@Description:
1572     @@@@lang:en
1573     @@@@@:
1574     A <CODE::ForDef> element containing definition of this <QUOTE::for>.
1575     @@Return:
1576     @@@RaiseException:
1577     @@@@@:FOR_ALREADY_DEFINED_ERR
1578     @@@@Description:
1579     @@@@@lang:en
1580     @@@@@@:
1581     The <QUOTE::for> definition for this <QUOTE::for> is already read.
1582     @@@PerlDef:
1583     if ($self->{<Q::isDefined>}) {
1584 wakaba 1.3 # __EXCEPTION{FOR_ALREADY_DEFINED_ERR}__;
1585 wakaba 1.2 }
1586     ## TODO:
1587     $self->{<Q::isDefined>} = true;
1588    
1589     ## TODO: exception handler
1590     ##DISForDefinition
1591    
1592     ClsDef:
1593     @ClsQName: ManakaiDISResourceDefinition
1594     @enDesc:
1595     <QUOTE::dis> resource definitions.
1596     @ClsISA: ManakaiDISPropertyAccessor
1597    
1598     @Attr:
1599     @@Name: uri
1600     @@Type: ResourceURI
1601     @@Description:
1602     @@@lang:en
1603     @@@@:
1604     The URI reference of this <QUOTE::dis> resource.
1605     @@Get:
1606     @@@PerlDef:
1607     $r = $self->{uri};
1608    
1609     @Attr:
1610     @@Name: nameURI
1611     @@Type: NameURI
1612     @@enDesc:
1613     The URI reference of this <QUOTE::dis> resource, without
1614     <QUOTE::for> identifier.
1615     @@Get:
1616     @@@nullCase:
1617     @@@@enDesc:
1618     This resource does not have its name URI reference.
1619 wakaba 1.3 @@@PerlDef:
1620 wakaba 1.2 $r = $self->{uri};
1621    
1622     @Attr:
1623     @@Name: localName
1624     @@enDesc:
1625     The local name of this resource.
1626     @@Type:
1627 wakaba 1.3 DISCore:LocalName::ManakaiDOM:all
1628 wakaba 1.2 @@Get:
1629     @@@nullCase:
1630     @@@@enDesc:
1631     This resource does not have its local name.
1632     @@@PerlDef:
1633     $r = $self->{localName};
1634    
1635     @Attr:
1636     @@Name: namespaceURI
1637     @@Type: AnyURI
1638     @@enDesc:
1639     The namespace URI of the name of this resource.
1640     @@Get:
1641     @@@nullCase:
1642     The name of this resource does not have its namespace
1643     or this resource does not have its name.
1644     @@@PerlDef:
1645     $r = $self->{namespaceURI};
1646    
1647     @Attr:
1648     @@Name: isAnonymous
1649     @@enDesc:
1650     Whether this <QUOTE::dis> resource has name or not.
1651     @@Type:
1652     DOMMain:boolean
1653     @@Get:
1654     @@@TrueCase:
1655     This resource does not have any global unique name.
1656     <A::ManakaiDISResourceDefinition.uri> is a temporary URI reference.
1657     @@@FalseCase:
1658     This resource does have its formal name.
1659     <A::ManakaiDISResourceDefinition.uri> is a URI reference
1660     generated from the name and the <QUOTE::for> URI reference
1661     of this resource.
1662     @@@PerlDef:
1663     $r = $self->{<Q::isAnon>};
1664    
1665     @Attr:
1666     @@Name: forURI
1667     @@enDesc:
1668     The <QUOTE::for> URI reference for which this resource is defined.
1669     @@Type:ForURI
1670     @@Get:
1671     @@@PerlDef:
1672     $r = $self->{for};
1673    
1674     @Attr:
1675     @@Name: forpURI
1676     @@enDesc:
1677     The <QUOTE::for+> URI references for which this resource is defined.
1678     @@Type: ForURIList
1679     @@Get:
1680 wakaba 1.3 @@@PerlDef:
1681 wakaba 1.2 $r = $self->{forp};
1682    
1683     @Method:
1684     @@Name: subsetOfURI
1685     @@Description:
1686     @@@lang:en
1687     @@@@:
1688     Whether this resource is a subset of another resource or not.
1689     @@Param:
1690     @@@Name: superURI
1691     @@@Type: ResourceURI
1692     @@@Description:
1693     @@@@lang:en
1694     @@@@@:
1695     Another resource URI reference to test.
1696     @@Return:
1697     @@@Type:
1698     DOMMain:boolean
1699     @@@TrueCase:
1700     @@@@enDesc:
1701     <P::superURI> is a super-resource of this resource.
1702     @@@FalseCase:
1703     @@@@enDesc:
1704     <P::superURI> is not a super-resource of this resource.
1705     @@@PerlDef:
1706     $r = $superURI eq $self->{uri} ? true : $self->{subOf}->{$superURI};
1707    
1708     @Attr:
1709     @@Name: isDefined
1710     @@Description:
1711     @@@lang:en
1712     @@@@:
1713     Whether this resource is already defined or not.
1714     @@Type:
1715     DOMMain:boolean
1716     @@Get:
1717     @@@TrueCase:
1718     This resource is already defined.
1719     @@@FalseCase:
1720     This resource is not defined.
1721     @@@PerlDef:
1722     $r = $self->{<Q::isDefined>};
1723    
1724     @Attr:
1725     @@Name: isReferred
1726     @@Description:
1727     @@@lang:en
1728     @@@@:
1729     Whether this resource is referred or not.
1730     @@Type:
1731     DOMMain:any
1732     @@Get:
1733     @@@InCase:
1734     @@@@Type:ManakaiDISElement
1735     @@@@enDesc:
1736     This resource is referred by the element.
1737     @@@nullCase:
1738     This resource is not referred.
1739     @@@PerlDef:
1740     $r = $self->{<Q::isReferred>};
1741     @@Set:
1742     @@@InCase:
1743     @@@@Type:ManakaiDISElement
1744     @@@@enDesc:
1745     This resource is referred by this element.
1746     @@@PerlDef:
1747     $self->{<Q::isReferred>} = $given if $given;
1748    
1749     @Attr:
1750     @@Name: definingModule
1751     @@Description:
1752     @@@lang:en
1753     @@@@:
1754     The <QUOTE::dis> module in which this resource is defined.
1755     @@Type: ManakaiDISModuleDefinition
1756     @@Get:
1757     @@@Description:
1758     @@@@lang:en
1759     @@@@@:
1760     The module object.
1761 wakaba 1.3 @@@nullCase:
1762 wakaba 1.2 @@@@Description:
1763     @@@@@lang:en
1764     @@@@@@:
1765     This resource is not associated to any module.
1766     @@@PerlDef:
1767     $r = $self->{db}
1768     -><M::ManakaiDISDatabase.getModule>
1769     ($self->{<Q::definingModule>})
1770     if defined $self->{<Q::definingModule>};
1771     @@Set:
1772     @@@Description:
1773     @@@@lang:en
1774     @@@@@:
1775     The module object to which the <QUOTE::defining module> is set.
1776     @@@PerlDef:
1777     $self->{<Q::defininingModule>}
1778     = $given-><AG::ManakaiDISModuleDefinition.uri>;
1779    
1780    
1781     ## TODO: exception handler
1782     ##DISResourceDefinition
1783    
1784     ClsDef:
1785     @ClsQName: ManakaiDISPropertyAccessor
1786 wakaba 1.3 @enDesc:
1787 wakaba 1.2 Accessor methods for resource or module properties.
1788    
1789     @Method:
1790     @@Name: getPropertyText
1791     @@enDesc:
1792     Gets property value text.
1793     @@PropNameParam:
1794     @@Param:
1795     @@@Name:default
1796     @@@Type:
1797 wakaba 1.3 swcfg21:SWCFGString::swcfg21:ForLatest
1798 wakaba 1.2 @@@enDesc:
1799     The default value that is returned if no explicit property
1800     value specification found for this resource.
1801     @@@nullCase:
1802     @@@@enDesc:
1803     No default value supplied; <DOM::null> is returned if
1804     no value specified.
1805     @@Return:
1806     @@@Type:
1807 wakaba 1.3 swcfg21:SWCFGString::swcfg21:ForLatest
1808 wakaba 1.2 @@@enDesc:
1809     The property value string.
1810     @@@nullCase:
1811     @@@@enDesc:
1812     No value nor default value has specified.
1813     @@@PerlDef:
1814     if (exists $self->{$propName}) {
1815     $r = defined $self->{$propName} ? $self->{$propName} : $default;
1816     } elsif ($self->{src}) {
1817     $r = $self->{src}-><M::ManakaiDISElement.disGetAttribute>
1818     ($propName, for_arg => $self->{for},
1819     forp_arg => $self->{forp});
1820     $self->{$propName} = $r;
1821     $r = $default unless defined $r;
1822     } else {
1823     $r = $default;
1824     }
1825    
1826     @Method:
1827     @@Name: getPropertyResource
1828     @@enDesc:
1829     Gets property value resource.
1830     @@PropNameParam:
1831     @@Return:
1832     @@@Type: ManakaiDISResourceDefinition
1833     @@@enDesc:
1834     The property value resource.
1835     @@@nullCase:
1836     @@@@enDesc:
1837     No value has specified.
1838     @@@PerlDef:
1839     if (defined $self->{$propName}) {
1840     $r = $self->{db}-><M::ManakaiDISDatabase.getResource>
1841     ($self->{$propName});
1842     } else {
1843     $r = null;
1844     }
1845    
1846     @Method:
1847     @@Name: addPropertyResourceList
1848     @@enDesc:
1849     Adds a resource to a resource-list property value.
1850     \
1851     {ISSUE:: Should an exception be thrown if the property is
1852     not of list?
1853     \
1854     }
1855     @@PropNameParam:
1856     @@Param:
1857     @@@Name: res
1858     @@@Type: ManakaiDISResourceDefinition
1859     @@@enDesc:
1860     A resource to add.
1861     @@Return:
1862     @@@PerlDef:
1863     if (ref $self->{$propName} eq 'ARRAY') {
1864     push @{$self->{$propName}}, $res->{uri};
1865     } elsif (not defined $self->{$propName}) {
1866     $self->{$propName} = [$res->{uri}];
1867     }
1868    
1869 wakaba 1.3 ElementTypeBinding:
1870     @Name: PropNameParam
1871     @ElementType:
1872     dis:ResourceDef
1873     @ShadowContent:
1874     @@rdf:type:
1875     DISLang:MethodParameter
1876     @@Name: propName
1877     @@Type: ResourceURI
1878     @@Description:
1879     @@@lang:en
1880     @@@@:
1881     The name of the property.
1882    
1883 wakaba 1.2 ##DISPropertyAccessor
1884    
1885     PropDef:
1886     @QName:isAnon
1887     @Description:
1888     @@lang:en
1889     @@@:
1890     Whether the subject resource is anonymous or not.
1891     @Type:
1892     DOMMain:boolean
1893    
1894     PropDef:
1895     @QName:isDefined
1896     @Description:
1897     @@lang:en
1898     @@@:
1899     Whether the subject resource is defined or not.
1900    
1901     PropDef:
1902 wakaba 1.3 @QName:isReferred
1903 wakaba 1.2 @Description:
1904     @@lang:en
1905     @@@:
1906     Whether the subject resource is referred or not.
1907     @Type:
1908     DOMMain:any
1909    
1910     PropDef:
1911     @QName:definingModule
1912     @Description:
1913     @@lang:en
1914     @@@:
1915     The <QUOTE::dis> module in which the subject resource is defined.
1916     @rdfs:domain:
1917     DISCore:Module
1918 wakaba 1.1
1919     ## -- Datatypes
1920    
1921     URITypeDef:
1922 wakaba 1.3 @QName: AnyURI
1923     @Description:
1924     @@lang:en
1925     @@@:
1926     Any URI references.
1927    
1928     URITypeDef:
1929     @QName: FileURI
1930     @enDesc:
1931     URI references identifying file.
1932    
1933     URITypeDef:
1934 wakaba 1.1 @QName: ForURI
1935     @Description:
1936     @@lang:en
1937     @@@:
1938     <QUOTE::For> URI references.
1939    
1940     DataTypeDef:
1941     @QName: ForURIList
1942     @Description:
1943     @@lang:en
1944     @@@:
1945     References to the array containing <QUOTE::for> URI references.
1946    
1947     URITypeDef:
1948 wakaba 1.3 @QName: ResourceURI
1949     @Description:
1950     @@lang:en
1951     @@@:
1952     A URI reference for a <QUOTE::dis> resource.
1953    
1954     URITypeDef:
1955 wakaba 1.1 @QName: MediaTypeURI
1956     @Description:
1957     @@lang:en
1958     @@@:
1959     Media type URI references.
1960 wakaba 1.3 @rdfs:subClassOf: ResourceURI
1961    
1962     URITypeDef:
1963     @QName: ModuleURI
1964     @enDesc:
1965     URI references for <QUOET::dis> modules.
1966     @rdfs:subClassOf: ResourceURI
1967    
1968     URITypeDef:
1969     @QName: NameURI
1970     @enDesc:
1971     URI references identifying a resource.
1972     @rdfs:subClassOf: ResourceURI
1973    
1974     ElementTypeBinding:
1975     @Name: DataTypeDef
1976     @ElementType:
1977     dis:ResourceDef
1978     @ShadowContent:
1979     @@rdf:type:
1980     ManakaiDOM:DataType
1981    
1982     ElementTypeBinding:
1983     @Name: URITypeDef
1984     @ElementType:
1985     dis:ResourceDef
1986     @ShadowContent:
1987     @@rdf:type:
1988     ManakaiDOM:DataType
1989     @@rdfs:subClassOf: AnyURI
1990 wakaba 1.1
1991     ## -- Exceptions
1992    
1993     XParamDef:
1994     @QName: sourceNode
1995     @Description:
1996     @@lang:en
1997     @@@:
1998     The node from which the string has come.
1999     @Type: DISNode
2000 wakaba 1.3
2001     ExceptionDef:
2002     @ClsQName: ManakaiDISException
2003     @enDesc:
2004     Exceptions for the <QUOTE::dis> operations.
2005     @XConstGroupDef:
2006     @@ClsQName: ManakaiDISExceptionCode
2007     @@enDesc:
2008     Exception codes for <Class::ManakaiDISException>.
2009     @@XConstDef:
2010     @@@Name: NAMESPACE_ERR
2011     @@@Value:14
2012     @@@enDesc:
2013     An error related to namespaces has occurred.
2014     @@@XSubTypeDef:
2015     @@@@QName: UNDECLARED_NS_PREFIX_ERR
2016     @@@@enDesc:
2017     The implementation has encounted an undeclared namespace
2018     prefix.
2019     @@XConstDef:
2020     @@@Name: INVALID_STATE_ERR
2021     @@@Value:11
2022     @@@enDesc:
2023     An attempt is made to use an object that is not (or no longer) usable.
2024     @@@XSubTypeDef:
2025     @@@@QName: NO_ASSOCIATED_DB_ERR
2026     @@@@enDesc:
2027     No <QUOTE::dis> database has been associated with this document.
2028    
2029     ElementTypeBinding:
2030     @Name: ClsDef
2031     @ElementType:
2032     dis:ResourceDef
2033     @ShadowContent:
2034     @@rdf:type:
2035     ManakaiDOM:Class
2036     @@AliasFor:
2037     @@@@:
2038     ::ForLatest
2039     @@@For:
2040     !=ForLatest
2041     @@ForCheck:
2042     ManakaiDOM:Perl
2043     @@DOMMain:implementFeature: CoreFeature10
2044    
2045     ElementTypeBinding:
2046     @Name: ExceptionDef
2047     @ElementType:
2048     dis:ResourceDef
2049     @ShadowContent:
2050     @@rdf:type:
2051     ManakaiDOM:ExceptionClass
2052     @@AliasFor:
2053     @@@@:
2054     ::ForLatest
2055     @@@For:
2056     !=ForLatest
2057     @@ForCheck:
2058     ManakaiDOM:Perl
2059     @@DOMMain:implementFeature: CoreFeature10
2060    
2061     ElementTypeBinding:
2062     @Name: ClsQName
2063     @ElementType:
2064     dis:QName
2065    
2066     ElementTypeBinding:
2067     @Name: ClsISA
2068     @ElementType:
2069     dis:ISA
2070    
2071     ElementTypeBinding:
2072     @Name: Method
2073     @ElementType:
2074     dis:ResourceDef
2075     @ShadowContent:
2076     @@rdf:type:
2077     DISLang:Method
2078    
2079     ElementTypeBinding:
2080     @Name: IntMethod
2081     @ElementType:
2082     dis:ResourceDef
2083     @ShadowContent:
2084     @@rdf:type:
2085     DISLang:Method
2086     @@ManakaiDOM:isForInternal:1
2087    
2088     ElementTypeBinding:
2089     @Name: Attr
2090     @ElementType:
2091     dis:ResourceDef
2092     @ShadowContent:
2093     @@rdf:type:
2094     DISLang:Attribute
2095    
2096     ElementTypeBinding:
2097     @Name: Return
2098     @ElementType:
2099     dis:ResourceDef
2100     @ShadowContent:
2101     @@rdf:type:
2102     DISLang:MethodReturn
2103    
2104     ElementTypeBinding:
2105     @Name: Get
2106     @ElementType:
2107     dis:ResourceDef
2108     @ShadowContent:
2109     @@rdf:type:
2110     DISLang:AttributeGet
2111    
2112     ElementTypeBinding:
2113     @Name: Set
2114     @ElementType:
2115     dis:ResourceDef
2116     @ShadowContent:
2117     @@rdf:type:
2118     DISLang:AttributeSet
2119    
2120     ElementTypeBinding:
2121     @Name: Param
2122     @ElementType:
2123     dis:ResourceDef
2124     @ShadowContent:
2125     @@rdf:type:
2126     DISLang:MethodParameter
2127    
2128     ElementTypeBinding:
2129     @Name: PerlDef
2130     @ElementType:
2131     dis:Def
2132     @ShadowContent:
2133     @@ContentType:
2134     lang:Perl
2135    
2136     ElementTypeBinding:
2137     @Name: disDef
2138     @ElementType:
2139     dis:Def
2140     @ShadowContent:
2141     @@ContentType:
2142     lang:dis
2143    
2144     ElementTypeBinding:
2145     @Name: InCase
2146     @ElementType:
2147     dis:ResourceDef
2148     @ShadowContent:
2149     @@rdf:type:
2150     ManakaiDOM:InCase
2151    
2152     ElementTypeBinding:
2153     @Name: nullCase
2154     @ElementType:
2155     dis:ResourceDef
2156     @ShadowContent:
2157     @@rdf:type:
2158     ManakaiDOM:InCase
2159     @@Value:
2160     @@@is-null:1
2161    
2162     ElementTypeBinding:
2163     @Name: TrueCase
2164     @ElementType:
2165     dis:ResourceDef
2166     @ShadowContent:
2167     @@rdf:type:
2168     ManakaiDOM:InCase
2169     @@Value:true
2170     @@Type:
2171     DOMMain:boolean
2172    
2173    
2174     ElementTypeBinding:
2175     @Name: FalseCase
2176     @ElementType:
2177     dis:ResourceDef
2178     @ShadowContent:
2179     @@rdf:type:
2180     ManakaiDOM:InCase
2181     @@Value:false
2182     @@Type:
2183     DOMMain:boolean
2184    
2185     ElementTypeBinding:
2186     @Name: enDesc
2187     @ElementType:
2188     dis:Description
2189     @ShadowContent:
2190     @@lang:en
2191    
2192     ElementTypeBinding:
2193     @Name: PropDef
2194     @ElementType:
2195     dis:ResourceDef
2196     @ShadowContent:
2197     @@rdf:type:
2198     rdf:Property
2199     @@AliasFor:
2200     @@@@:
2201     ::ManakaiDOM:all
2202     @@@For:
2203     !=ManakaiDOM:all
2204    
2205     ElementTypeBinding:
2206     @Name: MethodRedef
2207     @ElementType:
2208     dis:ResourceDef
2209     @ShadowContent:
2210     @@rdf:type:
2211     DISLang:Method
2212     @@ManakaiDOM:isRedefining:1
2213    
2214     ElementTypeBinding:
2215     @Name: NamedParam
2216     @ElementType:
2217     dis:ResourceDef
2218     @ShadowContent:
2219     @@rdf:type:
2220     DISLang:MethodParameter
2221     @@DISPerl:isNamedParameter:1
2222    
2223     ElementTypeBinding:
2224     @Name: NodeParam
2225     @ElementType:
2226     dis:ResourceDef
2227     @ShadowContent:
2228     @@rdf:type:
2229     DISLang:MethodParameter
2230     @@DISPerl:isNamedParameter:1
2231     @@Name: node
2232     @@Type: ManakaiDISNode
2233     @@Description:
2234     @@@lang:en
2235     @@@@:
2236     The node in which the name has occurred. It is intended
2237     to be reported when an exception had been raised.
2238     @@ResourceDef:
2239     @@@rdf:type:
2240     ManakaiDOM:InCase
2241     @@@Value:
2242     @@@@is-null:1
2243     @@@Description:
2244     @@@@lang:en
2245     @@@@@:
2246     The source of the name is not a node.
2247    
2248     ElementTypeBinding:
2249     @Name: ForParam
2250     @ElementType:
2251     dis:ResourceDef
2252     @ShadowContent:
2253     @@rdf:type:
2254     DISLang:MethodParameter
2255     @@DISPerl:isNamedParameter:1
2256     @@Name: forArg
2257     @@Type: ForURI
2258     @@Description:
2259     @@@lang:en
2260     @@@@:
2261     The <QUOTE::for> URI reference.
2262     @@ResourceDef:
2263     @@@rdf:type:
2264     ManakaiDOM:InCase
2265     @@@Value:
2266     @@@@is-null:1
2267     @@@Description:
2268     @@@@lang:en
2269     @@@@@:
2270     Equivalent to <Q::ManakaiDOM:all>, i.e. <QUOTE::for all>.
2271    
2272     ElementTypeBinding:
2273     @Name: ForpParam
2274     @ElementType:
2275     dis:ResourceDef
2276     @ShadowContent:
2277     @@rdf:type:
2278     DISLang:MethodParameter
2279     @@DISPerl:isNamedParameter:1
2280     @@Name: forpArg
2281     @@Type: ForURIList
2282     @@Description:
2283     @@@lang:en
2284     @@@@:
2285     An array reference containing additional <QUOTE::for>
2286     constraints (<QUOTE::For+> list).
2287     @@ResourceDef:
2288     @@@rdf:type:
2289     ManakaiDOM:InCase
2290     @@@Value:
2291     @@@@is-null:1
2292     @@@Description:
2293     @@@@lang:en
2294     @@@@@:
2295     Equivalent to the empty array reference.
2296    
2297     ElementTypeBinding:
2298     @Name: MediaTypeParam
2299     @ElementType:
2300     dis:ResourceDef
2301     @ShadowContent:
2302     @@rdf:type:
2303     DISLang:MethodParameter
2304     @@DISPerl:isNamedParameter:1
2305     @@Name: mediaType
2306     @@Type: MediaTypeURI
2307     @@Description:
2308     @@@lang:en
2309     @@@@:
2310     The URI reference identifying a media type.
2311     @@ResourceDef:
2312     @@@rdf:type:
2313     ManakaiDOM:InCase
2314     @@@Value:
2315     @@@@is-null:1
2316     @@@Description:
2317     @@@@lang:en
2318     @@@@@:
2319     No media type specified.
2320    
2321     ElementTypeBinding:
2322     @Name: MediaTypeDefaultParam
2323     @ElementType:
2324     dis:ResourceDef
2325     @ShadowContent:
2326     @@rdf:type:
2327     DISLang:MethodParameter
2328     @@DISPerl:isNamedParameter:1
2329     @@Name: defaultMediaType
2330     @@Type: MediaTypeURI
2331     @@Description:
2332     @@@lang:en
2333     @@@@:
2334     The default media type, i.e. the type used when no explicit
2335     specification is not found in the source tree.
2336     @@ResourceDef:
2337     @@@rdf:type:
2338     ManakaiDOM:InCase
2339     @@@Value:
2340     @@@@is-null:1
2341     @@@Description:
2342     @@@@lang:en
2343     @@@@@:
2344     Defaulted to <Q::DOMMain:any>.
2345    
2346     ElementTypeBinding:
2347     @Name: RaiseException
2348     @ElementType:
2349     ManakaiDOM:raises
2350    
2351     ElementTypeBinding:
2352     @Name: UndeclaredPrefixException
2353     @ElementType:
2354     ManakaiDOM:raises
2355     @ShadowContent:
2356     @@@: UNDECLARED_NS_PREFIX_ERR
2357     @@Description:
2358     @@@lang:en
2359     @@@@:
2360     The implementation has encounted an undeclared namespace prefix.
2361    
2362     ElementTypeBinding:
2363     @Name: NoDBException
2364     @ElementType:
2365     ManakaiDOM:raises
2366     @ShadowContent:
2367     @@@: NO_DB_ASSOCIATED_ERR
2368     @@Description:
2369     @@@lang:en
2370     @@@@:
2371     No <QUOTE::dis> database is associated to this document.
2372    
2373     ElementTypeBinding:
2374     @Name: XConstGroupDef
2375     @ElementType:
2376     dis:ResourceDef
2377     @ShadowContent:
2378     @@rdf:type:
2379     ManakaiDOM:ConstGroup
2380     @@Type:
2381     DOMMain:unsigned-short::ManakaiDOM:all
2382     @@rdfs:subClassOf:
2383     DOMMain:unsigned-short::ManakaiDOM:all
2384    
2385     ElementTypeBinding:
2386     @Name: XConstDef
2387     @ElementType:
2388     dis:ResourceDef
2389     @ShadowContent:
2390     @@rdf:type:
2391     ManakaiDOM:Const
2392    
2393     ElementTypeBinding:
2394     @Name: XSubTypeDef
2395     @ElementType:
2396     dis:ResourceDef
2397     @ShadowContent:
2398     @@rdf:type:
2399     ManakaiDOM:ExceptionOrWarningSubType
2400    
2401     ElementTypeBinding:
2402     @Name: XParam
2403     @ElementType:
2404     ManakaiDOM:exceptionOrWarningParameter
2405    
2406     ElementTypeBinding:
2407     @Name: XParamDef
2408     @ElementType:
2409     dis:ResourceDef
2410     @ShadowContent:
2411     @@rdf:type:
2412     DOMMain:XWParameter
2413     @@AliasFor:
2414     @@@For:
2415     !=ManakaiDOM:all
2416     @@@@:
2417     ::ManakaiDOM:all
2418    
2419     ElementTypeBinding:
2420     @Name: enMufDef
2421     @ElementType:
2422     dis:Def
2423     @ShadowContent:
2424     @@ContentType:
2425     lang:muf
2426     @@lang:en
2427    

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24