(source: Entity, target: Entity)
| 16 | } |
| 17 | |
| 18 | match(source: Entity, target: Entity): boolean { |
| 19 | if (!source) { |
| 20 | return false; |
| 21 | } |
| 22 | if (this.property && source.schema.hasProperty(this.property)) { |
| 23 | return target.schema.isA(this.property.getRange()); |
| 24 | } |
| 25 | if (this.schema && this.schema.edge && target) { |
| 26 | const sourceProperty = this.schema.getProperty(this.schema.edge.source); |
| 27 | const targetProperty = this.schema.getProperty(this.schema.edge.target); |
| 28 | if (source.schema.isA(sourceProperty.getRange())) { |
| 29 | if (target.schema.isA(targetProperty.getRange())) { |
| 30 | return true; |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | return false; |
| 35 | } |
| 36 | |
| 37 | isPropertyEdgeType() { |
| 38 | return this.property !== undefined; |
no outgoing calls
no test coverage detected