Skip to content

Commit

Permalink
Specify which options get documented.
Browse files Browse the repository at this point in the history
  • Loading branch information
srbaker committed Oct 14, 2016
1 parent 4f77328 commit 6cc67a8
Showing 1 changed file with 36 additions and 8 deletions.
Expand Up @@ -105,6 +105,9 @@ enum Options
STORE_DIR( "into", null, STORE_DIR( "into", null,
"<store-dir>", "<store-dir>",
"Database directory to import into. " + "Must not contain existing database." ), "Database directory to import into. " + "Must not contain existing database." ),
DB_DIR( "database", null,
"<database-name>",
"Database name to import into. " + "Must not contain existing database.", true ),
NODE_DATA( "nodes", null, NODE_DATA( "nodes", null,
"[:Label1:Label2] \"<file1>" + MULTI_FILE_DELIMITER + "<file2>" + MULTI_FILE_DELIMITER + "...\"", "[:Label1:Label2] \"<file1>" + MULTI_FILE_DELIMITER + "<file2>" + MULTI_FILE_DELIMITER + "...\"",
"Node CSV header and data. Multiple files will be logically seen as one big file " "Node CSV header and data. Multiple files will be logically seen as one big file "
Expand All @@ -113,7 +116,7 @@ enum Options
+ "Multiple data sources like these can be specified in one import, " + "Multiple data sources like these can be specified in one import, "
+ "where each data source has its own header. " + "where each data source has its own header. "
+ "Note that file groups must be enclosed in quotation marks.", + "Note that file groups must be enclosed in quotation marks.",
true ), true, true ),
RELATIONSHIP_DATA( "relationships", null, RELATIONSHIP_DATA( "relationships", null,
"[:RELATIONSHIP_TYPE] \"<file1>" + MULTI_FILE_DELIMITER + "<file2>" + "[:RELATIONSHIP_TYPE] \"<file1>" + MULTI_FILE_DELIMITER + "<file2>" +
MULTI_FILE_DELIMITER + "...\"", MULTI_FILE_DELIMITER + "...\"",
Expand All @@ -123,7 +126,7 @@ enum Options
+ "Multiple data sources like these can be specified in one import, " + "Multiple data sources like these can be specified in one import, "
+ "where each data source has its own header. " + "where each data source has its own header. "
+ "Note that file groups must be enclosed in quotation marks.", + "Note that file groups must be enclosed in quotation marks.",
true ), true, true ),
DELIMITER( "delimiter", null, DELIMITER( "delimiter", null,
"<delimiter-character>", "<delimiter-character>",
"Delimiter character, or 'TAB', between values in CSV data. The default option is `" + COMMAS.delimiter() + "`." ), "Delimiter character, or 'TAB', between values in CSV data. The default option is `" + COMMAS.delimiter() + "`." ),
Expand All @@ -150,7 +153,8 @@ enum Options
"<character set>", "<character set>",
"Character set that input data is encoded in. Provided value must be one out of the available " "Character set that input data is encoded in. Provided value must be one out of the available "
+ "character sets in the JVM, as provided by Charset#availableCharsets(). " + "character sets in the JVM, as provided by Charset#availableCharsets(). "
+ "If no input encoding is provided, the default character set of the JVM will be used." ), + "If no input encoding is provided, the default character set of the JVM will be used.",
true ),
IGNORE_EMPTY_STRINGS( "ignore-empty-strings", org.neo4j.csv.reader.Configuration.DEFAULT.emptyQuotedStringsAsNull(), IGNORE_EMPTY_STRINGS( "ignore-empty-strings", org.neo4j.csv.reader.Configuration.DEFAULT.emptyQuotedStringsAsNull(),
"<true/false>", "<true/false>",
"Whether or not empty string fields, i.e. \"\" from input source are ignored, i.e. treated as null." ), "Whether or not empty string fields, i.e. \"\" from input source are ignored, i.e. treated as null." ),
Expand All @@ -161,7 +165,8 @@ enum Options
+ "input files are treated.\n" + "input files are treated.\n"
+ IdType.STRING + ": arbitrary strings for identifying nodes.\n" + IdType.STRING + ": arbitrary strings for identifying nodes.\n"
+ IdType.INTEGER + ": arbitrary integer values for identifying nodes.\n" + IdType.INTEGER + ": arbitrary integer values for identifying nodes.\n"
+ IdType.ACTUAL + ": (advanced) actual node ids. The default option is `" + IdType.STRING + "`." ), + IdType.ACTUAL + ": (advanced) actual node ids. The default option is `" + IdType.STRING +
"`.", true ),
PROCESSORS( "processors", null, PROCESSORS( "processors", null,
"<max processor count>", "<max processor count>",
"(advanced) Max number of processors used by the importer. Defaults to the number of " "(advanced) Max number of processors used by the importer. Defaults to the number of "
Expand All @@ -170,7 +175,7 @@ enum Options
+ ". There is a certain amount of minimum threads needed so for that reason there " + ". There is a certain amount of minimum threads needed so for that reason there "
+ "is no lower bound for this value. For optimal performance this value shouldn't be " + "is no lower bound for this value. For optimal performance this value shouldn't be "
+ "greater than the number of available processors." ), + "greater than the number of available processors." ),
STACKTRACE( "stacktrace", null, STACKTRACE( "stacktrace", false,
"<true/false>", "<true/false>",
"Enable printing of error stack traces." ), "Enable printing of error stack traces." ),
BAD_TOLERANCE( "bad-tolerance", 1000, BAD_TOLERANCE( "bad-tolerance", 1000,
Expand Down Expand Up @@ -206,27 +211,45 @@ enum Options
+ GraphDatabaseSettings.dense_node_threshold.name() + "\n" + GraphDatabaseSettings.dense_node_threshold.name() + "\n"
+ GraphDatabaseSettings.string_block_size.name() + "\n" + GraphDatabaseSettings.string_block_size.name() + "\n"
+ GraphDatabaseSettings.array_block_size.name() ), + GraphDatabaseSettings.array_block_size.name() ),
ADDITIONAL_CONFIG( "additional-config", null,
"<path/to/neo4j.conf>",
"(advanced) File specifying database-specific configuration. For more information consult "
+ "manual about available configuration options for a neo4j configuration file. "
+ "Only configuration affecting store at time of creation will be read. "
+ "Examples of supported config are:\n"
+ GraphDatabaseSettings.dense_node_threshold.name() + "\n"
+ GraphDatabaseSettings.string_block_size.name() + "\n"
+ GraphDatabaseSettings.array_block_size.name(), true ),
PAGE_SIZE( "page-size", Format.bytes( org.neo4j.unsafe.impl.batchimport.Configuration.DEFAULT.pageSize() ), PAGE_SIZE( "page-size", Format.bytes( org.neo4j.unsafe.impl.batchimport.Configuration.DEFAULT.pageSize() ),
"<page size in bytes", "<page size in bytes",
"Page size in bytes, or e.g. 4M or 8k" ); "Page size in bytes, or e.g. 4M or 8k", true );


