code: public Schemata getSchemataForSession( JcrSession session ) {
          assert session != null;
          // If the session does not override any namespace mappings used in this schemata ...
          if (!overridesNamespaceMappings(session)) {
              // Then we can just use this schemata instance ...
              return this;
          }
  
          // Otherwise, the session has some custom namespace mappings, so we need to return a session-specific instance...
          return new SessionSchemata(session);
      }
docs: Get a schemata instance that works with the supplied session and that uses the session-specific namespace mappings. Note
  that the resulting instance does not change as the session's namespace mappings are changed, so when that happens the
  JcrSession must call this method again to obtain a new schemata.
  
  @param session the session; may not be null
  @return the schemata that can be used for the session; never null