Examples
Futureverse
This example defines the core classes and their hierarchies within the Futureverse framework. These definitions create a hierarchy wherefv:Asset
is the root, and the more specific classes like fv:NFT
and fv:SFT
inherit from it. Each of these asset types can be further categorized into on-chain or off-chain, depending on where the asset data is stored.
TNL Boxer
This example defines a specific instance of anOnChainNFT
, called Boxer
, using SHACL (Shapes Constraint Language).
TNX Boxer properties
-
sh:property
:- The
sh:property
construct defines constraints on a particular property of a node. Inside eachsh:property
block, you specify details about the property, such as its path, type, cardinality, and more.
- The
-
sh:maxCount
andsh:minCount
:sh:maxCount 1
: This specifies that the property can have at most one value. It’s used to enforce uniqueness or singularity of a particular property in a node.sh:minCount 0
: This means that the property is optional (it can have zero values). If this were set to 1, the property would be required.
-
sh:class asm:Brain
:- The
sh:class
property is used to enforce that the value of the property must be of a specific RDF class, in this case,asm:Brain
. This ensures that the value ofasm:equippedWith_brain
must be an instance of theasm:Brain
class.
- The
-
Targeting Multiple Classes with
sh:class
:-
You can target multiple classes by listing them in a comma-separated list within the
sh:class
property. For example:This specifies that the property can be an instance of eitherfv:Gloves
orfv:Mittens
.
-
You can target multiple classes by listing them in a comma-separated list within the
-
sh:path
Property:-
The
sh:path
statement indicates the exact RDF property within your data model that is subject to the constraints defined in the SHACL shape.In this case,asm:equippedWith_brain
is the RDF property that the shape is describing. This property might represent a relationship where aBoxer
is equipped with aBrain
.
-
The
ASM Brain
This example definesBrain
as a specialized type of OnChainNFT
, inheriting properties and constraints from its parent classes.