Examples of XResourceBundleBase


Examples of org.apache.xml.utils.res.XResourceBundleBase

    if (XPATHBundle == null)
      XPATHBundle =
        (XResourceBundleBase) loadResourceBundle(XPATH_ERROR_RESOURCES);

    XResourceBundleBase fResourceBundle = XPATHBundle;

    if (fResourceBundle != null)
    {
      String msgKey = fResourceBundle.getWarningKey(errorCode);

      return createXPATHMsg(fResourceBundle, msgKey, args);
    }
    else
      return "Could not load any resource bundles.";
View Full Code Here

Examples of org.apache.xml.utils.res.XResourceBundleBase

    if (XPATHBundle == null)
      XPATHBundle =
        (XResourceBundleBase) loadResourceBundle(XPATH_ERROR_RESOURCES);

    XResourceBundleBase fResourceBundle = XPATHBundle;

    if (fResourceBundle != null)
    {
      String msgKey = fResourceBundle.getMessageKey(errorCode);

      return createXPATHMsg(fResourceBundle, msgKey, args);
    }
    else
      return "Could not load any resource bundles.";
View Full Code Here

Examples of org.apache.xml.utils.res.XResourceBundleBase

    if (XSLTBundle == null)
      XSLTBundle =
        (XResourceBundleBase) loadResourceBundle(XSLT_ERROR_RESOURCES);

    XResourceBundleBase fResourceBundle = XSLTBundle;

    if (fResourceBundle != null)
    {
      String msgKey = fResourceBundle.getWarningKey(errorCode);

      return createMsg(fResourceBundle, msgKey, args);
    }
    else
      return "Could not load any resource bundles.";
View Full Code Here

Examples of org.apache.xml.utils.res.XResourceBundleBase

    if (XSLTBundle == null)
      XSLTBundle =
        (XResourceBundleBase) loadResourceBundle(XSLT_ERROR_RESOURCES);

    XResourceBundleBase fResourceBundle = XSLTBundle;

    if (fResourceBundle != null)
    {
      String msgKey = fResourceBundle.getMessageKey(errorCode);

      return createMsg(fResourceBundle, msgKey, args);
    }
    else
      return "Could not load any resource bundles.";
View Full Code Here

Examples of org.apache.xml.utils.res.XResourceBundleBase

    boolean throwex = false;
    int majorCode;
    int minorCode;
    String fmsg = null;
    XResourceBundleBase aResourceBundle = null;

    aResourceBundle = (XResourceBundleBase) loadResourceBundle(bundleName);

    String msgKey = aResourceBundle.getMessageKey(errorCode);
    String msg = null;

    if (msgKey != null)
      msg = aResourceBundle.getString(msgKey);

    if (msg == null)
    {
      msg = aResourceBundle.getString(BAD_CODE);
      throwex = true;
    }

    if (args != null)
    {
      try
      {

        // Do this to keep format from crying.
        // This is better than making a bunch of conditional
        // code all over the place.
        int n = args.length;

        for (int i = 0; i < n; i++)
        {
          if (null == args[i])
            args[i] = "";
        }

        fmsg = java.text.MessageFormat.format(msg, args);
      }
      catch (Exception e)
      {
        fmsg = aResourceBundle.getString(FORMAT_FAILED);
        fmsg += " " + msg;
      }
    }
    else
      fmsg = msg;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.