VieSchemaBuilder
class VieSchemaBuilder (View source)
Generate a schema in JSON format for the VIE dataTypes validation, necessary when using nodes as semantic types.
Example schema: http://schema.rdfs.org/all.json
Properties
protected NodeTypeManager | $nodeTypeManager | ||
protected array | $properties | ||
protected array | $types | ||
protected object | $configuration | ||
protected array | $superTypeConfiguration |
Methods
Converts the nodes types to a fully structured array in the same structure as the schema to be created.
Adds a property to the list of known properties
Cleans up all types which are not know in given configuration array
Return all sub node types of a node type (recursively)
Return all ancestors of a node type
Details
object
generateVieSchema()
Converts the nodes types to a fully structured array in the same structure as the schema to be created.
The schema also includes abstract node types for the full inheritance information in VIE.
protected void
readNodeTypeConfiguration(string $nodeTypeName, NodeType $nodeType)
No description
protected void
addProperty(string $nodeType, string $propertyName, array $propertyConfiguration)
Adds a property to the list of known properties
protected void
removeUndeclaredTypes(array $configuration)
Cleans up all types which are not know in given configuration array
protected array
getAllSubtypes(string $type)
Return all sub node types of a node type (recursively)
protected array
getAllAncestors(string $type)
Return all ancestors of a node type