Beispiel #1
0
        public void Dispose()
        {
            _output.Dispose();

            _data = null;
            _config = null;
            _output = null;

            _namespaces.Clear();
            _months.Clear();
            _namespaceManager = null;

            _counters.Clear();
            _uniqueIdentifiers.Clear();

            _namespaces = null;
            _months = null;
            _counters = null;
            _uniqueIdentifiers = null;
        }
Beispiel #2
0
        public void Start()
        {
            try
            {
                //initialise to set up defaults
                InitialiseNamespaces();

                //Get config namespaces
                GetNamespaces(_config.SelectSingleNode("config/namespaces"));

                //set namepaces and then we can initialise the output

                //the outputPath requires the name, so this will be obtained from the input filename:
                FileInfo inputFI = new FileInfo(_dataPath);
                string outputFileName = inputFI.Name.Substring(0, inputFI.Name.LastIndexOf("."));

                _output = new RdfOutput(Path.Combine(_outputPath, outputFileName + ".rdf"), _namespaces, ParseFormat(_format));

                //Process config
                XmlNodeList nodes = _config.GetElementsByTagName("config");

                foreach (XmlNode node in nodes)
                {
                    ExecConfig(null, node, _data);
                }
            }
            catch(Exception ex)
            {
                Console.WriteLine("Error in Start():" + ex.Message + (_includeStackTraceInOutput ? ex.StackTrace : ""));
            }
        }