AnalyticalGraphicsInc/czml-writer — pull request #66 by mramato (2014-05-19 19:01:24+00:00)
Title: Reference properties

This is still a work in progress, I wanted to get feedback from everyone (particularly @kring) to make sure I'm following the rules for schema generation. This adds a new value type, `reference` which allows a property to reference another property. For example, if I had an object with id `foo` and property `bar` and I wanted to reference it in an object with id `dealie`:

```
{
"id" : "dealie",
"someProperty" : {
"reference" {
"id" : "foo",
"path" : "bar"
}
}
}
```

A reference object itself (id/path combo) is not time-dynamic, but you can make different intervals point to different references over time.

```
{
"id" : "dealie",
"someProperty" : [{
"interval":"2012-03-15T10:00:00Z/2012-03-15T10:39:30Z",
"reference" {
"id" : "foo",
"path" : "bar"
}
},
{
"interval":"2012-03-15T10:39:30Z/2012-03-15T12:17:30Z",
"reference" {
"id" : "foo2",
"path" : "bar2"
}
}]
}
```

`path` should to be able to reference sub-properties as well:

```
{
"id" : "dealie",
"someProperty" : {
"reference" {
"id" : "foo",
"path" : "billboard.color"
}
}
}
```

I'm not sure about referencing an entire object like the below (which currently can't be generated by this change). We could make it work, but I'm not sure of it's usefulness (because it's all or nothing, not a partial subset like a style would be). I think we should have some sort of prototype/style handling rather than trying to use references for styles. (I can explain why if needed) Thoughts?
```
{
"id" : "dealie",
"billboard" : {
"reference" {
"id" : "foo",
"path" : "billboard"
}
}
}
```

I also plan to refactor `ReferenceListValue` to be a list of reference objects rather than a list of strings, but I wanted to get buy-in for this first.

Finally, I added a new `Reference` type in .NET to handle this, and an accompanying `CesiumWritingHelper` method.

P.S. I also removed `Camera.jsonscehema` which wasn't actually being used for anything.