From 3adf1d0126f7ff9d30fb376574358b586c541c25 Mon Sep 17 00:00:00 2001 From: Tanya Gray Date: Fri, 8 May 2026 09:31:13 +0100 Subject: [PATCH 1/3] add recipe shape --- shapes/recipe.ttl | 298 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 298 insertions(+) create mode 100644 shapes/recipe.ttl diff --git a/shapes/recipe.ttl b/shapes/recipe.ttl new file mode 100644 index 0000000..69ef01e --- /dev/null +++ b/shapes/recipe.ttl @@ -0,0 +1,298 @@ +@prefix : . +@prefix sh: . +@prefix schema: . +@prefix xsd: . +@prefix dct: . +@prefix dc: . +@prefix vs: . +@prefix prov: . + +:RecipeShape + a sh:NodeShape ; + sh:targetClass schema:Recipe ; + sh:name "Recipe" ; + sh:description "A Schema.org Recipe with ingredients, instructions, timing, nutrition, and metadata" ; + sh:codeIdentifier "Recipe" ; + dct:created "2026-05-08"^^xsd:date ; + vs:term_status "testing" ; + dc:source ; + prov:wasDerivedFrom ; + + sh:property [ + sh:path schema:name ; + sh:datatype xsd:string ; + sh:name "Name" ; + sh:description "Human-readable title of the recipe" ; + sh:codeIdentifier "name" ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + + sh:property [ + sh:path schema:description ; + sh:datatype xsd:string ; + sh:name "Description" ; + sh:description "Short summary describing the recipe" ; + sh:codeIdentifier "description" ; + sh:minCount 1 ; + ] ; + + sh:property [ + sh:path schema:image ; + sh:nodeKind sh:IRI ; + sh:name "Image" ; + sh:description "Image representing the recipe" ; + sh:codeIdentifier "image" ; + ] ; + + sh:property [ + sh:path schema:url ; + sh:nodeKind sh:IRI ; + sh:name "URL" ; + sh:description "Canonical URL for the recipe" ; + sh:codeIdentifier "url" ; + ] ; + + sh:property [ + sh:path schema:sameAs ; + sh:nodeKind sh:IRI ; + sh:name "Same As" ; + sh:description "Reference URL for the recipe" ; + sh:codeIdentifier "sameAs" ; + ] ; + + sh:property [ + sh:path schema:author ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:name "Author" ; + sh:description "Author of the recipe" ; + sh:codeIdentifier "author" ; + ] ; + + sh:property [ + sh:path schema:datePublished ; + sh:datatype xsd:date ; + sh:name "Date Published" ; + sh:description "Publication date of the recipe" ; + sh:codeIdentifier "datePublished" ; + ] ; + + sh:property [ + sh:path schema:prepTime ; + sh:datatype xsd:string ; + sh:name "Preparation Time" ; + sh:description "Preparation time in ISO 8601 duration format" ; + sh:codeIdentifier "prepTime" ; + sh:maxCount 1 ; + ] ; + + sh:property [ + sh:path schema:cookTime ; + sh:datatype xsd:string ; + sh:name "Cook Time" ; + sh:description "Cooking time in ISO 8601 duration format" ; + sh:codeIdentifier "cookTime" ; + sh:maxCount 1 ; + ] ; + + sh:property [ + sh:path schema:totalTime ; + sh:datatype xsd:string ; + sh:name "Total Time" ; + sh:description "Total time required in ISO 8601 duration format" ; + sh:codeIdentifier "totalTime" ; + sh:maxCount 1 ; + ] ; + + sh:property [ + sh:path schema:recipeYield ; + sh:datatype xsd:string ; + sh:name "Yield" ; + sh:description "Quantity produced by the recipe" ; + sh:codeIdentifier "recipeYield" ; + ] ; + + sh:property [ + sh:path schema:recipeCategory ; + sh:datatype xsd:string ; + sh:name "Recipe Category" ; + sh:description "Category of the recipe such as dessert or main course" ; + sh:codeIdentifier "recipeCategory" ; + ] ; + + sh:property [ + sh:path schema:recipeCuisine ; + sh:datatype xsd:string ; + sh:name "Cuisine" ; + sh:description "Cuisine associated with the recipe" ; + sh:codeIdentifier "recipeCuisine" ; + ] ; + + sh:property [ + sh:path schema:keywords ; + sh:datatype xsd:string ; + sh:name "Keywords" ; + sh:description "Keywords associated with the recipe" ; + sh:codeIdentifier "keywords" ; + ] ; + + sh:property [ + sh:path schema:cookingMethod ; + sh:datatype xsd:string ; + sh:name "Cooking Method" ; + sh:description "Technique used to prepare the recipe" ; + sh:codeIdentifier "cookingMethod" ; + ] ; + + sh:property [ + sh:path schema:suitableForDiet ; + sh:nodeKind sh:IRI ; + sh:name "Suitable Diet" ; + sh:description "Dietary suitability classification" ; + sh:codeIdentifier "suitableForDiet" ; + ] ; + + sh:property [ + sh:path schema:recipeIngredient ; + sh:datatype xsd:string ; + sh:name "Ingredient" ; + sh:description "Ingredient required for the recipe" ; + sh:codeIdentifier "recipeIngredient" ; + sh:minCount 1 ; + ] ; + + sh:property [ + sh:path schema:recipeInstructions ; + sh:node :HowToStepShape ; + sh:name "Instructions" ; + sh:description "Preparation instructions for the recipe" ; + sh:codeIdentifier "recipeInstructions" ; + sh:minCount 1 ; + ] ; + + sh:property [ + sh:path schema:tool ; + sh:datatype xsd:string ; + sh:name "Tool" ; + sh:description "Tool used to prepare the recipe" ; + sh:codeIdentifier "tool" ; + ] ; + + sh:property [ + sh:path schema:supply ; + sh:datatype xsd:string ; + sh:name "Supply" ; + sh:description "Supply needed for preparation" ; + sh:codeIdentifier "supply" ; + ] ; + + sh:property [ + sh:path schema:nutrition ; + sh:node :NutritionInformationShape ; + sh:name "Nutrition" ; + sh:description "Nutritional information for the recipe" ; + sh:codeIdentifier "nutrition" ; + ] . + +:HowToStepShape + a sh:NodeShape ; + sh:name "How To Step" ; + sh:description "Single instructional step in a recipe" ; + sh:codeIdentifier "HowToStep" ; + + sh:property [ + sh:path schema:position ; + sh:datatype xsd:integer ; + sh:name "Position" ; + sh:description "Step order in the instructions" ; + sh:codeIdentifier "position" ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + + sh:property [ + sh:path schema:text ; + sh:datatype xsd:string ; + sh:name "Text" ; + sh:description "Instructional text for the step" ; + sh:codeIdentifier "text" ; + sh:minCount 1 ; + ] ; + + sh:property [ + sh:path schema:name ; + sh:datatype xsd:string ; + sh:name "Step Name" ; + sh:description "Optional title for the instruction step" ; + sh:codeIdentifier "name" ; + ] ; + + sh:property [ + sh:path schema:url ; + sh:nodeKind sh:IRI ; + sh:name "Step URL" ; + sh:description "URL for the instruction step" ; + sh:codeIdentifier "url" ; + ] . + +:NutritionInformationShape + a sh:NodeShape ; + sh:name "Nutrition Information" ; + sh:description "Nutritional values associated with a recipe" ; + sh:codeIdentifier "NutritionInformation" ; + + sh:property [ + sh:path schema:calories ; + sh:datatype xsd:string ; + sh:name "Calories" ; + sh:description "Calories in the recipe" ; + sh:codeIdentifier "calories" ; + ] ; + + sh:property [ + sh:path schema:fatContent ; + sh:datatype xsd:string ; + sh:name "Fat Content" ; + sh:description "Amount of fat in the recipe" ; + sh:codeIdentifier "fatContent" ; + ] ; + + sh:property [ + sh:path schema:proteinContent ; + sh:datatype xsd:string ; + sh:name "Protein Content" ; + sh:description "Amount of protein in the recipe" ; + sh:codeIdentifier "proteinContent" ; + ] ; + + sh:property [ + sh:path schema:carbohydrateContent ; + sh:datatype xsd:string ; + sh:name "Carbohydrate Content" ; + sh:description "Amount of carbohydrates in the recipe" ; + sh:codeIdentifier "carbohydrateContent" ; + ] ; + + sh:property [ + sh:path schema:fiberContent ; + sh:datatype xsd:string ; + sh:name "Fiber Content" ; + sh:description "Amount of fiber in the recipe" ; + sh:codeIdentifier "fiberContent" ; + ] ; + + sh:property [ + sh:path schema:sugarContent ; + sh:datatype xsd:string ; + sh:name "Sugar Content" ; + sh:description "Amount of sugar in the recipe" ; + sh:codeIdentifier "sugarContent" ; + ] ; + + sh:property [ + sh:path schema:sodiumContent ; + sh:datatype xsd:string ; + sh:name "Sodium Content" ; + sh:description "Amount of sodium in the recipe" ; + sh:codeIdentifier "sodiumContent" ; + ] . \ No newline at end of file From 4e9000d41e451a1d6917a6cc0d41baf0c82022a8 Mon Sep 17 00:00:00 2001 From: Tanya Gray Date: Fri, 8 May 2026 09:37:00 +0100 Subject: [PATCH 2/3] add namespace --- shapes/recipe.ttl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shapes/recipe.ttl b/shapes/recipe.ttl index 69ef01e..4cad3ae 100644 --- a/shapes/recipe.ttl +++ b/shapes/recipe.ttl @@ -1,4 +1,3 @@ -@prefix : . @prefix sh: . @prefix schema: . @prefix xsd: . @@ -6,8 +5,9 @@ @prefix dc: . @prefix vs: . @prefix prov: . +@prefix recipe_shape: . -:RecipeShape +recipe_shape:RecipeShape a sh:NodeShape ; sh:targetClass schema:Recipe ; sh:name "Recipe" ; @@ -163,7 +163,7 @@ sh:property [ sh:path schema:recipeInstructions ; - sh:node :HowToStepShape ; + sh:node recipe_shape:HowToStepShape ; sh:name "Instructions" ; sh:description "Preparation instructions for the recipe" ; sh:codeIdentifier "recipeInstructions" ; @@ -188,13 +188,13 @@ sh:property [ sh:path schema:nutrition ; - sh:node :NutritionInformationShape ; + sh:node recipe_shape:NutritionInformationShape ; sh:name "Nutrition" ; sh:description "Nutritional information for the recipe" ; sh:codeIdentifier "nutrition" ; ] . -:HowToStepShape +recipe_shape:HowToStepShape a sh:NodeShape ; sh:name "How To Step" ; sh:description "Single instructional step in a recipe" ; @@ -235,7 +235,7 @@ sh:codeIdentifier "url" ; ] . -:NutritionInformationShape +recipe_shape:NutritionInformationShape a sh:NodeShape ; sh:name "Nutrition Information" ; sh:description "Nutritional values associated with a recipe" ; From 564a8dcd4f441a311ed4707e3c75c4f7eeb1330b Mon Sep 17 00:00:00 2001 From: Tanya Gray Date: Fri, 8 May 2026 09:45:56 +0100 Subject: [PATCH 3/3] add required metadata --- shapes/recipe.ttl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shapes/recipe.ttl b/shapes/recipe.ttl index 4cad3ae..0e1fc5f 100644 --- a/shapes/recipe.ttl +++ b/shapes/recipe.ttl @@ -199,6 +199,8 @@ recipe_shape:HowToStepShape sh:name "How To Step" ; sh:description "Single instructional step in a recipe" ; sh:codeIdentifier "HowToStep" ; + dct:created "2026-05-08"^^xsd:date ; + vs:term_status "testing" ; sh:property [ sh:path schema:position ; @@ -240,6 +242,8 @@ recipe_shape:NutritionInformationShape sh:name "Nutrition Information" ; sh:description "Nutritional values associated with a recipe" ; sh:codeIdentifier "NutritionInformation" ; + dct:created "2026-05-08"^^xsd:date ; + vs:term_status "testing" ; sh:property [ sh:path schema:calories ;