Exemplo n.º 1
0
        /// <summary>
        /// Thực hiện đọc file MetaData để lấy thông tin
        /// </summary>
        /// <param name="metaFile">Đường dẫn file</param>
        public void parseMetaFile(string metaFile)
        {
            FileParsers parser     = new FileParsers(metaFile, METAFILE);
            String      targetName = parser.getAttributeName(0);

            String[] targetValues;
            int      numTargetValues;

            targetValues = parser.extractTargetAttributeValue(0);
            //// Build the target attribute and add it to the attributes vector.
            Attribute targetAttribute = new Attribute(targetName, targetValues, 1);

            numTargetValues = targetValues.Length;
            Attributes.Add(targetAttribute);

            List <Attribute> list = parser.extractAttributeFeatures();

            for (int i = 0; i < list.Count; i++)
            {
                Attributes.Add((Attribute)list[i]);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Thực hiện đọc file MetaData để lấy thông tin
        /// </summary>
        /// <param name="metaFile">Đường dẫn file</param>
        public void parseMetaFile(string metaFile)
        {
            FileParsers parser = new FileParsers(metaFile, METAFILE);
            String targetName = parser.getAttributeName(0);
            String[] targetValues ;
            int numTargetValues;

            targetValues = parser.extractTargetAttributeValue(0);
            //// Build the target attribute and add it to the attributes vector.
            Attribute targetAttribute = new Attribute(targetName, targetValues, 1);

            numTargetValues = targetValues.Length;
            Attributes.Add(targetAttribute);

            List<Attribute> list = parser.extractAttributeFeatures();
            for (int i = 0; i < list.Count; i++)
            {
                Attributes.Add((Attribute)list[i]);
            }
        }