| 1 | use utf8; | ||
| 2 | |||
| 3 | package SemanticWeb::Schema::NutritionInformation; | ||
| 4 | |||
| 5 | # ABSTRACT: Nutritional information about the recipe. | ||
| 6 | |||
| 7 | use v5.14; | ||
| 8 | use Moo; | ||
| 9 | |||
| 10 | extends qw/ SemanticWeb::Schema::StructuredValue /; | ||
| 11 | |||
| 12 | |||
| 13 | use MooX::JSON_LD 'NutritionInformation'; | ||
| 14 | use Ref::Util qw/ is_plain_hashref /; | ||
| 15 | # RECOMMEND PREREQ: Ref::Util::XS | ||
| 16 | |||
| 17 | use namespace::autoclean; | ||
| 18 | |||
| 19 | our $VERSION = 'v23.0.0'; | ||
| 20 | |||
| 21 | |||
| 22 | has calories => ( | ||
| 23 | is => 'rw', | ||
| 24 | predicate => '_has_calories', | ||
| 25 | json_ld => 'calories', | ||
| 26 | ); | ||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | has carbohydrate_content => ( | ||
| 31 | is => 'rw', | ||
| 32 | predicate => '_has_carbohydrate_content', | ||
| 33 | json_ld => 'carbohydrateContent', | ||
| 34 | ); | ||
| 35 | |||
| 36 | |||
| 37 | |||
| 38 | has cholesterol_content => ( | ||
| 39 | is => 'rw', | ||
| 40 | predicate => '_has_cholesterol_content', | ||
| 41 | json_ld => 'cholesterolContent', | ||
| 42 | ); | ||
| 43 | |||
| 44 | |||
| 45 | |||
| 46 | has fat_content => ( | ||
| 47 | is => 'rw', | ||
| 48 | predicate => '_has_fat_content', | ||
| 49 | json_ld => 'fatContent', | ||
| 50 | ); | ||
| 51 | |||
| 52 | |||
| 53 | |||
| 54 | has fiber_content => ( | ||
| 55 | is => 'rw', | ||
| 56 | predicate => '_has_fiber_content', | ||
| 57 | json_ld => 'fiberContent', | ||
| 58 | ); | ||
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | has protein_content => ( | ||
| 63 | is => 'rw', | ||
| 64 | predicate => '_has_protein_content', | ||
| 65 | json_ld => 'proteinContent', | ||
| 66 | ); | ||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | has saturated_fat_content => ( | ||
| 71 | is => 'rw', | ||
| 72 | predicate => '_has_saturated_fat_content', | ||
| 73 | json_ld => 'saturatedFatContent', | ||
| 74 | ); | ||
| 75 | |||
| 76 | |||
| 77 | |||
| 78 | has serving_size => ( | ||
| 79 | is => 'rw', | ||
| 80 | predicate => '_has_serving_size', | ||
| 81 | json_ld => 'servingSize', | ||
| 82 | ); | ||
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | has sodium_content => ( | ||
| 87 | is => 'rw', | ||
| 88 | predicate => '_has_sodium_content', | ||
| 89 | json_ld => 'sodiumContent', | ||
| 90 | ); | ||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | has sugar_content => ( | ||
| 95 | is => 'rw', | ||
| 96 | predicate => '_has_sugar_content', | ||
| 97 | json_ld => 'sugarContent', | ||
| 98 | ); | ||
| 99 | |||
| 100 | |||
| 101 | |||
| 102 | has trans_fat_content => ( | ||
| 103 | is => 'rw', | ||
| 104 | predicate => '_has_trans_fat_content', | ||
| 105 | json_ld => 'transFatContent', | ||
| 106 | ); | ||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | has unsaturated_fat_content => ( | ||
| 111 | is => 'rw', | ||
| 112 | predicate => '_has_unsaturated_fat_content', | ||
| 113 | json_ld => 'unsaturatedFatContent', | ||
| 114 | ); | ||
| 115 | |||
| 116 | |||
| 117 | |||
| 118 | |||
| 119 | |||
| 120 | 1; | ||
| 121 | |||
| 122 | __END__ |