Skip to content

Commit

Permalink
Applications of more properties
Browse files Browse the repository at this point in the history
  • Loading branch information
nunofreitas96 committed Feb 24, 2020
1 parent eb47c09 commit 11aafb2
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 61 deletions.
16 changes: 12 additions & 4 deletions src/Models/CRM/v5_0_2/NodeEntities/E18_Physical_Thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
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.P24_transferred_title_of import P24_transferred_title_of
from src.Models.CRM.v5_0_2.NodeProperties.P30_transferred_custody_of import P30_transferred_custody_of
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 @@ -18,19 +20,25 @@ 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,
)
model=P46_is_composed_of)
took_place_on_or_within = RelationshipFrom(
".E4_Period.E4_Period",
"P8_took_place_on_or_within",
model=P8_took_place_on_or_within,
)
model=P8_took_place_on_or_within)

occupies = RelationshipTo(
".E53_Place.E53_Place", "P156_occupies", model=P156_occupies
)
took_place_at = RelationshipTo(
".E53_Place.E53_Place", "P7_took_place_at", model=P7_took_place_at
)
transferred_title_of = RelationshipFrom(
".E8_Acquisition.E8_Acquisition",
"P24_transferred_title_of",
model=P24_transferred_title_of)
transferred_custody_of = RelationshipFrom(
".E10_Transfer_of_Custody.E10_Transfer_of_Custody",
"P30_transferred_custody_of",
model=P30_transferred_custody_of)

destroyed = RelationshipFrom(E6_Destruction, "P13_destroyed", model=P13_destroyed)
8 changes: 7 additions & 1 deletion src/Models/CRM/v5_0_2/NodeEntities/E19_Physical_Object.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
from neomodel import RelationshipFrom

from src.Models.CRM.v5_0_2.NodeEntities.E18_Physical_Thing import \
E18_Physical_Thing
from src.Models.CRM.v5_0_2.NodeProperties.P25_moved import P25_moved


