コード例 #1
0
        public void testSubjectAreaSIF15r1()
        {
            Adk.SifVersion = SifVersion.SIF15r1;
            SchoolCourseInfo sci = new SchoolCourseInfo();
            SubjectAreaList lst = new SubjectAreaList();
            sci.SubjectAreaList = lst;

            SubjectArea sa = new SubjectArea( "13" );
            sa.TextValue = "Graphic Arts"; // for SIF 1.x ???
            OtherCodeList ocl = new OtherCodeList();
            ocl.Add( new OtherCode( Codeset.TEXT, "Graphic Arts" ) );
            sa.OtherCodeList = ocl;
            lst.Add( sa );

            StringWriter sw = new StringWriter();
            SifWriter sifw = new SifWriter( sw );
            sifw.Write( sci );
            sifw.Flush();
            sifw.Close();

            String xml = sw.ToString();
            Console.WriteLine( xml );

            int found = xml.IndexOf( ">Graphic Arts</SubjectArea>" );
            Assertion.Assert( found > -1 );
        }
コード例 #2
0
        public void testSubjectAreaSIF15r1()
        {
            Adk.SifVersion = SifVersion.SIF15r1;
            SchoolCourseInfo sci = new SchoolCourseInfo();
            SubjectAreaList  lst = new SubjectAreaList();

            sci.SubjectAreaList = lst;

            SubjectArea sa = new SubjectArea("13");

            sa.TextValue = "Graphic Arts"; // for SIF 1.x ???
            OtherCodeList ocl = new OtherCodeList();

            ocl.Add(new OtherCode(Codeset.TEXT, "Graphic Arts"));
            sa.OtherCodeList = ocl;
            lst.Add(sa);

            StringWriter sw   = new StringWriter();
            SifWriter    sifw = new SifWriter(sw);

            sifw.Write(sci);
            sifw.Flush();
            sifw.Close();

            String xml = sw.ToString();

            Console.WriteLine(xml);

            int found = xml.IndexOf(">Graphic Arts</SubjectArea>");

            Assertion.Assert(found > -1);
        }
コード例 #3
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="refId">A RefId</param>
 ///<param name="language">A Language</param>
 ///<param name="title">A Title</param>
 ///<param name="source">A Source</param>
 ///<param name="organizations">An Organizations</param>
 ///<param name="subjectAreas">A SubjectAreas</param>
 ///<param name="documentStatus">A DocumentStatus</param>
 ///<param name="learningStandardItemRefId">A LearningStandardItemRefId</param>
 ///
 public LearningStandardDocument( string refId, string language, string title, LearningStandardSource source, Organization organizations, SubjectAreaList subjectAreas, DocumentStatusType documentStatus, string learningStandardItemRefId )
     : base(Adk.SifVersion, LearningDTD.LEARNINGSTANDARDDOCUMENT)
 {
     this.RefId = refId;
     this.Language = language;
     this.Title = title;
     this.SetSource( source );
     this.Organizations =  new Organizations( organizations );
     this.SubjectAreas = subjectAreas;
     this.SetDocumentStatus( documentStatus );
     this.LearningStandardItemRefId = learningStandardItemRefId;
 }
コード例 #4
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="refId">A RefId</param>
 ///<param name="language">A Language</param>
 ///<param name="title">A Title</param>
 ///<param name="source">A Source</param>
 ///<param name="organizations">An Organizations</param>
 ///<param name="subjectAreas">A SubjectAreas</param>
 ///<param name="documentStatus">A DocumentStatus</param>
 ///<param name="learningStandardItemRefId">A LearningStandardItemRefId</param>
 ///
 public LearningStandardDocument(string refId, string language, string title, LearningStandardSource source, Organization organizations, SubjectAreaList subjectAreas, DocumentStatusType documentStatus, string learningStandardItemRefId) : base(Adk.SifVersion, LearningDTD.LEARNINGSTANDARDDOCUMENT)
 {
     this.RefId    = refId;
     this.Language = language;
     this.Title    = title;
     this.SetSource(source);
     this.Organizations = new Organizations(organizations);
     this.SubjectAreas  = subjectAreas;
     this.SetDocumentStatus(documentStatus);
     this.LearningStandardItemRefId = learningStandardItemRefId;
 }