final SchemaNodeIdentifier key) { final NamespaceStorageNode lookupStartStorage; if (key.isAbsolute() || storage.getStorageNodeType() == StorageNodeType.ROOT_STATEMENT_LOCAL) { lookupStartStorage = NamespaceBehaviour.findClosestTowardsRoot(storage, StorageNodeType.GLOBAL); } else {
@Override public Map<K, V> getAllFrom(final NamespaceStorageNode storage) { NamespaceStorageNode current = storage; while (current.getStorageNodeType() != storageType) { current = current.getParentNamespaceStorage(); } return getAllFromLocalStorage(current); }
private static NamespaceStorageNode globalOrStatementSpecific(final NamespaceStorageNode storage) { NamespaceStorageNode current = storage; while (!isLocalOrGlobal(current.getStorageNodeType())) { current = current.getParentNamespaceStorage(); } return current; }
protected static NamespaceStorageNode findClosestTowardsRoot(final NamespaceStorageNode storage, final StorageNodeType type) { NamespaceStorageNode current = storage; while (current != null && current.getStorageNodeType() != type) { current = current.getParentNamespaceStorage(); } return current; }