Skip to content

Commit

Permalink
Some upgrades and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nunofreitas96 committed Feb 22, 2020
1 parent 5e8fdf8 commit eb47c09
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 54 deletions.
11 changes: 3 additions & 8 deletions src/Models/CRM/v5_0_2/NodeEntities/E18_Physical_Thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from src.Models.CRM.v5_0_2.NodeEntities.E6_Destruction import E6_Destruction
from src.Models.CRM.v5_0_2.NodeEntities.E72_Legal_Object import \
E72_Legal_Object
from src.Models.CRM.v5_0_2.NodeProperties import P8_took_place_on_or_within
from src.Models.CRM.v5_0_2.NodeProperties.P13_destroyed import P13_destroyed
from src.Models.CRM.v5_0_2.NodeProperties.P7_took_place_at import \
P7_took_place_at
from src.Models.CRM.v5_0_2.NodeProperties.P156_occupies import P156_occupies
Expand All @@ -11,21 +13,14 @@ class P46_is_composed_of(StructuredRel):
pass


class P8_took_place_on_or_within(StructuredRel):
pass


class P13_destroyed(StructuredRel):
pass


class E18_Physical_Thing(E72_Legal_Object):
is_composed_of = RelationshipTo(
".E18_Physical_Thing.E18_Physical_Thing",
"P46_is_composed_of",
model=P46_is_composed_of,
)
took_place_on_or_within = RelationshipTo(
took_place_on_or_within = RelationshipFrom(
".E4_Period.E4_Period",
"P8_took_place_on_or_within",
model=P8_took_place_on_or_within,
Expand Down
19 changes: 12 additions & 7 deletions src/Models/CRM/v5_0_2/NodeEntities/E1_CRM_Entity.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
from neomodel import RelationshipFrom, StringProperty, StructuredNode
from src.GCF.decorators.OntologyClass import ontology_class

from ..NodeProperties.P2_has_type import P2_has_type
from src.Models.CRM.v5_0_2.NodeProperties.P15_was_influenced_by import P15_was_influenced_by
from src.Models.CRM.v5_0_2.NodeProperties.P17_was_motivated_by import P17_was_motivated_by


@ontology_class
class E1_CRM_Entity(StructuredNode):

hasType = RelationshipFrom(
".E1_CRM_Entity.E1_CRM_Entity", "P2_has_type", model=P2_has_type
)

name = StringProperty(unique_index=True, required=True)
is_composed_of = RelationshipFrom(
".E7_Activity.E7_Activity",
"P15_was_influenced_by",
model=P15_was_influenced_by,
)
was_motivated_by = RelationshipFrom(
".E7_Activity.E7_Activity",
"P17_was_motivated_by",
model=P17_was_motivated_by,
)
10 changes: 2 additions & 8 deletions src/Models/CRM/v5_0_2/NodeEntities/E39_Actor.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
from neomodel import RelationshipFrom, StructuredRel
from src.Models.CRM.v5_0_2.NodeEntities.E77_Persistent_Item import \
E77_Persistent_Item


class P11_had_participant(StructuredRel):
pass


class P14_carried_out_by(StructuredRel):
pass
from src.Models.CRM.v5_0_2.NodeProperties.P11_had_participat import P11_had_participant
from src.Models.CRM.v5_0_2.NodeProperties.P14_carried_out_by import P14_carried_out_by


class E39_Actor(E77_Persistent_Item):
Expand Down
5 changes: 1 addition & 4 deletions src/Models/CRM/v5_0_2/NodeEntities/E3_Condition_State.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from neomodel import One, RelationshipFrom
from src.Models.CRM.v5_0_2.NodeEntities.E2_Temporal_Entity import \
E2_Temporal_Entity


class P5_consists_of(StructuredRel):
pass
from src.Models.CRM.v5_0_2.NodeProperties.P5_consists_of import P5_consists_of


class E3_Condition_State(E2_Temporal_Entity):
Expand Down
6 changes: 1 addition & 5 deletions src/Models/CRM/v5_0_2/NodeEntities/E41_Appellation.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
from neomodel import One, RelationshipFrom, StructuredRel
from src.Models.CRM.v5_0_2.NodeEntities.E90_Symbolic_Object import \
E90_Symbolic_Object


class P1_is_identified_by(StructuredRel):
pass

from src.Models.CRM.v5_0_2.NodeProperties.P1_is_identified_by import P1_is_identified_by

class E41_Appellation(E90_Symbolic_Object):
is_identified_by = RelationshipFrom(
Expand Down
5 changes: 1 addition & 4 deletions src/Models/CRM/v5_0_2/NodeEntities/E4_Period.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from neomodel import RelationshipFrom, StructuredRel
from src.Models.CRM.v5_0_2.NodeEntities.E2_Temporal_Entity import \
E2_Temporal_Entity


class P9_consists_of(StructuredRel):
pass
from src.Models.CRM.v5_0_2.NodeProperties.P9_consists_of import P9_consists_of


class E4_Period(E2_Temporal_Entity):
Expand Down
5 changes: 1 addition & 4 deletions src/Models/CRM/v5_0_2/NodeEntities/E52_Time_Span.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from neomodel import DateTimeProperty, One, RelationshipFrom, StructuredRel
from src.Models.CRM.v5_0_2.NodeEntities.E1_CRM_Entity import E1_CRM_Entity


class P4_has_time_span(StructuredRel):
pass
from src.Models.CRM.v5_0_2.NodeProperties.P4_has_time_span import P4_has_time_span


class E52_Time_Span(E1_CRM_Entity):
Expand Down
7 changes: 4 additions & 3 deletions src/Models/CRM/v5_0_2/NodeEntities/E53_Place.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from neomodel import RelationshipTo
from neomodel import RelationshipTo, RelationshipFrom
from src.Models.CRM.v5_0_2.NodeEntities.E1_CRM_Entity import E1_CRM_Entity
from src.Models.CRM.v5_0_2.NodeEntities.E18_Physical_Thing import \
E18_Physical_Thing
from src.Models.CRM.v5_0_2.NodeEntities.E4_Period import E4_Period
from src.Models.CRM.v5_0_2.NodeProperties.P7_took_place_at import \
P7_took_place_at
from src.Models.CRM.v5_0_2.NodeProperties.P156_occupies import P156_occupies


class E53_Place(E1_CRM_Entity):
occupies = RelationshipTo(E18_Physical_Thing, "P156_occupies", model=P156_occupies)
took_place_at = RelationshipTo(
E18_Physical_Thing, "P7_took_place_at", model=P7_took_place_at
took_place_at = RelationshipFrom(
E4_Period, "P7_took_place_at", model=P7_took_place_at
)
2 changes: 1 addition & 1 deletion src/Models/CRM/v5_0_2/NodeEntities/E55_Type.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from src.Models.CRM.v5_0_2.NodeEntities.E1_CRM_Entity import E1_CRM_Entity
from src.Models.CRM.v5_0_2.NodeEntities.E28_Conceptual_Object import \
E28_Conceptual_Object
from src.Models.CRM.v5_0_2.NodeProperties.P2_has_type import P2_has_type
from ..NodeProperties.P2_has_type import P2_has_type


class P137_exemplifies(StructuredRel):
Expand Down
9 changes: 8 additions & 1 deletion src/Models/CRM/v5_0_2/NodeEntities/E5_Event.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
from neomodel import RelationshipFrom

from src.Models.CRM.v5_0_2.NodeEntities.E4_Period import E4_Period
from src.Models.CRM.v5_0_2.NodeProperties.P20_had_specific_purpose import P20_had_specific_purpose


class E5_Event(E4_Period):
pass
had_specific_purpose = RelationshipFrom(
".E7_Activity.E7_Activity",
"P20_had_specific_purpose",
model=P20_had_specific_purpose,
)
6 changes: 6 additions & 0 deletions src/Models/CRM/v5_0_2/NodeEntities/E70_Thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
E77_Persistent_Item
from src.Models.CRM.v5_0_2.NodeProperties.P130_shows_features_of import \
P130_shows_features_of
from src.Models.CRM.v5_0_2.NodeProperties.P16_used_specific_object import P16_used_specific_object


class E70_Thing(E77_Persistent_Item):
showsFeaturesOf = RelationshipFrom(
".E70_Thing.E70_Thing", "P130_shows_features_of", model=P130_shows_features_of
)
used_specific_object = RelationshipFrom(
".E7_Activity.E7_Activity",
"P16_used_specific_object",
model=P16_used_specific_object
)
8 changes: 7 additions & 1 deletion src/Models/CRM/v5_0_2/NodeEntities/E71_Man_Made_Thing.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
from neomodel import RelationshipTo
from neomodel import RelationshipTo, RelationshipFrom
from src.Models.CRM.v5_0_2.NodeEntities.E70_Thing import E70_Thing
from src.Models.CRM.v5_0_2.NodeProperties.P102_has_title import P102_has_title
from src.Models.CRM.v5_0_2.NodeProperties.P19_was_intended_use_of import P19_was_intended_use_of


class E71_Man_Made_Thing(E70_Thing):
has_title = RelationshipTo(
".E35_Title.E35_Title", "P46_has_title", model=P102_has_title,
)
was_intended_use_of = RelationshipFrom(
".E7_Activity.E7_Activity",
"P19_was_intended_use_of",
model=P19_was_intended_use_of,
)
5 changes: 1 addition & 4 deletions src/Models/CRM/v5_0_2/NodeEntities/E77_Persistent_Item.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
from src.Models.CRM.v5_0_2.NodeEntities.E1_CRM_Entity import E1_CRM_Entity

from ..NodeEntities.E5_Event import E5_Event


class P12_occurred_in_the_presence_of(StructuredRel):
pass
from ..NodeProperties.P12_occurred_in_the_presence_of import P12_occurred_in_the_presence_of


class E77_Persistent_Item(E1_CRM_Entity):
Expand Down
5 changes: 1 addition & 4 deletions src/Models/CRM/v5_0_2/NodeEntities/E92_Spacetime_Volume.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from neomodel import One, RelationshipFrom, StructuredRel
from src.Models.CRM.v5_0_2.NodeEntities.E1_CRM_Entity import E1_CRM_Entity


class P10_falls_within(StructuredRel):
pass
from src.Models.CRM.v5_0_2.NodeProperties.P10_falls_within import P10_falls_within


class E92_Spacetime_Volume(E1_CRM_Entity):
Expand Down

0 comments on commit eb47c09

Please sign in to comment.