01: /*
02: * The contents of this file are subject to the terms
03: * of the Common Development and Distribution License
04: * (the "License"). You may not use this file except
05: * in compliance with the License.
06: *
07: * You can obtain a copy of the license at
08: * https://jwsdp.dev.java.net/CDDLv1.0.html
09: * See the License for the specific language governing
10: * permissions and limitations under the License.
11: *
12: * When distributing Covered Code, include this CDDL
13: * HEADER in each file and include the License file at
14: * https://jwsdp.dev.java.net/CDDLv1.0.html If applicable,
15: * add the following below this CDDL HEADER, with the
16: * fields enclosed by brackets "[]" replaced with your
17: * own identifying information: Portions Copyright [yyyy]
18: * [name of copyright owner]
19: */
20: package com.sun.xml.xsom.impl.parser;
21:
22: import java.text.MessageFormat;
23: import java.util.ResourceBundle;
24:
25: /**
26: * Formats error messages.
27: */
28: public class Messages {
29: /** Loads a string resource and formats it with specified arguments. */
30: public static String format(String property, Object... args) {
31: String text = ResourceBundle
32: .getBundle(Messages.class.getName())
33: .getString(property);
34: return MessageFormat.format(text, args);
35: }
36:
37: //
38: //
39: // Message resources
40: //
41: //
42: public static final String ERR_UNDEFINED_SIMPLETYPE = "UndefinedSimpleType"; // arg:1
43: public static final String ERR_UNDEFINED_COMPLEXTYPE = "UndefinedCompplexType"; // arg:1
44: public static final String ERR_UNDEFINED_TYPE = "UndefinedType"; // arg:1
45: public static final String ERR_UNDEFINED_ELEMENT = "UndefinedElement"; // arg:1
46: public static final String ERR_UNDEFINED_MODELGROUP = "UndefinedModelGroup"; // arg:1
47: public static final String ERR_UNDEFINED_ATTRIBUTE = "UndefinedAttribute"; // arg:1
48: public static final String ERR_UNDEFINED_ATTRIBUTEGROUP = "UndefinedAttributeGroup"; // arg:1
49: public static final String ERR_UNDEFINED_IDENTITY_CONSTRAINT = "UndefinedIdentityConstraint"; // arg:1
50: public static final String ERR_UNDEFINED_PREFIX = "UndefinedPrefix"; // arg:1
51:
52: public static final String ERR_DOUBLE_DEFINITION = "DoubleDefinition"; // arg:1
53: public static final String ERR_DOUBLE_DEFINITION_ORIGINAL = "DoubleDefinition.Original"; // arg:0
54:
55: public static final String ERR_MISSING_SCHEMALOCATION = "MissingSchemaLocation"; // arg:0
56:
57: public static final String ERR_ENTITY_RESOLUTION_FAILURE = "EntityResolutionFailure"; // arg:2
58:
59: public static final String ERR_SIMPLE_CONTENT_EXPECTED = "SimpleContentExpected"; // arg:2
60: }
|