Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ public static String getConceptId(final Concept concept) {
* generated it.
*
* @param corpus Corpus the corpus object,
* @param accoundId String the account id.
* @param accountId String the account id.
* @return the corpus id
*/
public static String getCorpusId(final Corpus corpus, final String accoundId) {
public static String getCorpusId(final Corpus corpus, final String accountId) {
Validate.notNull(corpus, "corpus cannot be null");
if (corpus.getId() != null) {
validate(CORPUS_ID_REGEX, corpus.getId(), "Provide a valid corpus.id (format is " + '"'
+ "/corpora/{account_id}/{corpus} +" + '"' + ")");
return corpus.getId();
} else {
Validate.notNull(corpus.getName(), "corpus.name cannot be null");
return "/corpora/" + accoundId + "/" + corpus.getName();
return "/corpora/" + accountId + "/" + corpus.getName();
}
}

Expand All @@ -107,18 +107,18 @@ public static String getDocumentId(final Document document) {
* generated it.
*
* @param graph Graph the graph object,
* @param accoundId String the account id.
* @param accountId String the account id.
* @return the graph id
*/
public static String getGraphId(final Graph graph, final String accoundId) {
public static String getGraphId(final Graph graph, final String accountId) {
Validate.notNull(graph, "graph object cannot be null");
if (graph.getId() != null) {
validate(GRAPH_ID_REGEX, graph.getId(), "Provide a valid graph.id (format is " + '"'
+ " (/graphs/{account_id}/{graph}) +" + '"' + ")");
return graph.getId();
} else {
Validate.notNull(graph.getName(), "graph.name cannot be null");
return "/graphs/" + accoundId + "/" + graph.getName();
return "/graphs/" + accountId + "/" + graph.getName();
}
}

Expand Down