docs: function(id, namespace) {                
              if (utils.isEmpty(namespace)) {
                  namespace = null;
              }          
              
              if (!id) {
                  throw new Error("Must suply a non-empty name.");
              }
  
              if (namespace && (namespace.app === '-' || namespace.owner === '-')) {
                  throw new Error("When searching for an entity, wildcards are not allowed in the namespace. Please refine your search.");
              }
              
              var fullPath = null;
              if (this._entitiesByName.hasOwnProperty(id)) {
                  var entities = this._entitiesByName[id];                 
                  
                  if (entities.length === 1 && !namespace) {
                      // If there is only one entity with the
                      // specified name and the user did not
                      // specify a namespace, then we just
                      // return it
                      return entities[0];
                  }
                  else if (entities.length === 1 && namespace) {
                      // If we specified a namespace, then we 
                      // only return the entity if it matches
                      // the full path
                      fullPath = this.service.fullpath(entities[0].path(), namespace);
                      if (entities[0].qualifiedPath === fullPath) {
                          return entities[0];
                      }
                      else {
                          return null;
                      }
                  }
                  else if (entities.length > 1 && !namespace) {
                      // If there is more than one entity and we didn't
                      // specify a namespace, then we return an error
                      // saying the match is ambiguous
                      throw new Error("Ambiguous match for name '" + id + "'");
                  }
                  else {
                      // There is more than one entity, and we do have
                      // a namespace, so we try and find it
                      for(var i = 0; i < entities.length; i++) {
                          var entity = entities[i];
                          fullPath = this.service.fullpath(entities[i].path(), namespace);
                          if (entity.qualifiedPath === fullPath) {
                              return entity;
                          }
                      }                            
                  }
              }
              else {
                  return null;
              }    
          }