     /**
      * The resource portion of the JID.
      */
-    public function get resource():String 
+    public function get resource():String
     {
       if(_resource.length > 0)
         return _resource;

package org.igniterealtime.xiff.core
{
  /**
   * This is a base class for the JID (Jabber ID) classes. It provides
   * functionality to determine if a JID is valid, as well as extract the
   * node, domain and resource from the JID.
   *
   * This class should not be instantiated directly, but should be subclassed
   * instead.
   */
  public class AbstractJID
  {
    //TODO: this doesn't actually validate properly in some cases; need separate nodePrep, etc...
    protected static var jidNodeValidator:RegExp = /^([\x29\x23-\x25\x28-\x2E\x30-\x39\x3B\x3D\x3F\x41-\x7E\xA0 \u1680\u202F\u205F\u3000\u2000-\u2009\u200A-\u200B\u06DD \u070F\u180E\u200C-\u200D\u2028-\u2029\u0080-\u009F \u2060-\u2063\u206A-\u206F\uFFF9-\uFFFC\uE000-\uF8FF\uFDD0-\uFDEF \uFFFE-\uFFFF\uD800-\uDFFF\uFFF9-\uFFFD\u2FF0-\u2FFB]{1,1023})/;
    protected var _node:String = "";
    protected var _domain:String = "";
    protected var _resource:String = "";

    /**
     * Creates a new AbstractJID object.
     *
     * @param	inJID The JID as a String.
     * @param	validate True if the JID should be validated.
     */
    public function AbstractJID(inJID:String, validate:Boolean=false) 
    {
      if(validate)
      {
        if(!jidNodeValidator.test(inJID) || inJID.indexOf(" ") > -1) 
        {
          // TODO: Get rid of trace (use Logger) and create
          // better exception

    /**
     * The node portion of the JID.
     */
    public function get node():String
    {
      if(_node.length > 0)
        return _node;
