69 lines
1.3 KiB
Plaintext
69 lines
1.3 KiB
Plaintext
|
|
// Test bidirectional relationship resolution
|
||
|
|
// Relationships can be declared from either participant's perspective
|
||
|
|
|
||
|
|
// Simple relationship with no self/other blocks
|
||
|
|
relationship Friendship {
|
||
|
|
Alice
|
||
|
|
Bob
|
||
|
|
bond: 0.8
|
||
|
|
years_known: 5
|
||
|
|
}
|
||
|
|
|
||
|
|
// Relationship with roles
|
||
|
|
relationship Marriage {
|
||
|
|
Martha as spouse
|
||
|
|
David as spouse
|
||
|
|
bond: 0.9
|
||
|
|
anniversary: "2015-06-20"
|
||
|
|
}
|
||
|
|
|
||
|
|
// Relationship with self/other blocks from one perspective
|
||
|
|
relationship ParentChild {
|
||
|
|
Martha as parent self {
|
||
|
|
responsibility: 1.0
|
||
|
|
protective: 0.9
|
||
|
|
} other {
|
||
|
|
dependent: 0.8
|
||
|
|
}
|
||
|
|
Tommy as child
|
||
|
|
}
|
||
|
|
|
||
|
|
// Asymmetric relationship - different roles
|
||
|
|
relationship EmployerEmployee {
|
||
|
|
Martha as employer self {
|
||
|
|
authority: 0.9
|
||
|
|
} other {
|
||
|
|
respect: 0.8
|
||
|
|
}
|
||
|
|
Elena as employee
|
||
|
|
}
|
||
|
|
|
||
|
|
// Complex relationship with shared and participant-specific fields
|
||
|
|
relationship RomanticPartnership {
|
||
|
|
Alice as partner self {
|
||
|
|
love: 0.95
|
||
|
|
trust: 0.9
|
||
|
|
} other {
|
||
|
|
attraction: 0.85
|
||
|
|
respect: 0.95
|
||
|
|
}
|
||
|
|
Charlie as partner
|
||
|
|
|
||
|
|
// Shared fields
|
||
|
|
commitment: 0.85
|
||
|
|
compatibility: 0.9
|
||
|
|
}
|
||
|
|
|
||
|
|
// Multiple relationships between same people with different names
|
||
|
|
relationship Friendship2 {
|
||
|
|
Alice
|
||
|
|
Charlie
|
||
|
|
bond: 0.7
|
||
|
|
}
|
||
|
|
|
||
|
|
relationship Coworkers {
|
||
|
|
Alice
|
||
|
|
Charlie
|
||
|
|
workplace: "TechCorp"
|
||
|
|
}
|