Members
datasets :object
Datasets, dataset = entity + relations + projection
- Source:
Type:
-
object
entities :object.<string, Entity>
Entities in this schema, map of <entityName, entityObject>
- Source:
Type:
-
object.<string, Entity>
types :object.<String, Object>
Types in this schema, map of <typeName, typeInfo>
- Source:
Type:
-
object.<String, Object>
Methods
addEntity(entity) → {Schema}
Add an entity into the schema
- Source:
Parameters:
Name | Type | Description |
---|---|---|
entity |
Entity
|
Returns:
- Type:
-
Schema
addType(type, typeLocation) → {Schema}
Add an type into the schema
- Source:
Parameters:
Name | Type | Description |
---|---|---|
type |
*
|
|
typeLocation |
*
|
Returns:
- Type:
-
Schema
addView(view) → {Schema}
Add a view into the schema
- Source:
Parameters:
Name | Type | Description |
---|---|---|
view |
View
|
Returns:
- Type:
-
Schema
ensureGetEntity(refererModule, entityName)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
refererModule |
*
|
|
entityName |
*
|
getDocumentHierachy(fromModule, datasetName) → {object}
Get a document hierarchy
- Source:
Parameters:
Name | Type | Description |
---|---|---|
fromModule |
object
|
|
datasetName |
string
|
Returns:
- Type:
-
object
getReferencedEntity(refererModule, entityName) → {Entity}
Get the referenced entity, add it into schema if not in schema
- Source:
Parameters:
Name | Type | Description |
---|---|---|
refererModule |
object
|
|
entityName |
string
|
Returns:
- Type:
-
Entity
hasEntity(entityName) → {boolean}
Check whether a entity with given name is in the schema
- Source:
Parameters:
Name | Type | Description |
---|---|---|
entityName |
string
|
Returns:
- Type:
-
boolean
hasView(viewName) → {boolean}
Check whether a view with given name is in the schema
- Source:
Parameters:
Name | Type | Description |
---|---|---|
viewName |
string
|
Returns:
- Type:
-
boolean
toJSON() → {object}
Translate the schema into a plain JSON object
- Source:
Returns:
- Type:
-
object