Class DataSchema
Represents an XSD document attached to a service version.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public class DataSchema : DomainObjectBase, IValidator, IExtensibleDataObject, IEquatable<DataSchema>
Constructors
DataSchema()
Initializes an empty instance.
Declaration
public DataSchema()
DataSchema(JSchema)
Initializes new instance from provided Newtonsoft.Json.Schema.JSchema object.
Declaration
public DataSchema(JSchema schema)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.Schema.JSchema | schema | JSON schema to be initialized from. |
DataSchema(XmlSchema)
Initializes new instance from provided XmlSchema object.
Declaration
public DataSchema(XmlSchema schema)
Parameters
Type | Name | Description |
---|---|---|
XmlSchema | schema | XML schema to be initialized from. |
Properties
ContentJsonSchema
Gets or sets the schema content as Newtonsoft.Json.Schema.JSchema object.
Declaration
public JSchema ContentJsonSchema { get; set; }
Property Value
Type | Description |
---|---|
Newtonsoft.Json.Schema.JSchema |
ContentText
Gets or sets the schema content in the original text format.
Declaration
public string ContentText { get; set; }
Property Value
Type | Description |
---|---|
String |
ContentXmlSchema
Gets or sets the schema content as XmlSchema object.
Declaration
public XmlSchema ContentXmlSchema { get; set; }
Property Value
Type | Description |
---|---|
XmlSchema |
IsPopulated
Gets or sets a flag indicating that actual schema content is populated.
Declaration
public bool IsPopulated { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Namespace
Gets or sets the schema's target namespace.
Declaration
public string Namespace { get; set; }
Property Value
Type | Description |
---|---|
String |
ObjectType
Gets object type identifier.
Declaration
public override EntityType ObjectType { get; }
Property Value
Type | Description |
---|---|
EntityType |
Overrides
SchemaType
Gets or sets the type of the stored schema (XSD or JSON Schema).
Declaration
public DataSchemaType SchemaType { get; set; }
Property Value
Type | Description |
---|---|
DataSchemaType |
ServiceVersionId
Gets or sets the identifier of the service version this schema is attached to.
Declaration
public int ServiceVersionId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
Equals(DataSchema)
Determines whether the specified header is equal to the current header.
Declaration
public bool Equals(DataSchema other)
Parameters
Type | Name | Description |
---|---|---|
DataSchema | other | The header to compare with the current header. |
Returns
Type | Description |
---|---|
Boolean | True, if headers are equal. False, if headers are not equal. |
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | True, if objects are equal. False, if objects are not equal. |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Hash code of the current instance. |
Overrides
GetSchemaElements()
Returns collection of global element names contained in this schema.
Declaration
public Collection<QualifiedName> GetSchemaElements()
Returns
Type | Description |
---|---|
Collection<QualifiedName> | For XML schema: collection of global elements qualified names. For JSON schema: collection of JSON pointers with corresponding schema identifiers to the root type and types defined under #/definitions tree. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that represents the current object. |
Overrides
Validate()
Evaluates the state of this object.
Declaration
public override bool Validate()
Returns
Type | Description |
---|---|
Boolean | True if state is valid; otherwise, false. |