Schema
This page outlines the data schemas Owl (preliminarily) uses.
Content for this page is under active development.
Owl uses a variety of schemas to gain a cohesive, end to end dataflow, to structure data and to create seamless dataflow transitions between input, compute, store and reply.
```python
# =========COREDOMAIN==============
class CoreDomain(BaseNode):
coreDomainID = StringProperty(unique_index=True)
derivedFromQueryID = StringProperty()
primaryTopic = StringProperty()
description = StringProperty()
keywords = JSONProperty()
relevanceScores = JSONProperty()
perspective = StringProperty()
geographicalScope = StringProperty()
socioeconomicScope = StringProperty()
temporalScope = DateProperty()
spatialCoverage = JSONProperty()
license = StringProperty()
facetRelations = RelationshipTo('Facet', 'RELATED_TO_FACET')
def add_facet_relation(self, facet):
self.facetRelations.connect(facet)
# =============SOCIALFACET===================
class SocialFacet(Facet):
impactScore = FloatProperty()
topics = RelationshipTo('Topic', 'HAS_TOPIC', model=EvolvingRelationship)
mentions = RelationshipTo('Mention', 'MENTIONS', model=EvolvingRelationship)
dynamics = RelationshipTo('Dynamic', 'HAS_DYNAMIC', model=EvolvingRelationship)
feedback = RelationshipFrom('UserFeedback', 'TARGETS_SOCIAL_FACET')
weight = FloatProperty()
queryLens = StringProperty()
relatedFacet = RelationshipTo('Facet', 'RELATED_TO', model=EvolvingRelationship)
temporalCoverage = RelationshipTo('TemporalEvent', 'COVERED_BY', model=EvolvingRelationship)
entities = RelationshipTo('Entity', 'INCLUDES_ENTITY', model=EvolvingRelationship)
relations = RelationshipTo('Relation', 'INCLUDES_RELATION', model=EvolvingRelationship)
keywords = JSONProperty()
factions = RelationshipTo('Faction', 'INCLUDES_FACTION', model=EvolvingRelationship)
influencedBy = RelationshipTo('Influence', 'INFLUENCED_BY', model=EvolvingRelationship)
evidencedBy = RelationshipTo('Evidence', 'EVIDENCED_BY', model=EvolvingRelationship)
sequentialPathway = RelationshipTo('SequentialPathway', 'FOLLOWS_PATHWAY', model=EvolvingRelationship)
# =============CULTUREFACET===================
class CultureFacet(Facet):
culturalSignificance = StringProperty()
traditions = RelationshipTo('Tradition', 'HAS_TRADITION', model=EvolvingRelationship)
artifacts = RelationshipTo('Artifact', 'HAS_ARTIFACT', model=EvolvingRelationship)
feedback = RelationshipFrom('UserFeedback', 'TARGETS_CULTURE_FACET')
weight = FloatProperty()
queryLens = StringProperty()
relatedFacet = RelationshipTo('Facet', 'RELATED_TO', model=EvolvingRelationship)
temporalCoverage = RelationshipTo('TemporalEvent', 'COVERED_BY', model=EvolvingRelationship)
entities = RelationshipTo('Entity', 'INCLUDES_ENTITY', model=EvolvingRelationship)
relations = RelationshipTo('Relation', 'INCLUDES_RELATION', model=EvolvingRelationship)
keywords = JSONProperty()
citations = RelationshipTo('Citation', 'CITED_BY', model=EvolvingRelationship)
# =============ENVIRONMENTFACET===================
class EnvironmentFacet(Facet):
sustainabilityScore = FloatProperty()
challenges = RelationshipTo('Challenge', 'FACES_CHALLENGE', model=EvolvingRelationship)
strategies = RelationshipTo('Strategy', 'EMPLOYS_STRATEGY', model=EvolvingRelationship)
feedback = RelationshipFrom('UserFeedback', 'TARGETS_ENVIRONMENT_FACET')
weight = FloatProperty()
queryLens = StringProperty()
relatedFacet = RelationshipTo('Facet', 'RELATED_TO', model=EvolvingRelationship)
temporalCoverage = RelationshipTo('TemporalEvent', 'COVERED_BY', model=EvolvingRelationship)
spatialCoverage = RelationshipTo('SpatialCoverage', 'HAS_SPATIAL_COVERAGE', model=EvolvingRelationship)
entities = RelationshipTo('Entity', 'INCLUDES_ENTITY', model=EvolvingRelationship)
relations = RelationshipTo('Relation', 'INCLUDES_RELATION', model=EvolvingRelationship)
keywords = JSONProperty()
environmentalFactors = RelationshipTo('EnvironmentalFactor', 'INCLUDES_FACTOR', model=EvolvingRelationship)
# =============INTRAFACET===================
class IntraFacet(Facet):
internalConnectivityScore = FloatProperty()
confidence = FloatProperty()
# Relationships with weighted and evidenced connections
socialCultureRelationship = RelationshipTo('CultureFacet', 'SOCIAL_CULTURE_RELATIONSHIP', model=FacetRelationship)
socialEnvironmentRelationship = RelationshipTo('EnvironmentFacet', 'SOCIAL_ENVIRONMENT_RELATIONSHIP', model=FacetRelationship)
cultureEnvironmentRelationship = RelationshipTo('EnvironmentFacet', 'CULTURE_ENVIRONMENT_RELATIONSHIP', model=FacetRelationship)
# Potential outcomes and evidences as separate nodes linked to this facet
outcomes = RelationshipTo('PotentialOutcome', 'HAS_POTENTIAL_OUTCOME')
evidence = RelationshipTo('Evidence', 'SUPPORTED_BY_EVIDENCE')
class FacetRelationship(StructuredRel):
weight = FloatProperty()
confidence = FloatProperty()
class PotentialOutcome(BaseNode):
description = StringProperty()
class Evidence(BaseNode):
label = StringProperty()
description = StringProperty()
# ===========GEM==================
class Gem(BaseNode):
id = StringProperty(unique_index=True, default=lambda: uuid4())
facets = RelationshipTo(Facet, 'COMPRISED_OF', model=ComprisesFacet)
dynamicWeights = JSONProperty()
interactionScores = JSONProperty()
semanticInteractions = RelationshipTo(Facet, 'SEMANTIC_INTERACTION', model=SemanticInteraction)
visualizationElements = JSONProperty()
keyVisuals = JSONProperty()
history = RelationshipTo('HistoryEvent', 'HAS_HISTORY')
query = StringProperty()
result = RelationshipTo(CoreDomain, 'RESULTS_IN')
confidence = FloatProperty()
source = StringProperty()
weights = JSONProperty()
likes = IntegerProperty()
coupledWith = RelationshipTo('Gem', 'COUPLED_WITH')
positionality = JSONProperty()
creator = RelationshipTo('User', 'CREATED_BY')
createdAt = DateTimeProperty()
lastModifiedBy = RelationshipTo('User', 'LAST_MODIFIED_BY')
lastModifiedAt = DateTimeProperty()
usage = RelationshipTo('UsageEvent', 'USAGE')
sentiment = RelationshipTo('Sentiment', 'HAS_SENTIMENT')
apiEndpoint = StringProperty()
documentation = StringProperty()
class ComprisesFacet(StructuredRel):
# Custom relationship attributes can be added here if needed
class SemanticInteraction(StructuredRel):
relationship = StringProperty()
# Additional interaction-specific attributes
class HistoryEvent(BaseNode):
eventType = StringProperty()
date = DateTimeProperty()
class UsageEvent(BaseNode):
user = RelationshipFrom('User', 'USES')
timestamp = DateTimeProperty()
action = StringProperty()
class Sentiment(BaseNode):
score = FloatProperty()
positiveReviews = IntegerProperty()
negativeReviews = IntegerProperty()
```Last updated