using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using IDB.API.DTO.Navigation;
namespace IDB.API.DTO.Navigation
{
public partial class Node
{
public Node()
{
ChildNodes = new List<Node>{};
}
public virtual string EntityName { get; set; }
public virtual string ID { get; set; }
public virtual string ParentID { get; set; }
public virtual string Title { get; set; }
public virtual int? Count { get; set; }
public virtual string ImageKey { get; set; }
public virtual bool Expanded { get; set; }
public virtual bool Selected { get; set; }
public virtual string DisplayPath { get; set; }
public virtual List<Node> ChildNodes { get; set; }
public virtual string RegistrationPathElement { get; set; }
public virtual string QueryPathElement { get; set; }
public virtual string Path { get; set; }
public virtual bool IsHierarchy { get; set; }
}
public partial class ViewExplorerNode
: Node
{
public ViewExplorerNode()
{
ChildNodes = new List<ViewExplorerNode>{};
}
public virtual Guid? ViewId { get; set; }
public virtual Guid? ExplorerId { get; set; }
public virtual List<ViewExplorerNode> ChildNodes { get; set; }
}
public partial class ViewsAndExplorers
{
public ViewsAndExplorers()
{
Nodes = new List<ViewExplorerNode>{};
}
public virtual List<ViewExplorerNode> Nodes { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/ViewsAndExplorers HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Nodes:
[
{
ViewId: 00000000-0000-0000-0000-000000000000,
ExplorerId: 00000000-0000-0000-0000-000000000000,
ChildNodes:
[
{
ViewId: 00000000-0000-0000-0000-000000000000,
ExplorerId: 00000000-0000-0000-0000-000000000000,
ChildNodes:
[
{
ViewId: 00000000-0000-0000-0000-000000000000,
ExplorerId: 00000000-0000-0000-0000-000000000000,
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
ChildNodes:
[
{
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
ChildNodes:
[
{
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
ChildNodes:
[
{
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
ChildNodes:
[
{
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
ChildNodes:
[
{
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
ChildNodes:
[
{
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
ChildNodes:
[
{
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
ChildNodes:
[
{
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
ChildNodes:
[
{
EntityName: String,
ID: String,
ParentID: String,
Title: String,
Count: 0,
ImageKey: String,
Expanded: False,
Selected: False,
DisplayPath: String,
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
],
RegistrationPathElement: String,
QueryPathElement: String,
Path: String,
IsHierarchy: False
}
]
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Nodes: [ { ViewId: 00000000-0000-0000-0000-000000000000, ExplorerId: 00000000-0000-0000-0000-000000000000, ChildNodes: [ { ViewId: 00000000-0000-0000-0000-000000000000, ExplorerId: 00000000-0000-0000-0000-000000000000, ChildNodes: [ { ViewId: 00000000-0000-0000-0000-000000000000, ExplorerId: 00000000-0000-0000-0000-000000000000, EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, ChildNodes: [ { EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, ChildNodes: [ { EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, ChildNodes: [ { EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, ChildNodes: [ { EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, ChildNodes: [ { EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, ChildNodes: [ { EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, ChildNodes: [ { EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, ChildNodes: [ { EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, ChildNodes: [ { EntityName: String, ID: String, ParentID: String, Title: String, Count: 0, ImageKey: String, Expanded: False, Selected: False, DisplayPath: String, RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ], RegistrationPathElement: String, QueryPathElement: String, Path: String, IsHierarchy: False } ] }