Skip to content

Commit

Permalink
Create TDSRelationAccessor for PCT (#905)
Browse files Browse the repository at this point in the history
* Create TDSRelationAccessor for PCT

* Use fully qualified path for RelationElementAccessor

* Update SPR id

* Add constraint for type checking in TDSRelationAccessor

* Update tds.pure

* Update pom.xml
  • Loading branch information
jake-kim1 authored Nov 28, 2024
1 parent eb86360 commit d253841
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,21 @@ Class meta::pure::metamodel::relation::TDS<T> extends meta::pure::metamodel::rel
csv : String[1];
}

native function meta::pure::metamodel::relation::stringToTDS(s:String[1]):meta::pure::metamodel::relation::TDS<Any>[1];
Class meta::pure::metamodel::relation::TDSRelationAccessor<T> extends meta::pure::metamodel::relation::RelationElementAccessor<T>
[
sourceElementExists
(
~function: $this.sourceElement->isNotEmpty() && $this.sourceElement->instanceOf(meta::pure::metamodel::relation::TDS)
~enforcementLevel: Error
~message: 'Source element needs to exist and to be type of TDS'
)
]
{
}

function meta::pure::metamodel::relation::newTDSRelationAccessor<T>(tds:TDS<T>[1]):TDSRelationAccessor<T>[1]
{
^TDSRelationAccessor<T>(sourceElement = $tds);
}

native function meta::pure::metamodel::relation::stringToTDS(s:String[1]):meta::pure::metamodel::relation::TDS<Any>[1];
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
<artifactId>legend-pure-runtime-java-engine-compiled</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
Expand Down

0 comments on commit d253841

Please sign in to comment.