예제 #1
0
 internal DiagnosticsReportCommand(Path homeDir, Path configDir, OutsideWorld outsideWorld)
 {
     this._homeDir   = homeDir;
     this._configDir = configDir;
     this._fs        = outsideWorld.FileSystem();
     this.@out       = outsideWorld.OutStream();
     _err            = outsideWorld.ErrorStream();
 }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: CsvImporter(org.neo4j.helpers.Args args, org.neo4j.kernel.configuration.Config databaseConfig, org.neo4j.commandline.admin.OutsideWorld outsideWorld) throws org.neo4j.commandline.admin.IncorrectUsage
        internal CsvImporter(Args args, Config databaseConfig, OutsideWorld outsideWorld)
        {
            this._args              = args;
            this._outsideWorld      = outsideWorld;
            _nodesFiles             = extractInputFiles(args, "nodes", outsideWorld.ErrorStream());
            _relationshipsFiles     = extractInputFiles(args, "relationships", outsideWorld.ErrorStream());
            _reportFileName         = args.InterpretOption("report-file", withDefault(ImportCommand.DEFAULT_REPORT_FILE_NAME), s => s);
            _ignoreExtraColumns     = args.GetBoolean("ignore-extra-columns", false).Value;
            _ignoreDuplicateNodes   = args.GetBoolean("ignore-duplicate-nodes", false).Value;
            _ignoreBadRelationships = args.GetBoolean("ignore-missing-nodes", false).Value;
            try
            {
                validateInputFiles(_nodesFiles, _relationshipsFiles);
            }
            catch (System.ArgumentException e)
            {
                throw new IncorrectUsage(e.Message);
            }

            _idType              = args.InterpretOption("id-type", withDefault(IdType.STRING), from => IdType.valueOf(from.ToUpper()));
            _inputEncoding       = Charset.forName(args.Get("input-encoding", defaultCharset().name()));
            _highIO              = args.GetBoolean("high-io", null, true);    // intentionally left as null if not specified
            this._databaseConfig = databaseConfig;
        }