class E19_Physical_Object(E18_Physical_Thing):
pass
moved = RelationshipFrom(
".E9_Move.E9_Move",
"P25_moved",
model=P25_moved)
6 changes: 2 additions & 4 deletions src/Models/CRM/v5_0_2/NodeEntities/E1_CRM_Entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ class E1_CRM_Entity(StructuredNode):
is_composed_of = RelationshipFrom(
".E7_Activity.E7_Activity",
"P15_was_influenced_by",
model=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,
)
model=P17_was_motivated_by)
39 changes: 13 additions & 26 deletions src/Models/CRM/v5_0_2/NodeEntities/E2_Temporal_Entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ class E2_Temporal_Entity(E1_CRM_Entity):
"E2_Temporal_Entity",
"P114_is_equal_in_time_to",
cardinality=One,
model=P114_is_equal_in_time_to,
)
model=P114_is_equal_in_time_to)
finishes = RelationshipFrom(
"E2_Temporal_Entity", "P115_finishes", cardinality=One, model=P115_finishes
)
Expand All @@ -79,71 +78,59 @@ class E2_Temporal_Entity(E1_CRM_Entity):
"E2_Temporal_Entity",
"P117_occurs_during",
cardinality=One,
model=P117_occurs_during,
)
model=P117_occurs_during)
overlaps_in_time_with = RelationshipFrom(
"E2_Temporal_Entity",
"P118_overlaps_in_time_with",
cardinality=One,
model=P118_overlaps_in_time_with,
)
model=P118_overlaps_in_time_with)
meets_in_time_with = RelationshipFrom(
"E2_Temporal_Entity",
"P119_meets_in_time_with",
cardinality=One,
model=P119_meets_in_time_with,
)
model=P119_meets_in_time_with)
occurs_before = RelationshipFrom(
"E2_Temporal_Entity",
"P120_occurs_before",
cardinality=One,
model=P120_occurs_before,
)
model=P120_occurs_before)
starts_before_or_at_the_end_of = RelationshipFrom(
"E2_Temporal_Entity",
"P173_starts_before_or_at_the_end_of",
cardinality=One,
model=P173_starts_before_or_at_the_end_of,
)
model=P173_starts_before_or_at_the_end_of)
starts_before = RelationshipFrom(
"E2_Temporal_Entity",
"P174_starts_before",
cardinality=One,
model=P174_starts_before,
)
model=P174_starts_before)
starts_before_or_with_the_start_of = RelationshipFrom(
"E2_Temporal_Entity",
"P175_starts_before_or_with_the_start_of",
cardinality=One,
model=P175_starts_before_or_with_the_start_of,
)
model=P175_starts_before_or_with_the_start_of)
starts_before_the_start_of = RelationshipFrom(
"E2_Temporal_Entity",
"P176_starts_before_the_start_of",
cardinality=One,
model=P176_starts_before_the_start_of,
)
model=P176_starts_before_the_start_of)
ends_before_or_at_the_start_of = RelationshipFrom(
"E2_Temporal_Entity",
"P182_ends_before_or_at_the_start_of",
cardinality=One,
model=P182_ends_before_or_at_the_start_of,
)
model=P182_ends_before_or_at_the_start_of)
ends_before_the_start_of = RelationshipFrom(
"E2_Temporal_Entity",
"P183_ends_before_the_start_of",
cardinality=One,
model=P183_ends_before_the_start_of,
)
model=P183_ends_before_the_start_of)
ends_before_or_wit_the_end_of = RelationshipFrom(
"E2_Temporal_Entity",
"P184_ends_before_or_wit_the_end_of",
cardinality=One,
model=P184_ends_before_or_wit_the_end_of,
)
model=P184_ends_before_or_wit_the_end_of)
ends_before_the_end_of = RelationshipFrom(
"E2_Temporal_Entity",
"P185_ends_before_the_end_of",
cardinality=One,
model=P185_ends_before_the_end_of,
)
model=P185_ends_before_the_end_of)
3 changes: 1 addition & 2 deletions src/Models/CRM/v5_0_2/NodeEntities/E36_Visual_Item.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ class E36_Visual_Item(E73_Information_Object):
showsVisualItem = RelationshipTo(
"E24_Physical_Man_Made_Thing",
"P65_shows_visual_item",
model=P65_shows_visual_item,
)
model=P65_shows_visual_item)
15 changes: 15 additions & 0 deletions src/Models/CRM/v5_0_2/NodeEntities/E39_Actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
E77_Persistent_Item
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
from src.Models.CRM.v5_0_2.NodeProperties.P22_transferred_title_to import P22_transferred_title_to
from src.Models.CRM.v5_0_2.NodeProperties.P23_transferred_title_from import P23_transferred_title_from
from src.Models.CRM.v5_0_2.NodeProperties.P29_custody_received_by import P29_custody_received_by


class E39_Actor(E77_Persistent_Item):
Expand All @@ -12,3 +15,15 @@ class E39_Actor(E77_Persistent_Item):
carried_out_by = RelationshipFrom(
".E7_Activity.E7_Activity", "P14_carried_out_by", model=P14_carried_out_by
)
transferred_title_to = RelationshipFrom(
".E8_Acquisition.E8_Acquisition",
"P22_transferred_title_to",
model=P22_transferred_title_to)
transferred_title_from = RelationshipFrom(
".E8_Acquisition.E8_Acquisition",
"P23_transferred_title_from",
model=P23_transferred_title_from)
custody_received_by = RelationshipFrom(
".E10_Transfer_of_Custody.E10_Transfer_of_Custody",
"P29_custody_received_by",
model=P29_custody_received_by)
3 changes: 1 addition & 2 deletions src/Models/CRM/v5_0_2/NodeEntities/E41_Appellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ class E41_Appellation(E90_Symbolic_Object):
"E1_CRM_Entity",
"P1_is_identified_by",
cardinality=One,
model=P1_is_identified_by,
)
model=P1_is_identified_by)
3 changes: 1 addition & 2 deletions src/Models/CRM/v5_0_2/NodeEntities/E42_Identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ class E42_Identifier(E41_Appellation):
"E1_CRM_Entity",
"P48_has_preferred_identifier",
cardinality=One,
model=P48_has_preferred_identifier,
)
model=P48_has_preferred_identifier)
3 changes: 1 addition & 2 deletions src/Models/CRM/v5_0_2/NodeEntities/E52_Time_Span.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ class E52_Time_Span(E1_CRM_Entity):
".E2_Temporal_Entity.E2_Temporal_Entity",
"P4_has_time_span",
cardinality=One,
model=P4_has_time_span,
)
model=P4_has_time_span)
18 changes: 18 additions & 0 deletions src/Models/CRM/v5_0_2/NodeEntities/E53_Place.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,31 @@
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.P26_moved_to import P26_moved_to
from src.Models.CRM.v5_0_2.NodeProperties.P27_moved_from import P27_moved_from
from src.Models.CRM.v5_0_2.NodeProperties.P28_custody_surrenedered_by import P28_custody_surrendered_by
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 = RelationshipFrom(
E4_Period, "P7_took_place_at", model=P7_took_place_at
)
moved_to = RelationshipFrom(
".E9_Move.E9_Move",
"P26_moved_to",
model=P26_moved_to)
moved_from = RelationshipFrom(
".E9_Move.E9_Move",
"P27_moved_from",
model=P27_moved_from)
custody_surrendered_by = RelationshipFrom(
".E10_Transfer_of_Custody.E10_Transfer_of_Custody",
"P28_custody_surrendered_by",
model=P28_custody_surrendered_by
)
9 changes: 6 additions & 3 deletions src/Models/CRM/v5_0_2/NodeEntities/E55_Type.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
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 ..NodeProperties.P137_exemplifies import P137_exemplifies
from ..NodeProperties.P21_had_general_purpose import P21_had_general_purpose
from ..NodeProperties.P2_has_type import P2_has_type


