Class: Usage

A machine-actionable specification of a set of usage instructions of the parent Extractor.

URI: mme_schema:Usage

erDiagram Usage { UsageTypes method string setup string command UsageScope scope stringList supported_filetypes }

Slots

Name

Cardinality and Range

Description

Inheritance

method

1..1
UsageTypes

Usage invocation method, e.g. from a command line or from Python.

direct

setup

0..1
String

Any necessary setup step for the ‘command’ to become available.

direct

command

1..1
String

A machine-executable command by which the Extractor functionality can be
accessed.

direct

scope

0..1
UsageScope

Specification of extraction scope.

direct

supported_filetypes

0..*
String

An enumeration of the FileType that this Usage of an Extractor supports,
matching one or more of the FileTypes present in the supported_filetypes
slot of the Extractor. Defaults to all supported_filetypes specified in the
Extractor definition.

direct

Usages

used by

used in

type

used

Extractor

usage

range

Usage

Identifier and Mapping Information

Schema Source

  • from schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/

Mappings

Mapping Type

Mapped Value

self

mme_schema:Usage

native

mme_schema:Usage

Examples

Example: Usage-cli

---
method: cli
command: parse --type={{ input_type }} {{ file_path }}

Example: Usage-python_templating_scope

---
method: python
setup: example
command: >-
    '{{ input_type }}.extractors.extract.ExampleExtractor({{ file_path }}).parse()'
scope: meta+data

Example: Usage-cli_scope

---
method: cli
scope: meta-only
command: parse --type=example --summary {{ file_path }}

Example: Usage-python_setup

---
method: python
setup: example.extractors
command: example.extractors.extract({{ file_path }}, type="{{ input_type }}")

Example: Usage-python_setup_scope

---
method: python
setup: example
scope: meta-only
command: example.extractors.extract.ExampleExtractor({{ file_path }}).summarize()

Example: Usage-cli_filetypes

---
method: cli
scope: meta-only
command: parse --type=example --summary {{ file_path }}
supported_filetypes:
    - example

LinkML Source

Direct

name: Usage
description: A machine-actionable specification of a set of usage instructions of
  the parent `Extractor`.
from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
rank: 1000
attributes:
  method:
    name: method
    description: Usage invocation method, e.g. from a command line or from Python.
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    rank: 1000
    domain_of:
    - Usage
    - Installation
    range: UsageTypes
    required: true
  setup:
    name: setup
    description: Any necessary setup step for the 'command' to become available.
    comments:
    - 'For `method: python`, this is an argument to Python''s `import`.'
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    rank: 1000
    domain_of:
    - Usage
  command:
    name: command
    description: A machine-executable command by which the `Extractor` functionality
      can be accessed.
    comments:
    - 'For `method: cli`, a parametrized executable invocation which should be available
      after installing the `Extractor`;'
    - 'For `method: python`, a parametrized function invocation which should be available
      after installing and setting up the `Extractor`.'
    - The templated parameters which can be requested from the user are [described
      by the `UsageTemplate` class](UsageTemplate.md).
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    rank: 1000
    domain_of:
    - Usage
    required: true
  scope:
    name: scope
    description: Specification of extraction scope.
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    rank: 1000
    domain_of:
    - Usage
    range: UsageScope
    required: false
  supported_filetypes:
    name: supported_filetypes
    description: An enumeration of the `FileType` that this `Usage` of an `Extractor`
      supports, matching one or more of the `FileTypes` present in the `supported_filetypes`
      slot of the `Extractor`. Defaults to all `supported_filetypes` specified in
      the `Extractor` definition.
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    multivalued: true
    domain_of:
    - Extractor
    - Usage
    required: false

Induced

name: Usage
description: A machine-actionable specification of a set of usage instructions of
  the parent `Extractor`.
from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
rank: 1000
attributes:
  method:
    name: method
    description: Usage invocation method, e.g. from a command line or from Python.
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    rank: 1000
    alias: method
    owner: Usage
    domain_of:
    - Usage
    - Installation
    range: UsageTypes
    required: true
  setup:
    name: setup
    description: Any necessary setup step for the 'command' to become available.
    comments:
    - 'For `method: python`, this is an argument to Python''s `import`.'
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    rank: 1000
    alias: setup
    owner: Usage
    domain_of:
    - Usage
    range: string
  command:
    name: command
    description: A machine-executable command by which the `Extractor` functionality
      can be accessed.
    comments:
    - 'For `method: cli`, a parametrized executable invocation which should be available
      after installing the `Extractor`;'
    - 'For `method: python`, a parametrized function invocation which should be available
      after installing and setting up the `Extractor`.'
    - The templated parameters which can be requested from the user are [described
      by the `UsageTemplate` class](UsageTemplate.md).
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    rank: 1000
    alias: command
    owner: Usage
    domain_of:
    - Usage
    range: string
    required: true
  scope:
    name: scope
    description: Specification of extraction scope.
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    rank: 1000
    alias: scope
    owner: Usage
    domain_of:
    - Usage
    range: UsageScope
    required: false
  supported_filetypes:
    name: supported_filetypes
    description: An enumeration of the `FileType` that this `Usage` of an `Extractor`
      supports, matching one or more of the `FileTypes` present in the `supported_filetypes`
      slot of the `Extractor`. Defaults to all `supported_filetypes` specified in
      the `Extractor` definition.
    from_schema: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/
    multivalued: true
    alias: supported_filetypes
    owner: Usage
    domain_of:
    - Extractor
    - Usage
    range: string
    required: false