@@ -88,7 +88,7 @@ func (api *JsonLdApi) Expand(activeCtx *Context, activeProperty string, element
8888 // Get any property-scoped context for activeProperty
8989 var propertyScopedCtx interface {}
9090 if td := activeCtx .GetTermDefinition (activeProperty ); td != nil {
91- propertyScopedCtx = td .context
91+ propertyScopedCtx = td .Context
9292 }
9393
9494 // second, determine if any type-scoped context should be reverted; it
@@ -182,8 +182,8 @@ func (api *JsonLdApi) Expand(activeCtx *Context, activeProperty string, element
182182 }
183183
184184 for _ , tt := range types {
185- if td := typeScopedContext .GetTermDefinition (tt ); td != nil && td .hasContext {
186- newCtx , err := activeCtx .parse (td .context , nil , false , false , false , false )
185+ if td := typeScopedContext .GetTermDefinition (tt ); td != nil && td .HasContext {
186+ newCtx , err := activeCtx .parse (td .Context , nil , false , false , false , false )
187187 if err != nil {
188188 return nil , err
189189 }
@@ -669,10 +669,10 @@ func (api *JsonLdApi) expandObject(activeCtx *Context, activeProperty string, ex
669669 // use potential scoped context for key
670670 termCtx := activeCtx
671671 td := activeCtx .GetTermDefinition (key )
672- if td != nil && td .hasContext {
672+ if td != nil && td .HasContext {
673673 // TODO: fix calling a private method
674674 //termCtx, err = activeCtx.Parse(ctx)
675- termCtx , err = activeCtx .parse (td .context , make ([]string , 0 ), false , true , false , true )
675+ termCtx , err = activeCtx .parse (td .Context , make ([]string , 0 ), false , true , false , true )
676676 if err != nil {
677677 return err
678678 }
@@ -682,7 +682,7 @@ func (api *JsonLdApi) expandObject(activeCtx *Context, activeProperty string, ex
682682 if termCtx .HasContainerMapping (key , "@language" ) && isMap {
683683 var expandedValueList []interface {}
684684
685- dir , hasDir := td .direction , td .hasDirection
685+ dir , hasDir := td .Direction , td .HasDirection
686686
687687 for _ , language := range GetOrderedKeys (valueMap ) {
688688 expandedLanguage , err := termCtx .ExpandIri (language , false , true , nil , nil )
@@ -710,7 +710,7 @@ func (api *JsonLdApi) expandObject(activeCtx *Context, activeProperty string, ex
710710 if dir != nil {
711711 v ["@direction" ] = dir
712712 }
713- } else if defaultDir := termCtx .values . direction ; defaultDir != "" {
713+ } else if defaultDir := termCtx .Values . Direction ; defaultDir != "" {
714714 v ["@direction" ] = defaultDir
715715 }
716716 expandedValueList = append (expandedValueList , v )
@@ -720,8 +720,8 @@ func (api *JsonLdApi) expandObject(activeCtx *Context, activeProperty string, ex
720720 } else if termCtx .HasContainerMapping (key , "@index" ) && isMap { // 7.6)
721721 asGraph := termCtx .HasContainerMapping (key , "@graph" )
722722 indexKey := "@index"
723- if tdKey := termCtx .GetTermDefinition (key ); tdKey != nil && tdKey .index != "" {
724- indexKey = tdKey .index
723+ if tdKey := termCtx .GetTermDefinition (key ); tdKey != nil && tdKey .Index != "" {
724+ indexKey = tdKey .Index
725725 }
726726 var propertyIndex string
727727 if indexKey != "@index" {
@@ -761,7 +761,7 @@ func (api *JsonLdApi) expandObject(activeCtx *Context, activeProperty string, ex
761761 if err != nil {
762762 return err
763763 }
764- } else if tdKey != nil && tdKey .typ == "@json" {
764+ } else if tdKey != nil && tdKey .Type == "@json" {
765765 expandedValue = map [string ]interface {}{
766766 "@type" : "@json" ,
767767 "@value" : value ,
@@ -913,8 +913,8 @@ func (api *JsonLdApi) expandIndexMap(activeCtx *Context, activeProperty string,
913913
914914 indexCtx := activeCtx
915915 // if indexKey is @type, there may be a context defined for it
916- if td := activeCtx .GetTermDefinition (key ); indexKey == "@type" && td != nil && td .hasContext {
917- newCtx , err := activeCtx .Parse (td .context )
916+ if td := activeCtx .GetTermDefinition (key ); indexKey == "@type" && td != nil && td .HasContext {
917+ newCtx , err := activeCtx .Parse (td .Context )
918918 if err != nil {
919919 return nil , err
920920 }
0 commit comments