Guðmundur,

There are 3 things that can potentially get nested / hierarchical / deep:

1. The (abstract) data model: the Exhibit data model is a graph data 
model. Thus it can also describe trees (read, hierarchical).

2. The syntax in which the data model is serialized: the Exhibit JSON 
syntax is NOT hierarchical. It is flat (read, list of items). In order 
to describe a graph model in the Exhibit JSON syntax, you link the items 
by their IDs. For example,

    { label: "Homer Simpson",
       fatherOf: [ "Lisa Simpson", "Bart Simpson", "Maggie Simpson" ],
       marriedTo: "Marge Simpson"
    },
    { label: "Bart Simpson",
       age:   9,
       sonOf: [ "Homer Simpson", "Marge Simpson" ],
       brotherOf: [ "Lisa Simpson", "Maggie Simpson" ]
    }

(An item's ID is the same as its label if no "id" property is explicitly 
given.) You can see that this lets us model quite a complex graph. If 
you want to model a tree, then think of it as a graph, and flatten it 
into a list of interlinking items.

3. The renditions of the data: Exhibit lens templates are not 
automatically nested, but you can explicitly specify hierarchical lens 
templates.

Hope that helps,

David


Guðmundur Árni Þórisson wrote:
> Hi all. Sorry for my apparent ignorance, but I've just started using  
> Exhibit and don't quite know all the nuances involved. Basically, I  
> think I can make great use of the Exhibit/JSON combination with very  
> little effort, IF it can accommodate my existing nested-relations  
> data structures).
>    One restriction for me seems to be the property=>value in the JSON  
> structure and the way it is used in Exhibit expressions. I want to  
> ask the following: is there a way to get to the intervals of a  
> property-value which is actually a hash, not a simple value? Here''s  
> the HTML I am trying to get working, see a sample data structure below.
>
>        <div ex:role="view"
>            ex:viewClass="TabularView"
>             
> ex:columns=".Study.Title, .LocalID, .ParentSamplepanelID.LocalID, .Total 
> NumberOfIndividuals, .GeographicRegionInfo"
>            ex:columnLabels="Study, Panel name, Parent panel, No.  
> Individuals, Geographic region"
>            ex:columnFormats="text, text, text, text, number, text"
>            ex:sortColumn="1"
>            ex:sortAscending="false">
>        </div>
>
> I am essentially trying to access the 'Title' attribute of the  
> 'Study' item-of-sorts which is a hash embedded in the 'Samplepanel'  
> main item. When I do the above I get nothing in the first field of my  
> table. If I use just the '.Study' expression  I get the 'Object  
> object'  string which is presumably some generic stringified version  
> of the Study data structure?
>
>    I guess my question boils down to this: can Exhibit JSON data  
> structures for items be deeper than just simple property/value pairs  
> or not?
>
>
>    Best regards,
>
>                     Mummi, Leicester
>
>
> {
>     "types" : {
>        "Samplepanel" : {
>           "pluralLabel" : "Samplepanels"
>        }
>     },
>     "properties" : {
>      "Study" : {valueType : "item"}
>    },
>     "items" : [
>        {
>           "type" : "Samplepanel",
>           "label" : "PLCO_cohort",
>           "GeographicRegionInfo" : "NORTH AMERICA",
>           "id" : "1818",
>           "SamplingAgeRange" : "55-74",
>           "Composition" : "",
>           "LocalID" : "PLCO_cohort",
>           "TotalNumberOfIndividuals" : "155000",
>           "EthnicityInfo" : "White, non-Hispanic",
>           "DNAsArePooled" : "Undefined",
>           "NumberOfSexFemale" : "0",
>           "SamplepanelID" : "1818",
>           "NumberOfSexMale" : "0",
>           "Study" : {
>              "SubmissionDate" : "2007-03-15",
>              "StudyID" : "HGVST00003",
>              "Title" : "NCI CGEMS study of Prostate Cancer, Phase 1A"
>           },
>           "DNAsAreWGA" : "Undefined"
>        },
>
>
> -----------------------------------------------------------
> Gudmundur A. Thorisson, PhD student, Brookes lab
>   Department of Genetics
>   University of Leicester
>   University Road
>   Leicester, LE1 7RH, UK
>   E-mail: [EMAIL PROTECTED]
>   Tel: +44 (0)116 252-3055
>
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>   

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to