private final String key; private final String key;
private final Object defaultValue; private final Object defaultValue;
private final String usage; private final String usage;
private final String description; private final String description;
private final boolean keyAndUsageGoTogether; private final boolean keyAndUsageGoTogether;
private boolean supported;


Options( String key, Object defaultValue, String usage, String description ) Options( String key, Object defaultValue, String usage, String description )
{ {
this( key, defaultValue, usage, description, false ); this( key, defaultValue, usage, description, false, false );
} }


Options( String key, Object defaultValue, String usage, String description, boolean keyAndUsageGoTogether ) Options( String key, Object defaultValue, String usage, String description, boolean supported )
{
this( key, defaultValue, usage, description, supported, false );
}

Options( String key, Object defaultValue, String usage, String description, boolean supported, boolean
keyAndUsageGoTogether
)
{ {
this.key = key; this.key = key;
this.defaultValue = defaultValue; this.defaultValue = defaultValue;
this.usage = usage; this.usage = usage;
this.description = description; this.description = description;
this.supported = supported;
this.keyAndUsageGoTogether = keyAndUsageGoTogether; this.keyAndUsageGoTogether = keyAndUsageGoTogether;
} }


Expand Down Expand Up @@ -289,6 +312,11 @@ private static String availableProcessorsHint()
{ {
return " (in your case " + Runtime.getRuntime().availableProcessors() + ")"; return " (in your case " + Runtime.getRuntime().availableProcessors() + ")";
} }

public boolean isSupportedOption()
{
return this.supported;
}
} }


/** /**
Expand Down

0 comments on commit 6cc67a8

Please sign in to comment.