Converter of vocabulary in YAML format into Turtle/JSON-LD/HTML+RDFa - v1.12.0
    Preparing search index...

    Class VocabGeneration

    Conversion class for YAML to the various syntaxes. The constructor of the class does the real work: converting the yaml file into an internal representation of the vocabulary (see Vocab). The class methods are the interfaces to the different representations of the vocabulary (done through separate modules).

    Index
    • Conversion class for YAML to the various syntaxes. The real action is in the getData method.

      Parameters

      • yml_content: string

        the YAML content in string (before parsing)

      Returns VocabGeneration

      Error raised by either the YAML parser or the Schema Validator

    • Get the minimal JSON-LD Context file for the vocabulary.

      Returns string

      The JSON-LD content

    • Get the HTML representation of the vocabulary based on an HTML template

      Parameters

      • template: string

        Textual version of the vocabulary template

      • basename: string

        Common basename for the generation of the output files

      • context: boolean

        Whether a JSON-LD context file is also generated

      • yaml: boolean = false

      Returns string

    • Get the JSON-LD representation of the vocabulary.

      Returns string

      The JSON-LD content

    • Get the Turtle representation of the vocabulary.

      Returns string

      The Turtle content

    • Get the YAML-LD representation of the vocabulary.

      Returns string

      The JSON-LD content