Schema

Schema

new Schema()

Geml schema class.

Source:

Members

comment :string

Source:
Type:
  • string

datasets :object

Datasets, dataset = entity + relations + projection

Source:
Type:
  • object

displayName :string

Source:
Type:
  • string

entities :object.<string, Entity>

Entities in this schema, map of <entityName, entityObject>

Source:
Type:

info :object

Raw metadata

Source:
Type:
  • object

linker :Linker

Linker to process this schema

Source:
Type:

name :string

Name of this entity

Source:
Type:
  • string

types :object.<String, Object>

Types in this schema, map of <typeName, typeInfo>

Source:
Type:
  • object.<String, Object>

views :object

Views, view = dataset + filters

Source:
Type:
  • object

xemlModule :object

Owner geml module

Source:
Type:
  • 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

clone() → {Schema}

Clone the schema

Source:
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

Start linking this schema

Source:
Returns:
Type:
Schema

toJSON() → {object}

Translate the schema into a plain JSON object

Source:
Returns:
Type:
object

Schema

new Schema(linker, name, info)

Source:
Parameters:
Name Type Description
linker Linker
name string
info object

Members

comment :string

Source:
Type:
  • string

datasets :object

Datasets, dataset = entity + relations + projection

Source:
Type:
  • object

displayName :string

Source:
Type:
  • string

entities :object.<string, Entity>

Entities in this schema, map of <entityName, entityObject>

Source:
Type:

info :object

Raw metadata

Source:
Type:
  • object

linker :Linker

Linker to process this schema

Source:
Type:

name :string

Name of this entity

Source:
Type:
  • string

types :object.<String, Object>

Types in this schema, map of <typeName, typeInfo>

Source:
Type:
  • object.<String, Object>

views :object

Views, view = dataset + filters

Source:
Type:
  • object

xemlModule :object

Owner geml module

Source:
Type:
  • 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

clone() → {Schema}

Clone the schema

Source:
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

Start linking this schema

Source:
Returns:
Type:
Schema

toJSON() → {object}

Translate the schema into a plain JSON object

Source:
Returns:
Type:
object