diff Lib/IMPL/DOM/Schema/ValidationError.pm @ 19:1ca530e5c9c5

DOM схема, требует переработки в части схемы для описания схем. Автоверификация не проходит
author Sergey
date Fri, 11 Sep 2009 16:30:39 +0400
parents
children 7f00786f8210
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/IMPL/DOM/Schema/ValidationError.pm	Fri Sep 11 16:30:39 2009 +0400
@@ -0,0 +1,26 @@
+package IMPL::DOM::Schema::VaidationError;
+use strict;
+use warnings;
+
+use base qw(IMPL::Object);
+use IMPL::Class::Property;
+use IMPL::Class::Property::Direct;
+use IMPL::Resources::Format qw(FormatMessage);
+
+BEGIN {
+    public _direct property Node => prop_get;
+    public _direct property Schema => prop_get;
+    public _direct property Source => prop_get;
+    public _direct property Message => prop_get;
+}
+
+sub CTOR {
+    my ($this,%args) = @_;
+    
+    $this->{$Node} = $args{Node} or die new IMPL::InvalidArgumentException("Node is a required parameter");
+    $this->{$Schema} = $args{Schema} if $args{Schema};
+    $this->{$Source} = $args{Source} if $args{Source};
+    $this->{$Message} = FormatMessage(delete $args{Message}, \%args) if $args{Message};
+}
+
+1;