Convenience alias type for Literal from 'n3'
Convenience alias type for NamedNode from 'n3'
Convenience alias type for Triple from 'n3'
Optional - Defines the type (xsd:type) of Resource,
Basic usage and result example:
@RdfPrefixes({
foaf: 'http://xmlns.com/foaf/0.1/',
person: 'http://example.com/Person/'
})
@RdfBean('foaf:Person')
export class Person {
@RdfSubject('person')
public name: string;
}
const p = new Person();
p.name = 'John';
RdfMapper.serialize(p)
produces the following TURTLE:
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix person: <http://example.com/Person/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
person:John a foaf:Person;
a IRI in the form of 'http(s)://schema.org/Person or prefixed version e.g. 'schema:Person'
Responsible of defining prefixes and it's corresponding URIs
Basic usage example:
@RdfPrefixes({
foaf: 'http://xmlns.com/foaf/0.1/',
person: 'http://example.com/Person/'
})
export class Person {
}
Used to annotate object properties
Optional - Resource Identifier. If this decorator is absent then the subject will be a Blank Node
Basic usage and result example:
@RdfNamespaces({
foaf: 'http://xmlns.com/foaf/0.1/',
person: 'http://example.com/Person/'
})
@RdfBean('foaf:Person')
export class Person {
@RdfSubject('person')
public name: string;
}
const p = new Person();
p.name = 'John';
RdfMapper.serialize(p)
produces the following TURTLE:
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix person: <http://example.com/Person/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
person:John a foaf:Person;
Generated using TypeDoc
Convenience alias type for BlankNode from 'n3'