RDF.PropertyMap.add

You're seeing just the function add, go back to RDF.PropertyMap module for more information.
Link to this function

add(property_map, vocab_namespace)

View Source

Specs

add(t(), input()) :: {:ok, t()} | {:error, String.t()}

Adds a set of property mappings to property_map.

The mappings can be passed in various ways:

  • as keyword lists or maps where terms for the RDF properties can be given as atoms or strings, while the property IRIs can be given as RDF.IRIs or strings
  • a strict RDF.Vocabulary.Namespace from which all lowercased terms are added with their respective IRI; since IRIs can also be once in a RDF.PropertyMap a defined alias term is preferred over an original term
  • another RDF.PropertyMap from which all mappings are merged

Unless a mapping for any of the terms or IRIs in the input already exists, an :ok tuple is returned, otherwise an :error tuple.

Link to this function

add(property_map, term, iri)

View Source

Specs

add(t(), coercible_term(), RDF.IRI.coercible()) ::
  {:ok, t()} | {:error, String.t()}

Adds a property mapping between term and iri to property_map.

Unless another mapping for term or iri already exists, an :ok tuple is returned, otherwise an :error tuple.