Mercurial > pub > Impl
view Lib/IMPL/DOM/Navigator/Builder.pm @ 13:bb8d67f811ea
merge heads
author | Sergey |
---|---|
date | Wed, 02 Sep 2009 23:11:14 +0400 |
parents | 955b2324c1bf 75980091813b |
children | 65a7bb156fb7 |
line wrap: on
line source
package IMPL::DOM::Navigator::Builder; use strict; use warnings; use base qw(IMPL::DOM::Navigator); use IMPL::Class::Property; use IMPL::Class::Property::Direct; BEGIN { protected _direct property _navigatorSchema => prop_all; public _direct property Document => prop_get | owner_set; } __PACKAGE__->PassThroughArgs; sub CTOR { my ($this,$domDocument,$schema) = @_; $this->{$Document} = $domDocument; $this->{$_navigatorSchema} = new IMPL::DOM::Navigator($schema); } sub NavigateCreate { my ($this,$nodeName,%props) = @_; if ( my $nodeSchema = $this->{$_navigatorSchema}->Navigate($nodeName) ) { } else { die new IMPL::InvalidOperationException("Requested elemnt not found in the schema"); } } 1;