docs: public List<Group> getRootGroups()
      {
          List<Group> results = this.cachedRootGroups;
          
          if(results == null)
          {
              synchronized(this)
              {
                  results = this.cachedRootGroups;
                  if(results == null)
                  {
                      results = new ArrayList<Group>();
                      
                      RepositoryConnection conn = null;
                      
                      try
                      {
                          conn = this.getRepository().getConnection();
                          
                          final RepositoryResult<Statement> rootGroupStatements =
                                  conn.getStatements(null, RDF.TYPE, SesameRealmConstants.OAS_ROOTGROUP, true,
                                          this.getContexts());
                          
                          try
                          {
                              while(rootGroupStatements.hasNext())
                              {
                                  final Statement nextRootGroupStatement = rootGroupStatements.next();
                                  
                                  if(nextRootGroupStatement.getSubject() instanceof URI)
                                  {
                                      final URI nextRootGroupUri = (URI)nextRootGroupStatement.getSubject();
                                      // add the group recursively to enable member groups to be added
                                      // recursively
                                      results.add(this.createGroupHierarchy(null, conn, nextRootGroupUri));
                                  }
                                  else
                                  {
                                      this.log.warn("Not including root group as it did not have a URI identifier: {}",
                                              nextRootGroupStatement);
                                  }
                              }
                          }
                          finally
                          {
                              rootGroupStatements.close();
                          }
                      }
                      catch(final RepositoryException e)
                      {
                          this.log.error("Found exception while trying to get root groups", e);
                      }
                      finally
                      {
                          try
                          {
                              if(conn != null)
                              {
                                  conn.close();
                              }
                          }
                          catch(final RepositoryException e)
                          {
                              this.log.error("Found unexpected exception while closing repository connection", e);
                          }
                      }
                      
                      this.cachedRootGroups = results;
                  }
              }
          }
          
          return results;
          
          // throw new RuntimeException(
          // "TODO: Implement code not to rely on getting a complete list of groups where possible");
          // return this.rootGroups;
      }