Extended GeoServices JSON encoding rule
Copyright © 2013 Open Geospatial Consortium.
25
type:object, properties:{
integer:{ title:integer,
description:This is an integer., type:integer
}, character:{
title:character, type:string,
required:true },
string:{ title:string,
description:This is a string., type:array,
items:{ type:string,
minItems:1 }
}, real:{
title:real, type:array,
items:{ type:number
} },
decimal:{ title:decimal,
type:number, required:true
}, number:{
title:number, type:number,
required:true },
boolean:{ title:boolean,
type:boolean, required:true
}, uri:{
title:uri, type:string,
format:uri, required:true
}, datetime:{
title:datetime, type:string,
format:date-time, required:true
}, date:{
title:date, type:string,
format:time, required:true
}, time:{
title:time, type:string,
format:time, required:true
}, measure:{
title:measure, ref:http:shapechange.nettmpows9jsonmeasure.json
26
Copyright © 2013 Open Geospatial Consortium.
}, length:{
title:length, ref:http:shapechange.nettmpows9jsonmeasure.json
}, metadata:{
title:metadata, type:any,
required:true },
datatype:{ title:datatype,
description:This is a data type., ref:http:portele.deows9testDataType.json
}, union:{
title:union, ref:http:portele.deows9testNilUnion.json
}, enum:{
title:enum, type:string,
enum:[val1,val2], required:true
}, codelist:{
title:codelist, type:string,
format:uri, required:true
}, role2:{
title:role2, type:string,
format:uri, required:true
} }
} }
}
where http:shapechange.nettmpows9jsonmeasure.json
is
{ schema:http:json-schema.orgdraft-03schema,
id:http:shapechange.nettmpows9jsonmeasure.json, title:measure,
type:object, properties:{
value:{ title:measure value,
type:number, required:true
}, uom:{
title:unit of measure, description:the value may be a conventional unit of measure symbol or the
URI of the definition of a unit of measure type:string,
required:true }
} }
Copyright © 2013 Open Geospatial Consortium.
27 FeatureType2:
{ schema:http:json-schema.orgdraft-03schema,
id:http:portele.deows9testFeatureType2.json, title:FeatureType2,
type:object, properties:{
entityType:{ title:featureobject type,
type:string, default:FeatureType2
}, attributes:{
title:featureobject attributes, type:object,
properties:{ codelist:{
title:codelist, type:[string,null],
format:uri, required:true
}, codelist_nullReason:{
title:Reason for null value in property codelist, type:string
}, union:{
title:union, ref:http:portele.deows9testUnion.json
}, role1:{
title:role1, type:array,
items:{ type:string,
format:uri }
} }
} }
}
DataType:
{ schema:http:json-schema.orgdraft-03schema,
id:http:portele.deows9testDataType.json, title:DataType,
type:object, properties:{
attributes:{ title:featureobject attributes,
type:object, properties:{
datatype:{ title:datatype,
description:This is another data type., type:array,
items:{ ref:http:portele.deows9testDataType2.json
} },
string:{ title:string,
type:array,
28
Copyright © 2013 Open Geospatial Consortium.
items:{ type:string,
minItems:1 }
}, boolean:{
title:boolean, type:boolean
} }
} }
}
DataType2:
{ schema:http:json-schema.orgdraft-03schema,
id:http:portele.deows9testDataType2.json, title:DataType2,
type:object, properties:{
attributes:{ title:featureobject attributes,
type:object, properties:{
string:{ title:string,
type:array, items:{
type:string, minItems:1
} },
integer:{ title:integer,
type:integer }
} }
} }
UnionType:
{ schema:http:json-schema.orgdraft-03schema,
id:http:portele.deows9testUnion.json, title:Union,
type:object, properties:{
attributes:{ title:featureobject attributes,
type:object, properties:{
option1:{ title:option1,
type:string, enum:[val1,val2]
}, option2:{
title:option2, type:integer
}, option3:{
Copyright © 2013 Open Geospatial Consortium.
29
title:option3, type:array,
items:{ type:string
} }
} }
} }
NilUnionType:
{ schema:http:json-schema.orgdraft-03schema,
id:http:portele.deows9testNilUnion.json, title:NilUnion,
type:object, properties:{
attributes:{ title:featureobject attributes,
type:object, properties:{
value:{ title:value,
ref:http:portele.deows9testDataType2.json },
reason:{ title:reason,
type:string }
} }
} }
The ShapeChange configuration file used in the conversion is:
ShapeChangeConfiguration xmlns:xi=http:www.w3.org2001XInclude xmlns=http:www.interactive-instruments.deShapeChangeConfiguration1.1
xmlns:sc=http:www.interactive-instruments.deShapeChangeConfiguration1.1 xmlns:xsi=http:www.w3.org2001XMLSchema-instance
xsi:schemaLocation=http:www.interactive-instruments.deShapeChangeConfiguration1.1 http:shapechange.netresourcesschemaShapeChangeConfiguration.xsd
input parameter name=inputModelType value=EA7
parameter name=inputFile value=srctestresourcestest.eap parameter name=appSchemaName value=Test Schema
parameter name=publicOnly value=true parameter name=checkingConstraints value=disabled
parameter name=sortedSchemaOutput value=true xi:include href=http:shapechange.netresourcesconfigStandardAliases.xml
input log
parameter name=reportLevel value=INFO parameter name=logFile value=testResultsealog_JsonGsrExtended.xml
log targets
Target class=de.interactive_instruments.ShapeChange.Target.JSON.JsonSchema mode=enabled
targetParameter name=outputDirectory value=testResultseajsongeoservices_extended
targetParameter name=defaultEncodingRule value=geoservices_extended xi:include href=
http:shapechange.netresourcesconfigStandardJsonMapEntries.xml Target
targets
30
Copyright © 2013 Open Geospatial Consortium.
ShapeChangeConfiguration