Grax.Schema (Grax v0.6.0)

View Source

A special type of struct for graph structures whose fields are mapped to RDF properties and the types of values can be specified.

For now there is no API documentation. Read about schemas in the guide here.

Summary

Types

t()

@type t() :: struct()

Functions

field(name, opts \\ [])

(macro)

inherited_from?(schema, parent)

@spec inherited_from?(module() | struct(), module()) :: boolean()

Checks if the given Grax.Schema or Grax.Schema struct is inherited from another Grax.Schema.

known_schemas()

@spec known_schemas() :: [module()]

Returns all modules using Grax.Schema.

link(list)

(macro)

link(name, iri, opts)

(macro)

property(list)

(macro)

property(name, iri, opts \\ [])

(macro)

schema(class \\ nil, do_block)

(macro)

schema?(mod_or_struct)

@spec schema?(module() | struct()) :: boolean()

Checks if the given module or struct is a Grax.Schema.

struct?(arg1)

@spec struct?(any()) :: boolean()

Checks if the given value is a Grax.Schema struct.