C# Class BExIS.Xml.Helpers.Mapping.XmlSchemaManager

Datei anzeigen Open project: BEXIS2/Core Class Usage Examples

Public Properties

Property Type Description
Schema System.Xml.Schema.XmlSchema
SchemaSet System.Xml.Schema.XmlSchemaSet
mappingFileNameExport string
mappingFileNameImport string

Private Properties

Property Type Description
ConvertFacetToConstraint Constraint
ConvertStringToSystemType TypeCode
ConvertToConstraints List
GetAllAttributes List
GetAllComplexTypes List
GetAllElements List
GetAllGroups IEnumerable
GetAllRefElementNames IEnumerable
GetAllSimpleTypes List
GetDataType BExIS.Dlm.Entities.DataStructure.DataType
GetDescription string
GetDomainConstraint DomainConstraint
GetPatternConstraint PatternConstraint
GetRangeConstraint RangeConstraint
GetRangeConstraint RangeConstraint
GetTypeOfName string
IsRangeExist bool
addMetadataAttributeToMappingFile void
addMetadataAttributeToMetadataCompoundAttribute BExIS.Dlm.Entities.MetadataStructure.MetadataCompoundAttribute
addMetadataAttributeToMetadataPackageUsage void
addMetadataAttributesToMetadataCompoundAttribute BExIS.Dlm.Entities.MetadataStructure.MetadataCompoundAttribute
addMetadataAttributesToMetadataPackageUsage void
addToExportMappingFile BExIS.Xml.Models.Mapping.XmlMapper
addToImportMappingFile BExIS.Xml.Models.Mapping.XmlMapper
addToSchemaSet System.Xml.Schema.XmlSchemaSet
addUsageFromMetadataCompoundAttributeToMetadataCompoundAttribute BExIS.Dlm.Entities.MetadataStructure.MetadataCompoundAttribute
addUsageFromMetadataCompoundAttributeToPackage void
checkDirectory void
createMetadataAttribute BExIS.Dlm.Entities.MetadataStructure.MetadataAttribute
createMetadataCompoundAttribute BExIS.Dlm.Entities.MetadataStructure.MetadataCompoundAttribute
createMetadataCompoundAttribute BExIS.Dlm.Entities.MetadataStructure.MetadataCompoundAttribute
existXmlSchemaElement bool
findPathFromRoot string
generateXmlMappingFile System.Xml.XmlDocument
get BExIS.Dlm.Entities.MetadataStructure.MetadataCompoundAttribute
getExistingMetadataAttribute BExIS.Dlm.Entities.MetadataStructure.MetadataAttribute
getExistingMetadataCompoundAttribute BExIS.Dlm.Entities.MetadataStructure.MetadataCompoundAttribute
getExistingMetadataPackage BExIS.Dlm.Entities.MetadataStructure.MetadataPackage
isComplexTypeOnlyWithSimpleTpesAsChildrens bool
isSequence bool
verifyErrors void

Public Methods

Method Description
ConvertSimpleTypes ( ) : List>.Dictionary
Delete ( MetadataStructure metadataStructure ) : bool

Delete all depending xsdFiles under the workspace && all generated mapping files

Delete ( string schemaName ) : void
GenerateMetadataStructure ( string nameOfStartNode, string schemaName ) : long
GetAllComplextTypesWithSimpleTypesAsChildrens ( ) : List
GetAllElementsTypeIsSimpleType ( ) : List

Get all elements in a list which have a simpletype as type

GetAttributes ( XmlNode node ) : List

Get a list of all attributes from the xmlnode

GetIndexOfChild ( XmlNode node, XmlNode child ) : int
HasAttributes ( XmlNode node ) : bool

returns true if the xmlnode has attributes

IsSequence ( XmlNode node ) : bool

Check if the node is defined as a sequence in the schema

Load ( string path, string username ) : void

Load Schema from path

MoveFile ( string tempFile, string destinationPath ) : bool
XmlSchemaManager ( ) : System

Private Methods

Method Description
ConvertFacetToConstraint ( XmlSchemaObject facet, MetadataAttribute attr, List constraints ) : Constraint

length, minLength,maxLength,pattern,enumeration,whiteSpace,maxInclusive,maxExclusive,minExclusive,minInclusive,totalDigits,fractionDigits

ConvertStringToSystemType ( string dataType ) : TypeCode
ConvertToConstraints ( XmlSchemaObject restriction, MetadataAttribute attr ) : List
GetAllAttributes ( XmlSchema schema ) : List

Return a list of all elements in the schema

GetAllComplexTypes ( XmlSchema schema ) : List

Return a list of all complext types in the schema

GetAllElements ( XmlSchema schema ) : List

Return a list of all elements in the schema

GetAllGroups ( XmlSchema selectedSchema ) : IEnumerable
GetAllRefElementNames ( List elements ) : IEnumerable
GetAllSimpleTypes ( XmlSchema schema ) : List

Return a list of all elements in the schema

GetDataType ( string dataTypeAsString, string typeCodeName ) : DataType
GetDescription ( XmlSchemaAnnotation annotation ) : string
GetDomainConstraint ( XmlSchemaObject restriction, MetadataAttribute attr, string restrictionDescription ) : DomainConstraint
GetPatternConstraint ( string patternString, string description, bool negated, MetadataAttribute attr ) : PatternConstraint
GetRangeConstraint ( List constraints ) : RangeConstraint
GetRangeConstraint ( double min, double max, string description, bool negated, bool lowerBoundIncluded, bool upperBoundIncluded, MetadataAttribute attr ) : RangeConstraint
GetTypeOfName ( string name ) : string
IsRangeExist ( List constraints ) : bool
addMetadataAttributeToMappingFile ( MetadataCompoundAttribute compoundAttribute, XmlSchemaElement element, string internalXPath, string externalXPath ) : void
addMetadataAttributeToMetadataCompoundAttribute ( MetadataCompoundAttribute compoundAttribute, XmlSchemaElement element, string internalXPath, string externalXPath ) : MetadataCompoundAttribute
addMetadataAttributeToMetadataPackageUsage ( MetadataPackage packageUsage, XmlSchemaElement element, string internalXPath, string externalXPath ) : void
addMetadataAttributesToMetadataCompoundAttribute ( MetadataCompoundAttribute compoundAttribute, List elements, string internalXPath, string externalXPath ) : MetadataCompoundAttribute
addMetadataAttributesToMetadataPackageUsage ( MetadataPackage packageUsage, List elements, string internalXPath, string externalXPath ) : void
addToExportMappingFile ( XmlMapper mapper, string sourceXPath, string destinationXPath, decimal max, string name, string nameType ) : XmlMapper
addToImportMappingFile ( XmlMapper mapper, string sourceXPath, string destinationXPath, decimal max, string name, string nameType ) : XmlMapper
addToSchemaSet ( XmlSchemaObject xmlSchemaObject, XmlSchemaSet xmlSchemaSet ) : XmlSchemaSet
addUsageFromMetadataCompoundAttributeToMetadataCompoundAttribute ( MetadataCompoundAttribute parent, MetadataCompoundAttribute compoundAttribute, XmlSchemaElement element ) : MetadataCompoundAttribute
addUsageFromMetadataCompoundAttributeToPackage ( MetadataPackage package, MetadataCompoundAttribute compoundAttribute, XmlSchemaElement element ) : void
checkDirectory ( string filePath ) : void
createMetadataAttribute ( XmlSchemaElement element ) : MetadataAttribute
createMetadataCompoundAttribute ( XmlSchemaComplexType complexType ) : MetadataCompoundAttribute
createMetadataCompoundAttribute ( XmlSchemaElement element ) : MetadataCompoundAttribute
existXmlSchemaElement ( XmlSchemaObjectCollection collection ) : bool
findPathFromRoot ( XmlSchemaElement element, string name, string path ) : string
generateXmlMappingFile ( XmlMapper mapperInfos, string sourceName, string DestinationName, int direction ) : XmlDocument
get ( XmlSchemaElement element, List parents, string internalXPath, string externalXPath ) : MetadataCompoundAttribute
getExistingMetadataAttribute ( string name ) : MetadataAttribute
getExistingMetadataCompoundAttribute ( string name ) : MetadataCompoundAttribute
getExistingMetadataPackage ( string name ) : MetadataPackage
isComplexTypeOnlyWithSimpleTpesAsChildrens ( XmlSchemaComplexType type ) : bool
isSequence ( XmlSchemaObject element ) : bool
verifyErrors ( object sender, ValidationEventArgs args ) : void

Method Details

ConvertSimpleTypes() public method

public ConvertSimpleTypes ( ) : List>.Dictionary
return List>.Dictionary

Delete() public static method

Delete all depending xsdFiles under the workspace && all generated mapping files
public static Delete ( MetadataStructure metadataStructure ) : bool
metadataStructure BExIS.Dlm.Entities.MetadataStructure.MetadataStructure
return bool

Delete() public method

public Delete ( string schemaName ) : void
schemaName string
return void

GenerateMetadataStructure() public method

public GenerateMetadataStructure ( string nameOfStartNode, string schemaName ) : long
nameOfStartNode string
schemaName string
return long

GetAllComplextTypesWithSimpleTypesAsChildrens() public method

public GetAllComplextTypesWithSimpleTypesAsChildrens ( ) : List
return List

GetAllElementsTypeIsSimpleType() public method

Get all elements in a list which have a simpletype as type
public GetAllElementsTypeIsSimpleType ( ) : List
return List

GetAttributes() public method

Get a list of all attributes from the xmlnode
public GetAttributes ( XmlNode node ) : List
node System.Xml.XmlNode
return List

GetIndexOfChild() public method

public GetIndexOfChild ( XmlNode node, XmlNode child ) : int
node System.Xml.XmlNode
child System.Xml.XmlNode
return int

HasAttributes() public method

returns true if the xmlnode has attributes
public HasAttributes ( XmlNode node ) : bool
node System.Xml.XmlNode
return bool

IsSequence() public method

Check if the node is defined as a sequence in the schema
public IsSequence ( XmlNode node ) : bool
node System.Xml.XmlNode xmlnode to check
return bool

Load() public method

Load Schema from path
public Load ( string path, string username ) : void
path string
username string
return void

MoveFile() public static method

public static MoveFile ( string tempFile, string destinationPath ) : bool
tempFile string
destinationPath string
return bool

XmlSchemaManager() public method

public XmlSchemaManager ( ) : System
return System

Property Details

Schema public_oe property

public XmlSchema,System.Xml.Schema Schema
return System.Xml.Schema.XmlSchema

SchemaSet public_oe property

public XmlSchemaSet,System.Xml.Schema SchemaSet
return System.Xml.Schema.XmlSchemaSet

mappingFileNameExport public_oe property

public string mappingFileNameExport
return string

mappingFileNameImport public_oe property

public string mappingFileNameImport
return string