test_class.declarator: GLOBAL = ImmutableMap.of(
              "oak-jcr", "http://www.jcp.org/jcr/1.0",
              "oak-nt", "http://www.jcp.org/jcr/nt/1.0",
              "oak-foo", "http://www.example.com/foo",
              "oak-quu", "http://www.example.com/quu",
              "oak",     "http://jackrabbit.apache.org/oak/ns/1.0")
test_class.modifier: private static final
test_class.original_string: private static final Map<String, String> GLOBAL = ImmutableMap.of(
              "oak-jcr", "http://www.jcp.org/jcr/1.0",
              "oak-nt", "http://www.jcp.org/jcr/nt/1.0",
              "oak-foo", "http://www.example.com/foo",
              "oak-quu", "http://www.example.com/quu",
              "oak",     "http://jackrabbit.apache.org/oak/ns/1.0");
test_class.type: Map<String, String>
test_class.var_name: GLOBAL
test_class.declarator: LOCAL = ImmutableMap.of(
              "jcr-jcr", "http://www.jcp.org/jcr/1.0",
              "jcr-nt", "http://www.jcp.org/jcr/nt/1.0",
              "foo", "http://www.example.com/foo",
              "quu", "http://www.example.com/quu")
test_class.modifier: private static final
test_class.original_string: private static final Map<String, String> LOCAL = ImmutableMap.of(
              "jcr-jcr", "http://www.jcp.org/jcr/1.0",
              "jcr-nt", "http://www.jcp.org/jcr/nt/1.0",
              "foo", "http://www.example.com/foo",
              "quu", "http://www.example.com/quu");
test_class.type: Map<String, String>
test_class.var_name: LOCAL
test_class.declarator: mapper = new LocalNameMapper(GLOBAL, LOCAL)
test_class.modifier: private final
test_class.original_string: private final NameMapper mapper = new LocalNameMapper(GLOBAL, LOCAL);
test_class.type: NameMapper
test_class.var_name: mapper
test_class.declarator: npMapper = new NamePathMapperImpl(mapper)
test_class.modifier: private
test_class.original_string: private NamePathMapper npMapper = new NamePathMapperImpl(mapper);
test_class.type: NamePathMapper
test_class.var_name: npMapper
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/impl/NamePathMapperImplTest.java
test_class.identifier: NamePathMapperImplTest
test_case.body: @Test
      public void testInvalidOakPaths() {
          getJcrPath("//");
          getJcrPath("/foo//");
          getJcrPath("/..//");
          getJcrPath("/..");
          getJcrPath("/foo/../..");
      }
