Return the schema node addressed by a schema path.

        Args:
            path: Schema path.

        Returns:
            Schema node if found in the schema, or ``None``.

        Raises:
            InvalidSchemaPath: If the schema path is invalid.
541412
def get_schema_node(self, path: SchemaPath) -> Optional[SchemaNode]:
        
        return self.schema.get_schema_descendant(
            self.schema_data.path2route(path))
585737
def currentSchemaPath(self):
        
        item = self.currentItem()
        path = []
        while item:
            path.append(nativestring(item.text(0)))
            item = item.parent()
        
        return '.'.join(reversed(path))
432353
def get_node_for_path(user_path)
      case user_path
      when String
        user_path = user_path.split "/"
      when Array
      else
        raise ArgumentError, "Should be Array or String delimited with /"
      end
      $log.debug "TREE #{user_path} " if $log.debug? 
      root = @treemodel.root
      found = nil
      user_path.each { |e| 
        success = false
        root.children.each { |c| 
          if c.user_object == e
            found = c
            success = true
            root = c
            break
          end
        }
        return false unless success

      }
      return found
    end
1261461
private synchronized Schema getInputPathAvroSchema() throws IOException {
        if (inputPathAvroSchema == null) {
            // No need to query Hadoop more than once as this shouldn't change mid-run,
            // thus, we can lazily initialize and cache the result.
            inputPathAvroSchema = AvroUtils.getAvroSchemaFromPath(getInputPath());
        }
        return inputPathAvroSchema;
    }
946033
def get_schema_field(schema, field):
    
    schema_fields_to_model = {key: get_model_field(schema, key) for (key, value) in schema._declared_fields.items()}
    for key, value in schema_fields_to_model.items():
        if value == field:
            return key

    raise Exception("Couldn't find schema field from {}".format(field))
1057031
def _resolve_path(self, path):
        
        filepath = None
        mimetype = None

        for root, dirs, files in self.filter_files(self.path):
            # Does it exist in error path?
            error_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'error_templates', path)
            try:
                with open(error_path):
                    mimetype, encoding = mimetypes.guess_type(error_path)
                    filepath = error_path
            except IOError:
                pass

            # Does it exist in Tarbell blueprint?
            if self.base:
                basepath = os.path.join(root, self.blueprint_name, path)
                try:
                    with open(basepath):
                        mimetype, encoding = mimetypes.guess_type(basepath)
                        filepath = basepath
                except IOError:
                    pass

            # Does it exist under regular path?
            fullpath = os.path.join(root, path)
            try:
                with open(fullpath):
                    mimetype, encoding = mimetypes.guess_type(fullpath)
                    filepath = fullpath
            except IOError:
                pass

        return filepath, mimetype
759646
public static Node getNode(Object root, String path) {
        return getNode(root, Path.create(path));
    }
65282
def find_schemas(self, schema_path, schema_type=SCHEMA_TYPE_PROCESS, verbosity=1):
        """"""
        schema_matches = []

        if not os.path.isdir(schema_path):
            if verbosity > 0:
                self.stdout.write("Invalid path {}".format(schema_path))
            return

        if schema_type not in [SCHEMA_TYPE_PROCESS, SCHEMA_TYPE_DESCRIPTOR]:
            raise ValueError('Invalid schema type')

        for root, _, files in os.walk(schema_path):
            for schema_file in [os.path.join(root, fn) for fn in files]:
                schemas = None
                if schema_type == SCHEMA_TYPE_DESCRIPTOR:
                    # Discover descriptors.
                    schemas = self.find_descriptor_schemas(schema_file)
                elif schema_type == SCHEMA_TYPE_PROCESS:
                    # Perform process discovery for all supported execution engines.
                    schemas = []
                    for execution_engine in manager.execution_engines.values():
                        schemas.extend(execution_engine.discover_process(schema_file))

                for schema in schemas:
                    schema_matches.append(schema)

        return schema_matches
1057433
static String getSchemaPath(String projectFilePath, String path) throws IOException
    {
        File file = null;

        if (path.contains(".jar!")) {
            String ddlText = null;
            ddlText = VoltCompilerUtils.readFileFromJarfile(path);
            file = VoltProjectBuilder.writeStringToTempFile(ddlText);
        }
        else {
            file = new File(path);
        }

        if (!file.isAbsolute()) {
            // Resolve schemaPath relative to either the database definition xml file
            // or the working directory.
            if (projectFilePath != null) {
                file = new File(new File(projectFilePath).getParent(), path);
            }
            else {
                file = new File(path);
            }
        }

        return file.getPath();
    }
186647
def __path(self, path):
        
        if path.startswith(self.__prefix):
            return path

        return "{}{}".format(self.__prefix, path)
440956
private Xml getNode(String... path)
    {
        Xml node = root;
        for (final String element : path)
        {
            try
            {
                node = node.getChild(element);
            }
            catch (final LionEngineException exception)
            {
                throw new LionEngineException(exception, media);
            }
        }
        return node;
    }
844248
@Override
    public Node get(ArchivePath path) {
        Validate.notNull(path, "No path was specified");
        Node node = content.get(path);
        if (node == null && contains(path)) {
            node = getNestedNode(path);
        }
        return node;
    }
1299401
def get_schema(self, alias):
        
        if isinstance(alias, dict):
            return alias
        uri = self.get_uri(alias)
        if uri is None:
            raise GraphException('No such schema: %r' % alias)
        uri, schema = self.resolver.resolve(uri)
        return schema
205937
def update(self, path, node):
        ''''''
        assert(type(path) == type(self.name))
        assert(type(node) == type(self.name) or type(node) == type(predefined))

        d = self.color_scheme
        tokens = path.split('.')
        for t in tokens[:-1]:
            d = d.get(t)
            if d == None:
                raise Exception("Path '%s' not found.")
        d[tokens[-1]] = node
925676
def schema_root(self) -> "SchemaTreeNode":
        """"""
        sn = self
        while sn.parent:
            sn = sn.parent
        return sn
12685
def _find_data_path_schema(data_path, schema_name):
    
    if not data_path or data_path == '/' or data_path == '.':
        return None
    directory = os.path.dirname(data_path)
    path = glob.glob(os.path.join(directory, schema_name))
    if not path:
        return _find_schema(directory, schema_name)
    return path[0]
270677
def get_path(self, path):
        
        mapping = self.get_path_mapping(path)
        return self.path_class(api=self, path=path, mapping=mapping)