-
Notifications
You must be signed in to change notification settings - Fork 12
JSON format
Hyemi Jeong edited this page Jul 13, 2018
·
17 revisions
User can send their data to the RESTful server of InFactory in JSON format. All the elements in IndoorGML can be expressed by JSON. This JSON formats describe the complex features of IndoorGML.
You need to create the document firstly by sending this form to the server.
{
"docId" : "", // which document contains this elements
"type" : "", // which type of IndoorGML complex feature
"id" : "", // identifier of IndoorGML
"parentId" : "" // the identifier of the element which has the association relationship with this element.
}
InFactory supports the unordered creating of the features. Because InFactory only checkes whether all needed features exist or not when InFactory receive "GET" request from the client. So After creating Document, you can freely create the elements.
{
“type" : "IndoorFeatures",
“id" : “if1",
“docId" : “doc1",
“properties" : {
"name" : "indoorfeatures1",
"description": “blah blah blah",
"primalspacefeatures" : "psf1",
"multilayeredgraph" : "mlg1"
}
}
{
“type" : "PrimalSpaceFeatures",
“id" : “psf1",
“docId" : “doc1",
“properties" : {
"name" : "indoorfeatures1",
"description": “blah blah blah",
"cellSpaceMember" : ["c1","c2"],
"cellSpaceBoundaryMember" : ["cb1", "cb2"]
}
}
{
“type" : "IndoorFeatures",
“id" : “if1",
“docId" : “doc1",
“properties" : {
"name" : "indoorfeatures1",
"description": “blah blah blah",
"spaceLayers" : "sls1",
"interEdges" : "ie1"
}
}
{
“type" : "CellSpace",
“id" : “c1",
“parentId" : “psf1",
“docId" : “doc1",
“geometry" : {
“type" : “Solid|Surface",
“coordinates" : [] | “wkt",
“properties" : {
“id" : “cg1",
“extrude" : “true|false",
“height" : “1",
}
},
“properties" : {
“name" : “cell1",
“description": “blah blah blah",
“partialboundedBy" : [“cb1", “cb2","cb3"]
}
}
{
“type" : “CellSpaceBoundary",
“id" : “csb1",
“parentId" : “psf1",
“docId" : “doc1",
“geometry" : {
“type" : “Surface|LineString",
“coordinates" : [],
“properties" : {
“id" : “cgb1",
“extrude" : “true|false",
“height" : “value1" //the height of the door
}
},
“properties" : {
“name" : “CellBoundary1",
“description" : “cellspaceboundary of cell1"
“duality" : “T1",
}
}
{
“type" : "SpaceLayers",
“id" : “sls1",
“docId" : “doc1",
“parentId" : “mlg1",
“properties" : {
"name" : "spacelayers1",
"description": “blah blah blah",
"spaceLayerMember" : ["sl1"]
}
}
{
“type" : "SpaceLayer",
“id" : “sl1",
“docId" : “doc1",
“parentId" : “sls1",
“properties" : {
"name" : "indoorfeatures1",
"description": “blah blah blah",
"nodes" : ["n1"],
"edges" : ["e1"]
}
}
{
“type" : "Nodes",
“id" : “n1",
“docId" : “doc1",
“parentId" : “sl1",
“properties" : {
"name" : "nodes1",
"description": “blah blah blah",
"stateMember" : ["s1","s2"]
}
}
{
“type" : "Edges",
“id" : “e1",
“docId" : “doc1",
“parentId" : “sl1",
“properties" : {
"name" : "Edges1",
"description": “blah blah blah",
"transitionMember" : ["t1"]
}
}
{
“type":"State",
“id" : “s1",
“parentId" : “n1",
“docId" : “doc1",
“geometry" : {
“type" : “Point",
“coordinates" : [],
“properties" : {
“id" : “sg1"
}
},
“properties" : {
“name" : “s1",
“description" : “state",
“duality" : “c1",
“connects" : [“t1"]
}
}
{
“type" : “Transition",
“id" : “t1",
“parentId" : “e1",
“geometry" : {
“type" : “LineString",
“coordinates" : [],
“properties" : {
“id" : “tg1"
}
},
“properties" : {
“weight" : “0",
“connects" : ["s1","s2"],
“duality" : “csb1"
}
}