FLOW ALGEBRA
Ontology: Schema.org Ontology
Domain: Metadata Ontologies > Web Metadata
Canonical URL: https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/web-metadata/schema-org-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
flow "SchemaOrgOntology" v1.0
# ---------- DOMAIN ----------
domain:
class: MetadataOntology
category: WebMetadata
subject: SchemaOrgMetadata
purpose:
- represent metadata expressed using the Schema.org vocabulary
- preserve typed entities, properties, identifiers, relationships, context, and provenance
- support structured-data parsing, validation, semantic search, knowledge extraction, and AI consumption
- distinguish declared Schema.org assertions from independently verified facts
- enable machine-readable reasoning over Schema.org graphs
# ---------- CORE ENTITY ----------
entity SchemaOrgMetadata:
type: WebMetadata
describes: SchemaOrgGraph
may_include:
- context
- vocabulary_version
- typed_entities
- identifiers
- properties
- relationships
- nested_entities
- language
- source_document
- representation_syntax
- validation
- provenance
entity SchemaOrgGraph:
type: SemanticGraph
contains: SchemaOrgEntity
entity SchemaOrgEntity:
type: TypedSemanticEntity
may_include:
- entity_identifier
- schema_type
- schema_properties
entity SchemaOrgProperty:
type: SemanticProperty
relates:
- subject
- value_or_entity
# ---------- REPRESENTATION SYNTAX ----------
representation_syntax:
- JSON_LD
- Microdata
- RDFa
rule syntax:
representation syntax != Schema.org vocabulary itself
rule graph_equivalence:
semantically equivalent Schema.org graphs MAY be represented
using different supported syntaxes
# ---------- CONTEXT ----------
entity SchemaOrgContext:
type: SemanticContext
typical_value: https://schema.org
rule context:
JSON_LD representation SHOULD preserve @context
rule context_resolution:
context defines vocabulary interpretation
and MUST NOT be treated as entity identity
# ---------- TYPES ----------
entity SchemaOrgType:
type: SemanticType
examples:
- Thing
- Person
- Organization
- Place
- LocalBusiness
- Product
- Service
- Event
- CreativeWork
- Article
- WebPage
- Dataset
rule type:
SchemaOrgEntity SHOULD have one or more applicable types
rule subtype:
IF type B is subtype_of A
THEN entity typed B MAY also satisfy type A
according_to vocabulary semantics
rule multiple_types:
entity MAY have multiple compatible SchemaOrgTypes
# ---------- THING ----------
entity Thing:
type: SchemaOrgType
common_properties:
- name
- description
- url
- image
- identifier
- sameAs
- additionalType
- alternateName
rule thing:
Thing provides broad base semantics
for Schema.org entities
# ---------- IDENTIFIERS ----------
entity SchemaOrgIdentifier:
type: Identifier
may_be:
- URL
- PropertyValue
- TextIdentifier
- URI
rule identifier:
identifier SHOULD preserve datatype and namespace semantics
rule ID:
JSON_LD @id SHOULD be treated as graph identifier
according_to JSON_LD semantics
rule name_not_identifier:
name != identifier
# ---------- PROPERTIES ----------
rule property:
SchemaOrgProperty SHOULD preserve:
- property_name
- subject_entity
- value
- datatype_or_entity_type
- language_optional
rule expected_type:
property values SHOULD be compatible
with vocabulary-defined expected types
rule unknown_property:
unrecognised property SHOULD be preserved
but MUST NOT be assigned invented Schema.org semantics
# ---------- PERSON ----------
entity Person:
subtype_of: Thing
common_properties:
- name
- givenName
- familyName
- jobTitle
- affiliation
- worksFor
- sameAs
rule person:
Person assertion != independently verified human identity
# ---------- ORGANIZATION ----------
entity Organization:
subtype_of: Thing
common_properties:
- name
- legalName
- url
- logo
- address
- contactPoint
- sameAs
entity LocalBusiness:
subtype_of: Organization
common_properties:
- address
- geo
- telephone
- openingHoursSpecification
- priceRange
rule organisation:
Organization name MUST NOT be treated as unique identity
# ---------- PLACE ----------
entity Place:
subtype_of: Thing
common_properties:
- name
- address
- geo
- containedInPlace
- containsPlace
entity PostalAddress:
type: StructuredValue
common_properties:
- streetAddress
- addressLocality
- addressRegion
- postalCode
- addressCountry
entity GeoCoordinates:
type: StructuredValue
common_properties:
- latitude
- longitude
- elevation
rule place:
address and geographic coordinates SHOULD preserve spatial semantics
# ---------- CREATIVE WORK ----------
entity CreativeWork:
subtype_of: Thing
common_properties:
- headline
- author
- creator
- dateCreated
- datePublished
- dateModified
- publisher
- about
- citation
- licence
entity Article:
subtype_of: CreativeWork
entity WebPage:
subtype_of: CreativeWork
rule creative_work:
CreativeWork metadata SHOULD preserve authorship and temporal context
# ---------- PRODUCT / SERVICE ----------
entity Product:
subtype_of: Thing
common_properties:
- name
- brand
- sku
- gtin
- offers
- aggregateRating
entity Service:
subtype_of: Thing
common_properties:
- name
- provider
- areaServed
- serviceType
- offers
rule product_service:
Product != Service
unless domain modelling explicitly supports multiple compatible types
# ---------- OFFER ----------
entity Offer:
subtype_of: Thing
common_properties:
- price
- priceCurrency
- availability
- validFrom
- priceValidUntil
- url
- seller
rule offer:
Offer SHOULD preserve currency and temporal validity
where price semantics require them
rule price:
price without currency MAY be ambiguous
# ---------- EVENT ----------
entity Event:
subtype_of: Thing
common_properties:
- name
- startDate
- endDate
- location
- organiser
- performer
- eventStatus
- offers
rule event_time:
IF startDate AND endDate exist
THEN startDate SHOULD NOT follow endDate
subject_to timezone semantics
# ---------- DATASET ----------
entity Dataset:
subtype_of: CreativeWork
common_properties:
- name
- description
- creator
- distribution
- variableMeasured
- temporalCoverage
- spatialCoverage
- licence
rule dataset:
Dataset metadata SHOULD preserve distribution and coverage context
where available
# ---------- RELATIONSHIPS ----------
relationships:
SchemaOrgMetadata -> DESCRIBES -> SchemaOrgGraph
SchemaOrgGraph -> CONTAINS -> SchemaOrgEntity
SchemaOrgEntity -> HAS_TYPE -> SchemaOrgType
SchemaOrgEntity -> HAS_PROPERTY -> SchemaOrgProperty
SchemaOrgEntity -> MAY_REFERENCE -> SchemaOrgEntity
Person -> MAY_AFFILIATE_WITH -> Organization
Organization -> MAY_HAVE_ADDRESS -> PostalAddress
Place -> MAY_HAVE_GEO -> GeoCoordinates
CreativeWork -> MAY_HAVE_AUTHOR -> PersonOrOrganization
Product -> MAY_HAVE_OFFER -> Offer
Service -> MAY_HAVE_PROVIDER -> OrganizationOrPerson
Event -> MAY_HAVE_LOCATION -> Place
SchemaOrgMetadata -> MAY_REFERENCE -> SchemaOrgProvenance
# ---------- NESTED ENTITIES ----------
rule nested_entity:
nested object SHOULD be interpreted as semantic entity
when property range expects entity or structured value
rule repeated_entity:
repeated identifiers SHOULD support graph node consolidation
where identity semantics permit
# ---------- SAMEAS ----------
rule sameAs:
sameAs indicates strong identity relationship
according_to Schema.org semantics
rule sameAs_validation:
sameAs SHOULD NOT be asserted or inferred solely
from lexical name similarity
rule sameAs_target:
sameAs target SHOULD be preserved as identifier or URL
# ---------- URL ----------
rule url:
url property indicates resource locator
and != entity identity in all contexts
rule canonical:
Schema.org url property != HTML canonical URL
unless independently established
# ---------- LANGUAGE ----------
rule language:
language-tagged values SHOULD preserve language tags
rule inLanguage:
inLanguage SHOULD preserve declared language semantics
for CreativeWork or applicable entity
# ---------- TEMPORAL VALUES ----------
rule date:
date and datetime values SHOULD preserve lexical precision and timezone
where available
rule temporal_context:
datePublished != dateModified
dateCreated != datePublished
# ---------- RATINGS ----------
entity Rating:
type: StructuredValue
common_properties:
- ratingValue
- bestRating
- worstRating
entity AggregateRating:
subtype_of: Rating
common_properties:
- ratingCount
- reviewCount
rule rating:
rating MUST preserve scale
where bestRating or worstRating differs from assumed defaults
rule aggregate_rating:
AggregateRating != individual Review
# ---------- REVIEWS ----------
entity Review:
subtype_of: CreativeWork
common_properties:
- author
- reviewBody
- reviewRating
- itemReviewed
- datePublished
rule review:
declared Review != independently verified customer experience
# ---------- BREADCRUMBS ----------
entity BreadcrumbList:
subtype_of: Thing
contains: ListItem
entity ListItem:
type: StructuredValue
common_properties:
- position
- name
- item
rule breadcrumb:
BreadcrumbList SHOULD preserve ordered positions
# ---------- STRUCTURED DATA VALIDATION ----------
entity SchemaOrgValidation:
type: ValidationMetadata
may_include:
- syntax_validity
- vocabulary_validity
- type_validity
- property_validity
- expected_type_validity
- required_application_fields
- warnings
rule validation:
syntax validity != factual accuracy
rule application_profile:
search-engine or application requirements MAY be stricter
than base Schema.org vocabulary semantics
# ---------- PROVENANCE ----------
entity SchemaOrgProvenance:
type: ProvenanceMetadata
may_include:
- source_document
- source_url
- syntax
- extraction_method
- extraction_time
- generator
- runtime_generation
rule provenance:
SchemaOrgMetadata SHOULD preserve source and extraction context
rule runtime_structured_data:
runtime-generated structured data SHOULD remain distinguishable
from source markup where provenance matters
# ---------- VALIDATION ----------
validation:
require:
- identifiable_SchemaOrg_graph_or_entity
validate_if_present:
- context
- types
- identifiers
- properties
- expected_types
- nested_entities
- language
- temporal_values
- provenance
reject:
- malformed_structured_data_syntax
- unresolved_required_context
- incompatible_property_value_type
- impossible_event_time_order
- sameAs_inferred_from_name_only
- structured_data_presented_as independently_verified_fact
- runtime_generated_data_presented_as source_markup_without provenance
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
"Schema.org metadata" ~= "Schema.org structured data"
"Schema.org entity" ~= "typed Schema.org item"
"Schema.org type" ~= "Schema.org class" WHEN referring to vocabulary type
"Schema.org property" ~= "Schema.org predicate" WHEN graph semantics apply
"JSON-LD Schema.org" ~= "Schema.org graph represented in JSON-LD"
"Microdata Schema.org" ~= "Schema.org graph represented in Microdata"
PRESERVE distinctions:
SchemaOrg_vocabulary != representation_syntax
entity != type
name != identifier
URL != universal_entity_identity
schema_url != HTML_canonical_URL
sameAs != lexical_similarity
AggregateRating != Review
declared_Review != verified_experience
syntax_validity != factual_accuracy
SchemaOrg_assertion != independently_verified_fact
# ---------- CONFIDENCE ----------
CONFIDENCE:
explicit_SchemaOrg_metadata:
score: 1.00
parser_validated_syntax:
score: 0.99
recognised_type_and_properties:
score: 0.98
stable_entity_identifier:
score: 0.98
explicit_sameAs:
score: 0.95
inferred_entity_consolidation:
score: <= 0.85
name_only_entity_match:
score: <= 0.65
ambiguous_SchemaOrg_semantics:
score: <= 0.60
action: preserve_raw_graph
# ---------- UPDATE MODEL ----------
UPDATE_MODEL:
on_graph_parse:
- identify representation syntax
- resolve context
- create typed entities
- preserve identifiers
- attach properties
- resolve nested entities
- initialise provenance
on_entity_update:
- preserve previous entity state where required
- validate changed types and properties
- update graph relationships
- preserve provenance
on_vocabulary_update:
- preserve original graph
- reassess type and property semantics
- update validation state
- preserve vocabulary version context
on_runtime_generation:
- preserve source structured data
- record runtime graph state
- record generating process
- update provenance
# ---------- FLOW HASH ----------
FLOW_HASH:
inputs:
- ontology
- SchemaOrg_entities
- relationships
- type_rules
- property_rules
- identity_rules
- temporal_rules
- validation
- semantic_equivalence
- confidence
- update_model
canonicalisation:
- normalise_whitespace
- preserve_IRI_and_identifier_case_semantics
- sort_unordered_property_sets
- preserve_ordered_lists
- preserve_rule_order
output:
deterministic_semantic_hash
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
interpret_as:
- web metadata ontology
- Schema.org semantic graph model
- typed entity and property structure
- structured-data validation and provenance model
operations:
- parse Schema.org representations
- resolve vocabulary context
- identify typed entities
- resolve entity identifiers
- inspect properties and expected types
- traverse nested entities
- resolve people, organisations, places, works, products, services, events, and datasets
- interpret sameAs links cautiously
- inspect ratings and reviews
- validate temporal and structured values
- preserve source and runtime provenance
- expose uncertainty
constraints:
- do_not_equate_name_with_identity
- do_not_equate_url_with universal_entity_identity
- do_not_infer_sameAs_from lexical_similarity
- do_not_equate_SchemaOrg_url_with HTML_canonical_URL
- do_not_treat_structured_data_as independently_verified_fact
- preserve_context_types_identifiers_properties_relationships_and_provenance
# ---------- QUERY MODEL ----------
query:
input:
- source_document
- entity_identifier
- schema_type
- property
- name
- URL
- sameAs
- language
- representation_syntax
resolve:
1. identify SchemaOrgGraph
2. resolve syntax and context
3. identify SchemaOrgEntity candidates
4. resolve types and identifiers
5. inspect properties and expected value types
6. traverse nested and referenced entities
7. inspect sameAs and URL relationships
8. validate language and temporal values
9. inspect validation state and provenance
10. return confidence
output:
- SchemaOrg_graph
- entities
- identifiers
- types
- properties
- relationships
- nested_entities
- validation
- provenance
- confidence
# ---------- INFERENCE ----------
inference:
IF entity has explicit @type
THEN classify SchemaOrgEntity
according_to declared type
IF type B subtype_of A
THEN entity typed B MAY be inferred compatible with A
IF same identifier occurs across compatible nodes
THEN node consolidation MAY be performed
subject_to graph identity semantics
IF sameAs is explicitly declared
THEN preserve identity assertion
BUT do_not independently verify target equivalence
IF property semantics remain unknown
THEN preserve raw property
AND do_not invent Schema.org meaning
# ---------- OUTPUT CONTRACT ----------
output:
ontology_entity: SchemaOrgMetadata
graph_structure: machine_interpretable
representation_syntax: explicit
context: preserved
typed_entities: resolvable
identifiers: traceable
properties: vocabulary_aware
relationships: traversable
nested_entities: preserved
validation: reportable
assertion_verification_distinction: explicit
provenance: preserved
uncertainty: explicit
semantic_retrieval: enabled
end flow
Download Code
Copy to Clipboard