+- (NSArray *) attributeKeys {
+ return [[self class] _attributeKeys];
+}
+
++ (BOOL) isKeyExcludedFromWebScript:(const char *)name {
+ return ![[self _attributeKeys] containsObject:[NSString stringWithUTF8String:name]] && [super isKeyExcludedFromWebScript:name];
+}
+
+- (id) initWithMessage:(NSString *)message ofType:(NSString *)type {
+ if ((self = [super init]) != nil) {
+ message_ = message;
+ type_ = type;
+ } return self;
+}
+
+- (NSString *) message {
+ return message_;
+}
+
+- (NSString *) type {
+ return type_;
+}
+
+- (NSArray *) item {
+ return (id) item_ ?: [NSNull null];
+}
+
+- (void) setItem:(NSArray *)item {
+ item_ = item;
+}
+
+- (NSString *) package {
+ return (id) package_ ?: [NSNull null];
+}
+
+- (void) setPackage:(NSString *)package {
+ package_ = package;
+}
+
+- (NSString *) url {
+ return (id) url_ ?: [NSNull null];
+}
+
+- (void) setURL:(NSString *)url {
+ url_ = url;
+}
+
+- (void) setVersion:(NSString *)version {
+ version_ = version;
+}
+
+- (NSString *) version {
+ return (id) version_ ?: [NSNull null];
+}
+
+- (NSString *) compound:(NSString *)value {
+ if (value != nil) {
+ NSString *mode(nil); {
+ NSString *type([self type]);
+ if ([type isEqualToString:@"ERROR"])
+ mode = UCLocalize("ERROR");
+ else if ([type isEqualToString:@"WARNING"])
+ mode = UCLocalize("WARNING");
+ }
+
+ if (mode != nil)
+ value = [NSString stringWithFormat:UCLocalize("COLON_DELIMITED"), mode, value];
+ }
+
+ return value;
+}
+
+- (NSString *) compoundMessage {
+ return [self compound:[self message]];
+}
+
+- (NSString *) compoundTitle {
+ NSString *title;
+
+ if (package_ == nil)
+ title = nil;
+ else if (Package *package = [[Database sharedInstance] packageWithName:package_])
+ title = [package name];
+ else
+ title = package_;
+
+ return [self compound:title];