@@ -294,6 +294,11 @@ export class AmfSerializer extends AmfHelperMixin(Object) {
294
294
const displayName = this . _getValue ( target , ns . aml . vocabularies . core . displayName ) ;
295
295
if ( displayName && typeof displayName === 'string' ) {
296
296
result . displayName = displayName ;
297
+ } else {
298
+ const coreName = this . _getValue ( target , ns . aml . vocabularies . core . name ) ;
299
+ if ( coreName && typeof coreName === 'string' ) {
300
+ result . displayName = coreName ;
301
+ }
297
302
}
298
303
const description = this . _getValue ( target , ns . aml . vocabularies . core . description ) ;
299
304
if ( description && typeof description === 'string' ) {
@@ -834,12 +839,14 @@ export class AmfSerializer extends AmfHelperMixin(Object) {
834
839
if ( name && typeof name === 'string' ) {
835
840
result . name = name ;
836
841
}
837
- // if (!namespace.isNullOrEmpty) {
838
- // result.namespace = namespace.value();
839
- // }
840
- // if (!prefix.isNullOrEmpty) {
841
- // result.prefix = prefix.value();
842
- // }
842
+ const xmlNs = this . _getValue ( object , ns . aml . vocabularies . shapes . xmlNamespace ) ;
843
+ if ( xmlNs && typeof xmlNs === 'string' ) {
844
+ result . namespace = xmlNs ;
845
+ }
846
+ const xmlPrefix = this . _getValue ( object , ns . aml . vocabularies . shapes . xmlPrefix ) ;
847
+ if ( xmlPrefix && typeof xmlPrefix === 'string' ) {
848
+ result . prefix = xmlPrefix ;
849
+ }
843
850
return result ;
844
851
}
845
852
@@ -916,7 +923,8 @@ export class AmfSerializer extends AmfHelperMixin(Object) {
916
923
if ( Array . isArray ( value ) ) {
917
924
[ value ] = value ;
918
925
}
919
- result . properties [ key ] = this . unknownDataNode ( value ) ;
926
+ const name = key . replace ( prefix , '' ) . replace ( prefixCompact , '' ) ;
927
+ result . properties [ name ] = this . unknownDataNode ( value ) ;
920
928
}
921
929
} ) ;
922
930
return result ;
@@ -929,10 +937,10 @@ export class AmfSerializer extends AmfHelperMixin(Object) {
929
937
arrayNode ( object ) {
930
938
const result = /** @type ApiArrayNode */ ( this . dataNode ( object ) ) ;
931
939
result . members = [ ] ;
932
- // const { members } = object;
933
- // if (Array.isArray(members) && members.length) {
934
- // result.members = members.map((item) => this.unknownDataNode(item));
935
- // }
940
+ const members = /** @type DataNode[] */ ( this . _computePropertyArray ( object , this . ns . w3 . rdfSchema . member ) ) ;
941
+ if ( Array . isArray ( members ) && members . length ) {
942
+ result . members = members . map ( ( item ) => this . unknownDataNode ( item ) ) ;
943
+ }
936
944
return result ;
937
945
}
938
946
0 commit comments