bio4j/angulillos — pull request #18 by eparejatobes (2014-10-09 16:10:17+00:00)
Title: Additional schema restrictions

Hey guys! @pablopareja @eparejatobes

What about adding some more restrictions here? We've decided [somewhere](https://github.com/bio4j/el-grafo/blob/master/docs/SchemaJSON.md) that the graph should have these things:

For edges (defaults are **bold**):
+ `in-arity`: one/**many**
_`node.in(label)` gives you an `Option` or a `List` of results_
+ `out-arity`: one/**many**
_`node.out(label)` gives you an `Option` or a `List` of results_
+ `always defined`: yes/**no**
_whether **every** source node has to have an edge with this label_
+ `locally unique`: yes/**no**
_any two particular nodes cannot have more than one edge with this label_
+ `indexed by`: ``
_see also [titan manual](https://github.com/thinkaurelius/titan/wiki/Type-Definition-Overview#sortkeytitantype-and-signaturetitantype)_
+ `sorted by`: ``
_arguable, doesn't make sense without index, maybe should be somewhere else_

For property types:
+ data type
+ _maybe_ "uniqueness" property, stating that no two edges can have the same value of this property ([like in titan](https://github.com/thinkaurelius/titan/wiki/Type-Definition-Overview#unique))

At the moment, edges have only in/out types and arities, and poperties have only type.

_indexed by_ and _sorted by_ are arguable, but others are easy to add with the default values. What do you think?