View Source Grax.Schema (Grax v0.5.0)

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

Functions

Link to this macro

field(name, opts \\ [])

View Source (macro)
Link to this function

inherited_from?(schema, parent)

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

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

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

Returns all modules using Grax.Schema.

Link to this macro

link(name, iri, opts)

View Source (macro)
Link to this macro

property(list)

View Source (macro)
Link to this macro

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

View Source (macro)
Link to this macro

schema(class \\ nil, do_block)

View Source (macro)
@spec schema?(module() | struct()) :: boolean()

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

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

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