Skip to content

Instantly share code, notes, and snippets.

@sagunji
Last active June 6, 2018 05:43
Show Gist options
  • Save sagunji/00b3d48893b9f62906646cdae1435a29 to your computer and use it in GitHub Desktop.
Save sagunji/00b3d48893b9f62906646cdae1435a29 to your computer and use it in GitHub Desktop.
Descriptor defination for ApplicationStatus and following generated artifacts
Descriptor ApplicationStatus
documentation "Application Status type."
with optional map type
documentation "Application Status type."
item "Submitted"
item "Transmitted"
item "Saved through page 1-9"
item "Saved through page 10"
item "Saved through page 11"
item "Saved through page 12"
item "Page 1 never saved"
<Aggregate root="ApplicationStatusDescriptor">
<Entity table="ApplicationStatusDescriptor" isA="Descriptor" schema="extension"/>
</Aggregate>
<Aggregate root="ApplicationStatusType">
<Entity table="ApplicationStatusType" schema="extension"/>
</Aggregate>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- (c)2018 Ed-Fi Alliance, LLC. All Rights Reserved. -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ed-fi.org/0200" xmlns:ann="http://ed-fi.org/annotation" targetNamespace="http://ed-fi.org/0200" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="Ed-Fi-Core.xsd" />
<xs:annotation>
<xs:documentation>===== Descriptors =====</xs:documentation>
</xs:annotation>
<xs:complexType name="EXTENSION-ApplicationStatusDescriptor">
<xs:annotation>
<xs:documentation>Application Status type.</xs:documentation>
<xs:appinfo>
<ann:TypeGroup>Descriptor</ann:TypeGroup>
</xs:appinfo>
</xs:annotation>
<xs:complexContent>
<xs:extension base="DescriptorType">
<xs:sequence>
<xs:element name="ApplicationStatusMap" type="EXTENSION-ApplicationStatusMapType" minOccurs="0">
<xs:annotation>
<xs:documentation>The mapping to a known ApplicationStatus enumeration type.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:annotation>
<xs:documentation>===== Enumerations and Enumerated Collections =====</xs:documentation>
</xs:annotation>
<xs:simpleType name="EXTENSION-ApplicationStatusMapType">
<xs:annotation>
<xs:documentation>Application Status type.</xs:documentation>
<xs:appinfo>
<ann:TypeGroup>Enumeration</ann:TypeGroup>
</xs:appinfo>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="Submitted">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Transmitted">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Saved through page 1-9">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Saved through page 10">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Saved through page 11">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Saved through page 12">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Page 1 never saved">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:schema>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- (c)2018 Ed-Fi Alliance, LLC. All Rights Reserved. -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ed-fi.org/0200" targetNamespace="http://ed-fi.org/0200" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="EXTENSION-Ed-Fi-Extended-Core.xsd" />
<xs:annotation>
<xs:documentation>===== Descriptors Interchange Model =====</xs:documentation>
</xs:annotation>
<xs:element name="InterchangeDescriptors">
<xs:annotation>
<xs:documentation>Descriptors provide states, districts, vendors, and other users of the Ed-Fi solution with the flexibility to use their own enumerations and code sets without modifying the Ed-Fi core schema.
The Descriptor interchange is used to describe metadata about the descriptors and their structure. It is used to define enumeration vocabularies that are not "fixed" within the XML schema, but are loaded in XML files and linked to their source.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="AcademicSubjectDescriptor" type="AcademicSubjectDescriptor" />
<xs:element name="AccommodationDescriptor" type="AccommodationDescriptor" />
<xs:element name="AccountCodeDescriptor" type="AccountCodeDescriptor" />
<xs:element name="AchievementCategoryDescriptor" type="AchievementCategoryDescriptor" />
<xs:element name="AdministrativeFundingControlDescriptor" type="AdministrativeFundingControlDescriptor" />
<xs:element name="AssessmentCategoryDescriptor" type="AssessmentCategoryDescriptor" />
<xs:element name="AssessmentIdentificationSystemDescriptor" type="AssessmentIdentificationSystemDescriptor" />
<xs:element name="AssessmentPeriodDescriptor" type="AssessmentPeriodDescriptor" />
<xs:element name="AttendanceEventCategoryDescriptor" type="AttendanceEventCategoryDescriptor" />
<xs:element name="BehaviorDescriptor" type="BehaviorDescriptor" />
<xs:element name="CalendarEventDescriptor" type="CalendarEventDescriptor" />
<xs:element name="ClassroomPositionDescriptor" type="ClassroomPositionDescriptor" />
<xs:element name="CompetencyLevelDescriptor" type="CompetencyLevelDescriptor" />
<xs:element name="ContinuationOfServicesReasonDescriptor" type="ContinuationOfServicesReasonDescriptor" />
<xs:element name="CountryDescriptor" type="CountryDescriptor" />
<xs:element name="CourseIdentificationSystemDescriptor" type="CourseIdentificationSystemDescriptor" />
<xs:element name="CredentialFieldDescriptor" type="CredentialFieldDescriptor" />
<xs:element name="DiagnosisDescriptor" type="DiagnosisDescriptor" />
<xs:element name="DisabilityDescriptor" type="DisabilityDescriptor" />
<xs:element name="DisciplineDescriptor" type="DisciplineDescriptor" />
<xs:element name="EducationOrganizationIdentificationSystemDescriptor" type="EducationOrganizationIdentificationSystemDescriptor" />
<xs:element name="EmploymentStatusDescriptor" type="EmploymentStatusDescriptor" />
<xs:element name="EntryTypeDescriptor" type="EntryTypeDescriptor" />
<xs:element name="ExitWithdrawTypeDescriptor" type="ExitWithdrawTypeDescriptor" />
<xs:element name="GradeLevelDescriptor" type="GradeLevelDescriptor" />
<xs:element name="GradingPeriodDescriptor" type="GradingPeriodDescriptor" />
<xs:element name="GraduationPlanTypeDescriptor" type="GraduationPlanTypeDescriptor" />
<xs:element name="LanguageDescriptor" type="LanguageDescriptor" />
<xs:element name="LevelDescriptor" type="LevelDescriptor" />
<xs:element name="LevelOfEducationDescriptor" type="LevelOfEducationDescriptor" />
<xs:element name="LimitedEnglishProficiencyDescriptor" type="LimitedEnglishProficiencyDescriptor" />
<xs:element name="PerformanceLevelDescriptor" type="PerformanceLevelDescriptor" />
<xs:element name="ProgramAssignmentDescriptor" type="ProgramAssignmentDescriptor" />
<xs:element name="ProgramCharacteristicDescriptor" type="ProgramCharacteristicDescriptor" />
<xs:element name="ReasonExitedDescriptor" type="ReasonExitedDescriptor" />
<xs:element name="ReporterDescriptionDescriptor" type="ReporterDescriptionDescriptor" />
<xs:element name="ResidencyStatusDescriptor" type="ResidencyStatusDescriptor" />
<xs:element name="ResponsibilityDescriptor" type="ResponsibilityDescriptor" />
<xs:element name="SchoolFoodServicesEligibilityDescriptor" type="SchoolFoodServicesEligibilityDescriptor" />
<xs:element name="SectionCharacteristicDescriptor" type="SectionCharacteristicDescriptor" />
<xs:element name="SeparationReasonDescriptor" type="SeparationReasonDescriptor" />
<xs:element name="ServiceDescriptor" type="ServiceDescriptor" />
<xs:element name="SpecialEducationSettingDescriptor" type="SpecialEducationSettingDescriptor" />
<xs:element name="StaffClassificationDescriptor" type="StaffClassificationDescriptor" />
<xs:element name="StaffIdentificationSystemDescriptor" type="StaffIdentificationSystemDescriptor" />
<xs:element name="StudentCharacteristicDescriptor" type="StudentCharacteristicDescriptor" />
<xs:element name="StudentIdentificationSystemDescriptor" type="StudentIdentificationSystemDescriptor" />
<xs:element name="TeachingCredentialDescriptor" type="TeachingCredentialDescriptor" />
<xs:element name="TermDescriptor" type="TermDescriptor" />
<xs:element name="WeaponDescriptor" type="WeaponDescriptor" />
<xs:element name="ApplicationStatusDescriptor" type="EXTENSION-ApplicationStatusDescriptor" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="utf-8" ?>
<!--
Order of the Interchange elements and the Element elements is important.
Unlike the current order provider, this metadata will list all aggregate types that are part of the interchange.
The extension metadata will replace the core metadata and contain all interchanges and elements for the implementation.
-->
<Interchanges>
<Interchange name="Consent" order="10">
<Element name="Consent" />
</Interchange>
<Interchange name="Descriptors" order="20">
<Element name="GradeLevelDescriptor" />
<Element name="AdministrativeFundingControlDescriptor" />
<Element name="AcademicSubjectDescriptor" />
<Element name="CompetencyLevelDescriptor" />
<Element name="ProgramCharacteristicDescriptor" />
<Element name="ServiceDescriptor" />
<Element name="AccommodationDescriptor" />
<Element name="AccountCodeDescriptor" />
<Element name="AchievementCategoryDescriptor" />
<Element name="AssessmentCategoryDescriptor" />
<Element name="AssessmentIdentificationSystemDescriptor" />
<Element name="AssessmentPeriodDescriptor" />
<Element name="AttendanceEventCategoryDescriptor" />
<Element name="BehaviorDescriptor" />
<Element name="CalendarEventDescriptor" />
<Element name="ClassroomPositionDescriptor" />
<Element name="ContinuationOfServicesReasonDescriptor" />
<Element name="CountryDescriptor" />
<Element name="CourseIdentificationSystemDescriptor" />
<Element name="DiagnosisDescriptor" />
<Element name="DisciplineDescriptor" />
<Element name="EducationOrganizationIdentificationSystemDescriptor" />
<Element name="EmploymentStatusDescriptor" />
<Element name="EntryTypeDescriptor" />
<Element name="ExitWithdrawTypeDescriptor" />
<Element name="GradingPeriodDescriptor" />
<Element name="GraduationPlanTypeDescriptor" />
<Element name="LanguageDescriptor" />
<Element name="LevelOfEducationDescriptor" />
<Element name="LimitedEnglishProficiencyDescriptor" />
<Element name="ProgramAssignmentDescriptor" />
<Element name="ReasonExitedDescriptor" />
<Element name="ReporterDescriptionDescriptor" />
<Element name="ResidencyStatusDescriptor" />
<Element name="ResponsibilityDescriptor" />
<Element name="SchoolFoodServicesEligibilityDescriptor" />
<Element name="SectionCharacteristicDescriptor" />
<Element name="SeparationReasonDescriptor" />
<Element name="SpecialEducationSettingDescriptor" />
<Element name="StaffClassificationDescriptor" />
<Element name="StaffIdentificationSystemDescriptor" />
<Element name="StudentCharacteristicDescriptor" />
<Element name="StudentIdentificationSystemDescriptor" />
<Element name="TeachingCredentialDescriptor" />
<Element name="TermDescriptor" />
<Element name="WeaponDescriptor" />
<Element name="ApplicationStatusDescriptor" />
<Element name="CredentialFieldDescriptor" />
<Element name="DisabilityDescriptor" />
<Element name="LevelDescriptor" />
<Element name="PerformanceLevelDescriptor" />
</Interchange>
<Interchange name="Standards" order="20">
<Element name="LearningStandard" />
<Element name="LearningObjective" />
</Interchange>
<Interchange name="EducationOrganization" order="30">
<Element name="College" />
<Element name="StateEducationAgency" />
<Element name="EducationServiceCenter" />
<Element name="LocalEducationAgency" />
<Element name="School" />
<Element name="FeederSchoolAssociation" />
<Element name="Location" />
<Element name="ClassPeriod" />
<Element name="Course" />
<Element name="Program" />
<Element name="AccountabilityRating" />
<Element name="EducationOrganizationPeerAssociation" />
<Element name="EducationOrganizationNetwork" />
<Element name="EducationOrganizationNetworkAssociation" />
</Interchange>
<Interchange name="EducationOrgCalendar" order="30">
<Element name="GradingPeriod" />
<Element name="AcademicWeek" />
<Element name="Session" />
<Element name="CalendarDate" />
</Interchange>
<Interchange name="Student" order="40">
<Element name="Student" />
</Interchange>
<Interchange name="MasterSchedule" order="50">
<Element name="CourseOffering" />
<Element name="Section" />
<Element name="BellSchedule" />
</Interchange>
<Interchange name="StudentEnrollment" order="60">
<Element name="GraduationPlan" />
<Element name="StudentSchoolAssociation" />
<Element name="StudentSectionAssociation" />
<Element name="StudentEducationOrganizationAssociation" />
</Interchange>
<Interchange name="StudentGradebook" order="70">
<Element name="LearningObjective" />
<Element name="GradebookEntry" />
<Element name="StudentGradebookEntry" />
</Interchange>
<Interchange name="StudentProgram" order="80">
<Element name="StudentProgramAssociation" />
<Element name="StudentSpecialEducationProgramAssociation" />
<Element name="RestraintEvent" />
<Element name="StudentCTEProgramAssociation" />
<Element name="StudentTitleIPartAProgramAssociation" />
<Element name="StudentMigrantEducationProgramAssociation" />
</Interchange>
<Interchange name="StudentGrade" order="90">
<Element name="LearningObjective" />
<Element name="Grade" />
<Element name="CompetencyObjective" />
<Element name="StudentCompetencyObjective" />
<Element name="StudentLearningObjective" />
<Element name="ReportCard" />
</Interchange>
<Interchange name="AssessmentMetadata" order="110">
<Element name="AssessmentFamily" />
<Element name="LearningStandard" />
<Element name="LearningObjective" />
<Element name="Assessment" />
<Element name="AssessmentItem" />
<Element name="ObjectiveAssessment" />
</Interchange>
<Interchange name="StaffAssociation" order="120">
<Element name="Staff" />
<Element name="StaffEducationOrganizationEmploymentAssociation" />
<Element name="StaffEducationOrganizationAssignmentAssociation" />
<Element name="StaffSchoolAssociation" />
<Element name="StaffSectionAssociation" />
<Element name="LeaveEvent" />
<Element name="OpenStaffPosition" />
<Element name="StaffProgramAssociation" />
</Interchange>
<Interchange name="Finance" order="130">
<Element name="Account" />
<Element name="Actual" />
<Element name="Budget" />
<Element name="ContractedStaff" />
<Element name="Payroll" />
</Interchange>
<Interchange name="Parent" order="140">
<Element name="Parent" />
<Element name="StudentParentAssociation" />
</Interchange>
<Interchange name="PostSecondaryEvent" order="150">
<Element name="PostSecondaryEvent" />
</Interchange>
<Interchange name="StudentAssessment" order="160">
<Element name="StudentAssessment" />
</Interchange>
<Interchange name="StudentCohort" order="170">
<Element name="Cohort" />
<Element name="StudentCohortAssociation" />
<Element name="StaffCohortAssociation" />
</Interchange>
<Interchange name="StudentIntervention" order="180">
<Element name="EducationContent" />
<Element name="InterventionPrescription" />
<Element name="Intervention" />
<Element name="InterventionStudy" />
<Element name="StudentInterventionAssociation" />
<Element name="EducationOrganizationInterventionPrescriptionAssociation" />
</Interchange>
<Interchange name="StudentAttendance" order="190">
<Element name="StudentInterventionAttendanceEvent" />
<Element name="StudentProgramAttendanceEvent" />
<Element name="StudentSchoolAttendanceEvent" />
<Element name="StudentSectionAttendanceEvent" />
<Element name="SectionAttendanceTakenEvent" />
</Interchange>
<Interchange name="StudentDiscipline" order="200">
<Element name="DisciplineIncident" />
<Element name="StudentDisciplineIncidentAssociation" />
<Element name="DisciplineAction" />
</Interchange>
<Interchange name="StudentTranscript" order="210">
<Element name="StudentAcademicRecord" />
<Element name="CourseTranscript" />
</Interchange>
</Interchanges>
-- Table [extension].[ApplicationStatusDescriptor] --
CREATE TABLE [extension].[ApplicationStatusDescriptor] (
[ApplicationStatusDescriptorId] [INT] NOT NULL,
[ApplicationStatusTypeId] [INT] NULL,
CONSTRAINT [ApplicationStatusDescriptor_PK] PRIMARY KEY CLUSTERED (
[ApplicationStatusDescriptorId] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
-- Table [extension].[ApplicationStatusType] --
CREATE TABLE [extension].[ApplicationStatusType] (
[ApplicationStatusTypeId] [INT] IDENTITY(1,1) NOT NULL,
[CodeValue] [NVARCHAR](50) NOT NULL,
[Description] [NVARCHAR](1024) NOT NULL,
[ShortDescription] [NVARCHAR](450) NOT NULL,
[CreateDate] [DATETIME] NOT NULL,
[LastModifiedDate] [DATETIME] NOT NULL,
[Id] [UNIQUEIDENTIFIER] NOT NULL,
CONSTRAINT [ApplicationStatusType_PK] PRIMARY KEY CLUSTERED (
[ApplicationStatusTypeId] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [extension].[ApplicationStatusType] ADD CONSTRAINT [ApplicationStatusType_DF_CreateDate] DEFAULT (getdate()) FOR [CreateDate]
GO
ALTER TABLE [extension].[ApplicationStatusType] ADD CONSTRAINT [ApplicationStatusType_DF_Id] DEFAULT (newid()) FOR [Id]
GO
ALTER TABLE [extension].[ApplicationStatusType] ADD CONSTRAINT [ApplicationStatusType_DF_LastModifiedDate] DEFAULT (getdate()) FOR [LastModifiedDate]
GO
INSERT INTO [extension].[ApplicationStatusType] ([CodeValue], [Description], [ShortDescription]) VALUES ('', 'Page 1 never saved', 'Page 1 never saved')
GO
INSERT INTO [extension].[ApplicationStatusType] ([CodeValue], [Description], [ShortDescription]) VALUES ('', 'Saved through page 1-9', 'Saved through page 1-9')
GO
INSERT INTO [extension].[ApplicationStatusType] ([CodeValue], [Description], [ShortDescription]) VALUES ('', 'Saved through page 10', 'Saved through page 10')
GO
INSERT INTO [extension].[ApplicationStatusType] ([CodeValue], [Description], [ShortDescription]) VALUES ('', 'Saved through page 11', 'Saved through page 11')
GO
INSERT INTO [extension].[ApplicationStatusType] ([CodeValue], [Description], [ShortDescription]) VALUES ('', 'Saved through page 12', 'Saved through page 12')
GO
INSERT INTO [extension].[ApplicationStatusType] ([CodeValue], [Description], [ShortDescription]) VALUES ('', 'Submitted', 'Submitted')
GO
INSERT INTO [extension].[ApplicationStatusType] ([CodeValue], [Description], [ShortDescription]) VALUES ('', 'Transmitted', 'Transmitted')
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment