This is most commonly used with keywords, i.e. @type:
val `@type` = Keyword.`@type`.bindIRI
val givenName = schemaOrg("givenName").bindValue[String]
val personType = schemaOrg("Person")
val willPerson = NodeObject(
`@type` -> personType,
givenName -> "Will"
)
A custom IRIValueMapper can be defined for a type. This can
be particularly useful when referring by id:
implicitval personIRIMapper: IRIValueMapper[Person] = IRIValueMapper(p => IRI(p.id))
val id = exampleOrg("president").bindIRI[Person] // has @type -> @idval obama = Person("http://www.wikidata.org/entity/Q76", name = "Barack Obama")
val america = NodeObject(
president -> obama
)
A binding of a key to an IRIValue, returning a NodeEntry.
This is most commonly used with keywords, i.e.
@type
:A custom IRIValueMapper can be defined for a type. This can be particularly useful when referring by id: