<?xml version="1.0" encoding="utf-8"?>
<!--
 *	CFAsterisk
 *
 *	Copyright (c) 2014-2017 Mark Sobkow
 *	
 *	This program is available as free software under the GNU GPL v 2.0, or
 *	under a commercial license from Mark Sobkow.  For commercial licensing
 *	details, please contact msobkow@sasktel.net.
 *	
 *	Under the terms of the GPL:
 *	
 *		This program is free software: you can redistribute it and/or modify
 *		it under the terms of the GNU General Public License as published by
 *		the Free Software Foundation, either version 2.0 of the License, or
 *		(at your option) any later version.
 *	  
 *		This program is distributed in the hope that it will be useful,
 *		but WITHOUT ANY WARRANTY; without even the implied warranty of
 *		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *		GNU General Public License for more details.
 *	  
 *		You should have received a copy of the GNU General Public License
 *		along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *-->
<MSSBam
		xmlns="uri://msscodefactory/mssbam"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xmlns:xs="http://www.w3.org/2001/XMLSchema"
		xsi:schemaLocation="uri://msscodefactory/mssbam file:../bin/xsd/mssbam-2.9.xsd"
		Name="CFAsterisk"
		Revision="2.10"
		Description="CFAsterisk"
		ProjectRoot="net.sourceforge.MSSCodeFactory.CFAsterisk.2.10" >
	<Tld Name="org" >
		<TopDomain Name="apache" >
			<License Name="ApacheV2"
					Description="Apache Version 2 License">
Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
    http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</License>
		</TopDomain>
		<TopDomain Name="gnu" >
			<License Name="GplV2"
					Description="GNU GPL v2+ License">
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
.
This project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this project.  If not, see http://www.gnu.org/licenses/.</License>
			<License Name="GplV3"
					Description="GNU GPL v3+ License">
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this project.  If not, see http://www.gnu.org/licenses/.</License>
			<License Name="LGplV2"
					Description="GNU Lesser/Library GPL v2+ License">
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
.
This project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser Public License for more details.
.
You should have received a copy of the GNU Lesser Public License
along with this project.  If not, see http://www.gnu.org/licenses/.</License>
			<License Name="LGplV3"
					Description="GNU Lesser/Library GPL v3+ License">
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser Public License for more details.
.
You should have received a copy of the GNU Lesser Public License
along with this project.  If not, see http://www.gnu.org/licenses/.</License>
		</TopDomain>
	</Tld>
	<Tld Name="net" >
		<TopDomain Name="sourceforge" >
			<TopProject Name="MSSCodeFactory" >
				<SubProject Name="CFAsterisk" >
					<MajorVersion Name="2" >
						<MinorVersion Name="10" >
<SchemaDef Name="CFAsterisk"
		DbName="CFAst210"
		Description=""
		DefaultLicense="org.apache.ApacheV2"
		ExtendCFCore="true"
		CopyrightHolder="Mark Sobkow"
		CopyrightPeriod="2014-2017"
		AuthorEMail="msobkow@sasktel.net"
		ProjectURL="http://msscodefactory.sourceforge.net/"
		PublishURI="http://msscodefactory.sourceforge.net/model-2.9/net-sourceforge-MSSCodeFactory-CFAsterisk-2-10-CFAsterisk.xml" >

	<SchemaRef Name="CFSecurity"
			RefModelName="net-sourceforge-MSSCodeFactory-CFSecurity-2-10-CFSecurity"
			IncludeRoot="net.sourceforge.MSSCodeFactory.CFSecurity.2.10.CFSecurity" />

	<SchemaRef Name="CFInternet"
			RefModelName="net-sourceforge-MSSCodeFactory-CFInternet-2-10-CFInternet"
			IncludeRoot="net.sourceforge.MSSCodeFactory.CFInternet.2.10.CFInternet" />

	<Id64Gen Name="ConfigurationFileIdGen"
			IsNullable="false"
			DefaultVisibility="true"
			DbName="conf_file_idgen"
			MinValue="0"
			InitValue="0"
			NullValue="0"
			Dispenser="Cluster"
			Slice="3000"
			BlockSize="1" />

	<Table Name="ConfigurationFile"
			TableClassCode="CONF"
			DbName="conf_file"
			Label="Configuration File"
			Description="A configuration file appearing on the file system"
			DefaultVisibility="true"
			IsInstantiable="false"
			HasHistory="true"
			HasAuditColumns="true"
			LookupIndex="ConfigurationFileNameIdx"
			LoaderBehaviour="Update"
			SecScope="Cluster" >
		<TableCol Name="ClusterId"
				Label="Cluster Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ClusterIdGen" />
		<TableCol Name="Id"
				IsNullable="false"
				DefaultVisibility="true"
				GenerateId="true"
				DataType="ConfigurationFileIdGen" />
		<TableCol Name="HostNodeId"
				Label="Host Node Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="HostNodeIdGen" />
		<StringCol Name="FileFullName"
				IsNullable="false"
				DefaultVisibility="true"
				DbName="f_fullname"
				MaxLen="512"
				ShowLines="1"
				InitValue="" />
		<PrimaryIndex Name="ConfigurationFileIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="conf_file_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Configuration File Primary Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="Id" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="ConfigurationFileClusterIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="conf_file_xclus"
				ShortName="ConfFileClusIdx"
				Suffix="ClusterIdx"
				Label="Cluster Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="ConfigurationFileHostNodeIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="conf_file_xhost"
				ShortName="ConfFileHostIdx"
				Suffix="HostIdx"
				Label="Host Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="HostNodeId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<Index Name="ConfigurationFileNameIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="conf_file_xuname"
				ShortName="UNameIdx"
				Suffix="UNameIdx"
				Label="Unique Name Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="HostNodeId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="FileFullName" IsAscending="true" DefaultVisibility="true" />
		</Index>
	</Table>

	<Table Name="ExtConfigConf"
			TableClassCode="CECC"
			DbName="extcnf_conf"
			Label="Asterisk extconfig.conf"
			Description="Asterisk extconfig.conf file"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Update"
			SecScope="Cluster" >
		<TableCol Name="ClusterId"
				Label="Cluster Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ClusterIdGen" />
		<TableCol Name="Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ConfigurationFileIdGen" />
		<TextCol Name="FileContents"
				IsNullable="false"
				DefaultVisibility="true"
				MaxLen="2000000"
				ShowLines="5"
				InitValue="" />
		<PrimaryIndex Name="ExtConfigConfIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="extconfig_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Configuration File Primary Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="Id" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="ExtConfigConfClusterIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="extconfig_xclus"
				ShortName="ConfClusIdx"
				Suffix="ExtCnfClusIdx"
				Label="Cluster Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<SuperClassRelation Name="SuperClass"
				DbName="extconfig_super"
				Label="SuperClass"
				Suffix="SuperClass"
				FromIndex="ExtConfigConfIdIdx"
				ToIndex="ConfigurationFile.ConfigurationFileIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="ClusterId" ToCol="ClusterId" DefaultVisibility="true" />
			<RelationCol Name="Id" ToCol="Id" DefaultVisibility="true" />
		</SuperClassRelation>
	</Table>

	<Table Name="ExtensionsConf"
			TableClassCode="CEXT"
			DbName="ext_conf"
			Label="Asterisk extensions.conf"
			Description="Asterisk extensions.conf file"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Update"
			SecScope="Cluster" >
		<TableCol Name="ClusterId"
				Label="Cluster Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ClusterIdGen" />
		<TableCol Name="Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ConfigurationFileIdGen" />
		<TextCol Name="FileContents"
				IsNullable="false"
				DefaultVisibility="true"
				MaxLen="2000000"
				ShowLines="5"
				InitValue="" />
		<PrimaryIndex Name="ExtensionsConfIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="extensionsconf_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Configuration File Primary Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="Id" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="ExtensionsConfClusterIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="extensionsconf_xclus"
				ShortName="ConfClusIdx"
				Suffix="ExtClusterIdx"
				Label="Cluster Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<SuperClassRelation Name="SuperClass"
				DbName="extensionsconf_super"
				Label="SuperClass"
				Suffix="SuperClass"
				FromIndex="ExtensionsConfIdIdx"
				ToIndex="ConfigurationFile.ConfigurationFileIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="ClusterId" ToCol="ClusterId" DefaultVisibility="true" />
			<RelationCol Name="Id" ToCol="Id" DefaultVisibility="true" />
		</SuperClassRelation>
	</Table>

	<Table Name="SipConf"
			TableClassCode="CSIP"
			DbName="sip_conf"
			Label="Asterisk sip.conf"
			Description="Asterisk sip.conf file"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Update"
			SecScope="Cluster" >
		<TableCol Name="ClusterId"
				Label="Cluster Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ClusterIdGen" />
		<TableCol Name="Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ConfigurationFileIdGen" />
		<TextCol Name="FileContents"
				IsNullable="false"
				DefaultVisibility="true"
				MaxLen="2000000"
				ShowLines="5"
				InitValue="" />
		<PrimaryIndex Name="SipConfIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="sipconf_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Configuration File Primary Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="Id" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="SipConfClusterIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="sipconf_xclus"
				ShortName="ConfClusIdx"
				Suffix="SipClusterIdx"
				Label="Cluster Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<SuperClassRelation Name="SuperClass"
				DbName="sipconf_super"
				Label="SuperClass"
				Suffix="SuperClass"
				FromIndex="SipConfIdIdx"
				ToIndex="ConfigurationFile.ConfigurationFileIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="ClusterId" ToCol="ClusterId" DefaultVisibility="true" />
			<RelationCol Name="Id" ToCol="Id" DefaultVisibility="true" />
		</SuperClassRelation>
	</Table>

	<Table Name="VoicemailConf"
			TableClassCode="CVOM"
			DbName="vm_conf"
			Label="Asterisk voicemail.conf"
			Description="Asterisk voicemail.conf file"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Update"
			SecScope="Cluster" >
		<TableCol Name="ClusterId"
				Label="Cluster Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ClusterIdGen" />
		<TableCol Name="Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ConfigurationFileIdGen" />
		<TextCol Name="FileContents"
				IsNullable="false"
				DefaultVisibility="true"
				MaxLen="2000000"
				ShowLines="5"
				InitValue="" />
		<PrimaryIndex Name="VoicemailConfIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="voicemailconf_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Configuration File Primary Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="Id" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="VoicemailConfClusterIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="voicemailconf_xclus"
				ShortName="ConfClusIdx"
				Suffix="VMClusterIdx"
				Label="Cluster Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<SuperClassRelation Name="SuperClass"
				DbName="voicemailconf_super"
				Label="SuperClass"
				Suffix="SuperClass"
				FromIndex="VoicemailConfIdIdx"
				ToIndex="ConfigurationFile.ConfigurationFileIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="ClusterId" ToCol="ClusterId" DefaultVisibility="true" />
			<RelationCol Name="Id" ToCol="Id" DefaultVisibility="true" />
		</SuperClassRelation>
	</Table>

	<Table Name="AsteriskConf"
			TableClassCode="CASC"
			DbName="ast_conf"
			Label="Asterisk asterisk.conf"
			Description="Asterisk asterisk.conf file"
			DefaultVisibility="true"
			IsInstantiable="true"
			HasHistory="true"
			HasAuditColumns="true"
			LoaderBehaviour="Update"
			SecScope="Cluster" >
		<TableCol Name="ClusterId"
				Label="Cluster Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ClusterIdGen" />
		<TableCol Name="Id"
				IsNullable="false"
				DefaultVisibility="true"
				DataType="ConfigurationFileIdGen" />
		<TextCol Name="FileContents"
				IsNullable="false"
				DefaultVisibility="true"
				MaxLen="2000000"
				ShowLines="5"
				InitValue="" />
		<PrimaryIndex Name="AsteriskConfIdIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="true"
				DbName="asteriskconf_pk"
				ShortName="PIdx"
				Suffix="IdIdx"
				Label="Configuration File Primary Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
			<IndexCol Name="Id" IsAscending="true" DefaultVisibility="true" />
		</PrimaryIndex>
		<Index Name="AsteriskConfClusterIdx"
				DefaultVisibility="true"
				IsDbMapped="true"
				IsUnique="false"
				DbName="asteriskconf_xclus"
				ShortName="ConfClusIdx"
				Suffix="ConfClusterIdx"
				Label="Cluster Index" >
			<IndexCol Name="ClusterId" IsAscending="true" DefaultVisibility="true" />
		</Index>
		<SuperClassRelation Name="SuperClass"
				DbName="asteriskconf_super"
				Label="SuperClass"
				Suffix="SuperClass"
				FromIndex="AsteriskConfIdIdx"
				ToIndex="ConfigurationFile.ConfigurationFileIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="ClusterId" ToCol="ClusterId" DefaultVisibility="true" />
			<RelationCol Name="Id" ToCol="Id" DefaultVisibility="true" />
		</SuperClassRelation>
	</Table>

	<TableAddendum FromTable="ConfigurationFile">
		<Relation Name="Cluster"
				RelationType="Owner"
				DbName="conffile_cluster"
				Label="Cluster"
				Suffix="Cluster"
				FromIndex="ConfigurationFileClusterIdx"
				ToIndex="Cluster.ClusterIdIdx"
				IsRequired="true"
				DefaultVisibility="true" >
			<RelationCol Name="ClusterId" ToCol="Id" DefaultVisibility="true" />
		</Relation>
		<Relation Name="HostNode"
				RelationType="Parent"
				DbName="conffile_hostnode"
				Label="Host Node"
				Suffix="HostNode"
				FromIndex="ConfigurationFileHostNodeIdx"
				ToIndex="HostNode.HostNodeIdIdx"
				IsRequired="true"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="ClusterId" ToCol="ClusterId" DefaultVisibility="true" />
			<RelationCol Name="HostNodeId" ToCol="HostNodeId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="HostNode">
		<Relation Name="ConfigurationFile"
				RelationType="Children"
				DbName="hostnode_conffile"
				Label="Configuration File"
				Suffix="ConfFile"
				FromIndex="HostNodeIdIdx"
				ToIndex="ConfigurationFile.ConfigurationFileHostNodeIdx"
				IsRequired="false"
				IsXsdContainer="true"
				DefaultVisibility="true" >
			<RelationCol Name="ClusterId" ToCol="ClusterId" DefaultVisibility="true" />
			<RelationCol Name="HostNodeId" ToCol="HostNodeId" DefaultVisibility="true" />
		</Relation>
	</TableAddendum>

	<TableAddendum FromTable="HostNode">
		<DelDep Name="DelConfigurationFiles" DelDepChain="ConfigurationFile" />
	</TableAddendum>
</SchemaDef>
						</MinorVersion>
					</MajorVersion>
				</SubProject>
			</TopProject>
		</TopDomain>
	</Tld>
</MSSBam>
