view Lib/IMPL/DOM/Schema/ValidationError.pm @ 102:cf3b6ef2be22

Schema beta version
author wizard
date Fri, 07 May 2010 08:05:23 +0400
parents df6b4f054957
children 196bf443b5e1
line wrap: on
line source

package IMPL::DOM::Schema::ValidationError;
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 Parent => prop_get;
    public _direct property Message => prop_get;
}

sub CTOR {
    my ($this,%args) = @_;
    
    $this->{$Node} = $args{Node};
    $this->{$Schema} = $args{Schema} if $args{Schema};
    $this->{$Source} = $args{Source} if $args{Source};
    $this->{$Parent} = $args{Parent} if $args{Parent};
    $this->{$Message} = FormatMessage(delete $args{Message}, \%args) if $args{Message};
}

1;