test_case.class_method_signature: NamePathMapperImplTest.testInvalidOakPaths()
test_case.full_signature: @Test public void testInvalidOakPaths()
test_case.identifier: testInvalidOakPaths
test_case.invocations: getJcrPath getJcrPath getJcrPath getJcrPath getJcrPath
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInvalidOakPaths()
focal_class.declarator: log = LoggerFactory.getLogger(NamePathMapperImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(NamePathMapperImpl.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: nameMapper
focal_class.modifier: private final
focal_class.original_string: private final NameMapper nameMapper;
focal_class.type: NameMapper
focal_class.var_name: nameMapper
focal_class.declarator: idManager
focal_class.modifier: private final
focal_class.original_string: private final IdentifierManager idManager;
focal_class.type: IdentifierManager
focal_class.var_name: idManager
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/impl/NamePathMapperImpl.java
focal_class.identifier: NamePathMapperImpl
focal_class.interfaces: implements NamePathMapper
focal_class.class_method_signature: NamePathMapperImpl.NamePathMapperImpl(NameMapper nameMapper)
focal_class.full_signature: public  NamePathMapperImpl(NameMapper nameMapper)
focal_class.identifier: NamePathMapperImpl
focal_class.modifiers: public
focal_class.parameters: (NameMapper nameMapper)
focal_class.signature:  NamePathMapperImpl(NameMapper nameMapper)
focal_class.class_method_signature: NamePathMapperImpl.NamePathMapperImpl(NameMapper nameMapper, IdentifierManager idManager)
focal_class.full_signature: public  NamePathMapperImpl(NameMapper nameMapper, IdentifierManager idManager)
focal_class.identifier: NamePathMapperImpl
focal_class.modifiers: public
focal_class.parameters: (NameMapper nameMapper, IdentifierManager idManager)
focal_class.signature:  NamePathMapperImpl(NameMapper nameMapper, IdentifierManager idManager)
focal_class.class_method_signature: NamePathMapperImpl.getOakNameOrNull(@NotNull String jcrName)
focal_class.full_signature: @Override public String getOakNameOrNull(@NotNull String jcrName)
focal_class.identifier: getOakNameOrNull
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull String jcrName)
focal_class.return: String
focal_class.signature: String getOakNameOrNull(@NotNull String jcrName)
focal_class.class_method_signature: NamePathMapperImpl.getOakName(@NotNull String jcrName)
focal_class.full_signature: @NotNull @Override public String getOakName(@NotNull String jcrName)
focal_class.identifier: getOakName
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull String jcrName)
focal_class.return: String
focal_class.signature: String getOakName(@NotNull String jcrName)
focal_class.class_method_signature: NamePathMapperImpl.getJcrName(@NotNull String oakName)
focal_class.full_signature: @NotNull @Override public String getJcrName(@NotNull String oakName)
focal_class.identifier: getJcrName
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull String oakName)
focal_class.return: String
focal_class.signature: String getJcrName(@NotNull String oakName)
focal_class.class_method_signature: NamePathMapperImpl.getSessionLocalMappings()
focal_class.full_signature: @Override @NotNull public Map<String, String> getSessionLocalMappings()
focal_class.identifier: getSessionLocalMappings
focal_class.modifiers: @Override @NotNull public
focal_class.parameters: ()
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getSessionLocalMappings()
focal_class.class_method_signature: NamePathMapperImpl.getOakPath(String jcrPath)
focal_class.full_signature: @Override public String getOakPath(String jcrPath)
focal_class.identifier: getOakPath
focal_class.modifiers: @Override public
focal_class.parameters: (String jcrPath)
focal_class.return: String
focal_class.signature: String getOakPath(String jcrPath)
focal_class.class_method_signature: NamePathMapperImpl.getJcrPath(final String oakPath)
focal_class.full_signature: @Override @NotNull public String getJcrPath(final String oakPath)
focal_class.identifier: getJcrPath
focal_class.modifiers: @Override @NotNull public
focal_class.parameters: (final String oakPath)
focal_class.return: String
focal_class.signature: String getJcrPath(final String oakPath)
focal_class.class_method_signature: NamePathMapperImpl.needsFullMapping(String path)
focal_class.full_signature: private boolean needsFullMapping(String path)
focal_class.identifier: needsFullMapping
focal_class.modifiers: private
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean needsFullMapping(String path)
focal_method.body: @Override
      @NotNull
      public String getJcrPath(final String oakPath) {
          if ("/".equals(oakPath)) {
              // avoid the need to special case the root path later on
              return "/";
          } else if (oakPath.isEmpty()) {
              // empty path: map to "."
              return ".";
          } else if (nameMapper.getSessionLocalMappings().isEmpty()) {
              // no local namespace mappings
              return oakPath;
          }
  
          PathListener listener = new PathListener() {
              @Override
              public boolean current() {
                  // nothing to do here
                  return false;
              }
  
              @Override
              public void error(String message) {
                  throw new IllegalArgumentException(message);
              }
  
              @Override
              public boolean name(String name, int index) {
                  String p = nameMapper.getJcrName(name);
                  if (index == 0) {
                      elements.add(p);
                  } else {
                      elements.add(p + '[' + index + ']');
                  }
                  return true;
              }
          };
  
          JcrPathParser.parse(oakPath, listener);
  
          StringBuilder jcrPath = new StringBuilder();
          for (String element : listener.elements) {
              if (element.isEmpty()) {
                  // root
                  jcrPath.append('/');
              }
              else {
                  jcrPath.append(element);
                  jcrPath.append('/');
              }
          }
  
          jcrPath.deleteCharAt(jcrPath.length() - 1);
          return jcrPath.toString();
      }
focal_method.class_method_signature: NamePathMapperImpl.getJcrPath(final String oakPath)
focal_method.full_signature: @Override @NotNull public String getJcrPath(final String oakPath)
focal_method.identifier: getJcrPath
focal_method.invocations: equals isEmpty isEmpty getSessionLocalMappings getJcrName add add parse isEmpty append append append deleteCharAt length toString
focal_method.modifiers: @Override @NotNull public
focal_method.parameters: (final String oakPath)
focal_method.return: String
focal_method.signature: String getJcrPath(final String oakPath)