class P137_exemplifies(StructuredRel):
pass


class E55_Type(E28_Conceptual_Object):
hasType = RelationshipFrom(E1_CRM_Entity, "P2_has_type", model=P2_has_type)
exemplifies = RelationshipFrom(
E1_CRM_Entity, "P137_exemplifies", model=P137_exemplifies
)
had_general_purpose = RelationshipFrom(
".E7_Activity.E7_Activity",
"P21_had_general_purpose",
model=P21_had_general_purpose)
2 changes: 1 addition & 1 deletion src/Models/CRM/v5_0_2/NodeEntities/E5_Event.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ class E5_Event(E4_Period):
had_specific_purpose = RelationshipFrom(
".E7_Activity.E7_Activity",
"P20_had_specific_purpose",
model=P20_had_specific_purpose,
model=P20_had_specific_purpose
)
6 changes: 2 additions & 4 deletions src/Models/CRM/v5_0_2/NodeEntities/E71_Man_Made_Thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

class E71_Man_Made_Thing(E70_Thing):
has_title = RelationshipTo(
".E35_Title.E35_Title", "P46_has_title", model=P102_has_title,
)
".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,
)
model=P19_was_intended_use_of)
3 changes: 1 addition & 2 deletions src/Models/CRM/v5_0_2/NodeEntities/E77_Persistent_Item.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ class E77_Persistent_Item(E1_CRM_Entity):
occurred_in_the_presence_of = RelationshipFrom(
E5_Event,
"P12_occurred_in_the_presence_of",
model=P12_occurred_in_the_presence_of,
)
model=P12_occurred_in_the_presence_of)
3 changes: 1 addition & 2 deletions src/Models/CRM/v5_0_2/NodeEntities/E92_Spacetime_Volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ class E92_Spacetime_Volume(E1_CRM_Entity):
"E92_Spacetime_Volume",
"P10_falls_within",
cardinality=One,
model=P10_falls_within,
)
model=P10_falls_within)
6 changes: 2 additions & 4 deletions src/Models/CRM/v5_0_2/NodeProperties/PC0_CRM_Property.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ class PC0_CRM_Property(StructuredNode):
"..NodeEntities.E1_CRM_Entity.E1_CRM_Entity",
"P01_has_domain",
cardinality=One,
model=P01_has_domain,
)
model=P01_has_domain)
hasRange = RelationshipTo(
"..NodeEntities.E1_CRM_Entity.E1_CRM_Entity",
"P02_has_range",
cardinality=One,
model=P02_has_range,
)
model=P02_has_range)
3 changes: 1 addition & 2 deletions src/Models/CRM/v5_0_2/NodeProperties/PC14_Carried_Out_By.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ class PC14_Carried_Out_By(PC0_CRM_Property):
"..NodeEntities.E55_Type.E55_Type",
".P14_1_in_the_role_of",
cardinality=One,
model=P14_1_in_the_role_of,
)
model=P14_1_in_the_role_of)

0 comments on commit 11aafb2

Please sign in to comment.