bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
GenericSchemaDocument< ValueT, Allocator > Class Template Reference

JSON schema document. More...

#include <schema.h>

Inheritance diagram for GenericSchemaDocument< ValueT, Allocator >:
Inheritance graph
Collaboration diagram for GenericSchemaDocument< ValueT, Allocator >:
Collaboration graph

Public Types

typedef Allocator AllocatorType
 
typedef EncodingType::Ch Ch
 
typedef ValueType::EncodingType EncodingType
 
typedef IGenericRemoteSchemaDocumentProvider< GenericSchemaDocumentIRemoteSchemaDocumentProviderType
 
typedef GenericPointer< ValueType, AllocatorPointerType
 
typedef internal::Schema< GenericSchemaDocumentSchemaType
 
typedef GenericValue< EncodingType, AllocatorURIType
 
typedef ValueT ValueType
 

Public Member Functions

 GenericSchemaDocument (const ValueType &document, const Ch *uri=0, SizeType uriLength=0, IRemoteSchemaDocumentProviderType *remoteProvider=0, Allocator *allocator=0)
 Constructor.
 
const SchemaTypeGetRoot () const
 Get the root schema.
 
const URITypeGetURI () const
 
 ~GenericSchemaDocument ()
 Destructor.
 

Friends

template<typename, typename, typename>
class GenericSchemaValidator
 
class internal::Schema< GenericSchemaDocument >
 

Detailed Description

template<typename ValueT, typename Allocator = CrtAllocator>
class GenericSchemaDocument< ValueT, Allocator >

JSON schema document.

A JSON schema document is a compiled version of a JSON schema. It is basically a tree of internal::Schema.

Note
This is an immutable class (i.e. its instance cannot be modified after construction).
Template Parameters
ValueTType of JSON value (e.g. Value ), which also determine the encoding.
AllocatorAllocator type for allocating memory of this document.

Definition at line 1501 of file schema.h.

Member Typedef Documentation

◆ AllocatorType

template<typename ValueT, typename Allocator = CrtAllocator>
typedef Allocator GenericSchemaDocument< ValueT, Allocator >::AllocatorType

Definition at line 1505 of file schema.h.

◆ Ch

template<typename ValueT, typename Allocator = CrtAllocator>
typedef EncodingType::Ch GenericSchemaDocument< ValueT, Allocator >::Ch

Definition at line 1507 of file schema.h.

◆ EncodingType

template<typename ValueT, typename Allocator = CrtAllocator>
typedef ValueType::EncodingType GenericSchemaDocument< ValueT, Allocator >::EncodingType

Definition at line 1506 of file schema.h.

◆ IRemoteSchemaDocumentProviderType

template<typename ValueT, typename Allocator = CrtAllocator>
typedef IGenericRemoteSchemaDocumentProvider<GenericSchemaDocument> GenericSchemaDocument< ValueT, Allocator >::IRemoteSchemaDocumentProviderType

Definition at line 1504 of file schema.h.

◆ PointerType

template<typename ValueT, typename Allocator = CrtAllocator>
typedef GenericPointer<ValueType, Allocator> GenericSchemaDocument< ValueT, Allocator >::PointerType

Definition at line 1509 of file schema.h.

◆ SchemaType

template<typename ValueT, typename Allocator = CrtAllocator>
typedef internal::Schema<GenericSchemaDocument> GenericSchemaDocument< ValueT, Allocator >::SchemaType

Definition at line 1508 of file schema.h.

◆ URIType

template<typename ValueT, typename Allocator = CrtAllocator>
typedef GenericValue<EncodingType, Allocator> GenericSchemaDocument< ValueT, Allocator >::URIType

Definition at line 1510 of file schema.h.

◆ ValueType

template<typename ValueT, typename Allocator = CrtAllocator>
typedef ValueT GenericSchemaDocument< ValueT, Allocator >::ValueType

Definition at line 1503 of file schema.h.

Constructor & Destructor Documentation

◆ GenericSchemaDocument()

template<typename ValueT, typename Allocator = CrtAllocator>
GenericSchemaDocument< ValueT, Allocator >::GenericSchemaDocument ( const ValueType & document,
const Ch * uri = 0,
SizeType uriLength = 0,
IRemoteSchemaDocumentProviderType * remoteProvider = 0,
Allocator * allocator = 0 )
inlineexplicit

Constructor.

Compile a JSON document into schema document.

Parameters
documentA JSON document as source.
uriThe base URI of this schema document for purposes of violation reporting.
uriLengthLength of name, in code points.
remoteProviderAn optional remote schema document provider for resolving remote reference. Can be null.
allocatorAn optional allocator instance for allocating memory. Can be null.

Definition at line 1525 of file schema.h.

◆ ~GenericSchemaDocument()

template<typename ValueT, typename Allocator = CrtAllocator>
GenericSchemaDocument< ValueT, Allocator >::~GenericSchemaDocument ( )
inline

Destructor.

Definition at line 1591 of file schema.h.

Member Function Documentation

◆ GetRoot()

template<typename ValueT, typename Allocator = CrtAllocator>
const SchemaType & GenericSchemaDocument< ValueT, Allocator >::GetRoot ( ) const
inline

Get the root schema.

Definition at line 1606 of file schema.h.

◆ GetURI()

template<typename ValueT, typename Allocator = CrtAllocator>
const URIType & GenericSchemaDocument< ValueT, Allocator >::GetURI ( ) const
inline

Definition at line 1603 of file schema.h.

Friends And Related Symbol Documentation

◆ GenericSchemaValidator

template<typename ValueT, typename Allocator = CrtAllocator>
template<typename, typename, typename>
friend class GenericSchemaValidator
friend

Definition at line 1513 of file schema.h.

◆ internal::Schema< GenericSchemaDocument >

template<typename ValueT, typename Allocator = CrtAllocator>
friend class internal::Schema< GenericSchemaDocument >
friend

Definition at line 1510 of file schema.h.


The documentation for this class was generated from the following files: