11import { Child } from "./Child.js"
22import { TermMappings , ValueMappings , Wrapper } from "rdfjs-wrapper"
33import { Vocabulary } from "../Vocabulary.js"
4- import type { DataFactory , DatasetCore , Term } from "@rdfjs/types"
54
65export class Parent extends Wrapper {
7- private constructor ( node : Term , dataset : DatasetCore , factory : DataFactory ) {
8- super ( node , dataset , factory )
9- }
10-
11- public static wrap ( node : Term , dataset : DatasetCore , factory : DataFactory ) : Parent {
12- return new Parent ( node , dataset , factory )
13- }
14-
156 public get hasString ( ) : string | undefined {
167 return this . singular ( Vocabulary . hasString , ValueMappings . literalToString )
178 }
@@ -21,14 +12,14 @@ export class Parent extends Wrapper {
2112 }
2213
2314 public get hasChild ( ) : Child {
24- return this . singular ( Vocabulary . hasChild , Child . wrap2 )
15+ return this . singular ( Vocabulary . hasChild , Wrapper . as ( Child ) )
2516 }
2617
2718 public set hasChild ( value : Child ) {
28- this . overwriteNullable ( Vocabulary . hasChild , value , Child . wrap2 )
19+ this . overwriteNullable ( Vocabulary . hasChild , value , Wrapper . as ( Child ) )
2920 }
3021
3122 public get hasChildSet ( ) : Set < Child > {
32- return this . objects ( Vocabulary . hasChildSet , Child . wrap2 , Child . wrap2 )
23+ return this . objects ( Vocabulary . hasChildSet , Wrapper . as ( Child ) , Wrapper . as ( Child ) )
3324 }
3425}
0 commit comments