Class ClassDefinition
Represents a FDO class definition. A Class Definition defines the structure of features that originate from it in feature queries. Class Definitions usually contain a Geometry property for spatial features.
Class Definitions belong to a Feature Schema
Implements
Inherited Members
Namespace: OSGeo.MapGuide.MaestroAPI.Schema
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public sealed class ClassDefinition : SchemaElement, IFdoSerializable
Constructors
| Improve this Doc View SourceClassDefinition(String, String)
Initializes a new instance of the ClassDefinition class.
Declaration
public ClassDefinition(string name, string description)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | description | The description. |
Properties
| Improve this Doc View SourceBaseClass
Gets or sets the base class
Declaration
public ClassDefinition BaseClass { get; set; }
Property Value
Type | Description |
---|---|
ClassDefinition |
DefaultGeometryPropertyName
Gets or sets the name of the default geometry property.
Declaration
public string DefaultGeometryPropertyName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IdentityProperties
Gets the identity properties
Declaration
public ReadOnlyCollection<DataPropertyDefinition> IdentityProperties { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<DataPropertyDefinition> |
IsAbstract
Gets or sets whether this is abstract
Declaration
public bool IsAbstract { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsComputed
Gets or sets whether this is computed. Computed classes should have its properties checked out (and possibly modified) before serving as a basis for a new class definition
Declaration
public bool IsComputed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Int32]
Gets the property definition at the specified index
Declaration
public PropertyDefinition this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
PropertyDefinition |
Parent
Gets the parent schema
Declaration
public FeatureSchema Parent { get; }
Property Value
Type | Description |
---|---|
FeatureSchema |
Properties
Gets the properties
Declaration
public ReadOnlyCollection<PropertyDefinition> Properties { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<PropertyDefinition> |
QualifiedName
Gets the qualified name of this class. The qualified name takes the form [Schema Name]:[Class Name]
Declaration
public string QualifiedName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceAddProperty(DataPropertyDefinition, Boolean)
Adds the specified data property, with an option to include it as an identity property
Declaration
public void AddProperty(DataPropertyDefinition prop, bool identity)
Parameters
Type | Name | Description |
---|---|---|
DataPropertyDefinition | prop | |
System.Boolean | identity |
AddProperty(PropertyDefinition)
Adds the specified property definition
Declaration
public void AddProperty(PropertyDefinition prop)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | prop |
ClearIdentityProperties()
Removes the assigned identity properties
Declaration
public void ClearIdentityProperties()
Clone(ClassDefinition)
Creates a clone of the specified instance
Declaration
public static ClassDefinition Clone(ClassDefinition source)
Parameters
Type | Name | Description |
---|---|---|
ClassDefinition | source | The instance to clone. |
Returns
Type | Description |
---|---|
ClassDefinition |
FindProperty(String)
Gets a Property Definition by its name
Declaration
public PropertyDefinition FindProperty(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
PropertyDefinition | The matching property definition. null if none found |
GetOrdinal(String)
Gets the ordinal of the specified property name
Declaration
public int GetOrdinal(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The property name. |
Returns
Type | Description |
---|---|
System.Int32 |
IndexOfProperty(PropertyDefinition)
Gets the index of the specified property
Declaration
public int IndexOfProperty(PropertyDefinition prop)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | prop |
Returns
Type | Description |
---|---|
System.Int32 |
RemoveProperty(PropertyDefinition)
Removes the specified property from the properties collection. If it is a data property definition, it is also removed from the identity properties collection
Declaration
public bool RemoveProperty(PropertyDefinition prop)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | prop |
Returns
Type | Description |
---|---|
System.Boolean |
RemoveProperty(String)
Removes the property definition of the specified name. If it is a data property it is also removed from the identity properties (if it is specified as one)
Declaration
public void RemoveProperty(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName |
RemovePropertyAt(Int32)
Removes the property definition at the specified index. If it is a data property is is also removed from the identity properties (if it is specified as one)
Declaration
public void RemovePropertyAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Explicit Interface Implementations
| Improve this Doc View SourceIFdoSerializable.ReadXml(XmlNode, XmlNamespaceManager)
Set the current element's content from the current XML node
Declaration
void IFdoSerializable.ReadXml(XmlNode node, XmlNamespaceManager mgr)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlNode | node | |
System.Xml.XmlNamespaceManager | mgr |
IFdoSerializable.WriteXml(XmlDocument, XmlNode)
Writes the current element's content
Declaration
void IFdoSerializable.WriteXml(XmlDocument doc, XmlNode currentNode)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlDocument | doc | |
System.Xml.XmlNode | currentNode |