Skip to content

Commit

Permalink
Autogenerated markdown documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
laughedelic committed Mar 5, 2016
1 parent a36f2e4 commit 3fd386d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public abstract class NCBITaxonomyGraph<

public final id id = new id();
public final name name = new name();
public final comment comment = new comment();
public final scientificName scientificName = new scientificName();
public final taxonomicRank taxonomicRank = new taxonomicRank();

public NCBITaxonType(RVT raw) {
Expand Down Expand Up @@ -140,30 +138,6 @@ public abstract class NCBITaxonomyGraph<
}
}

public final class comment
extends
NCBITaxonomyVertexProperty<NCBITaxon<I, RV, RVT, RE, RET>, NCBITaxonType, comment, String> {
public comment() {
super(NCBITaxonType.this);
}

public Class<String> valueClass() {
return String.class;
}
}

public final class scientificName
extends
NCBITaxonomyVertexProperty<NCBITaxon<I, RV, RVT, RE, RET>, NCBITaxonType, scientificName, String> {
public scientificName() {
super(NCBITaxonType.this);
}

public Class<String> valueClass() {
return String.class;
}
}

public final class taxonomicRank
extends
NCBITaxonomyVertexProperty<NCBITaxon<I, RV, RVT, RE, RET>, NCBITaxonType, taxonomicRank, String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,23 @@ public abstract class ImportNCBITaxonomy<I extends UntypedGraph<RV,RVT,RE,RET>,R

String[] columns = line.split("\\|");

if (columns[columns.length - 1].trim().equals("scientific name")) {
if (columns[3].trim().equals("scientific name")) {

String taxId = columns[0].trim();
String scientificNameSt = columns[1].trim();
String taxId = columns[0].trim();
String taxName = columns[1].trim();

Optional<NCBITaxon<I,RV,RVT,RE,RET>> optionalTaxon = ncbiTaxonomyGraph.nCBITaxonIdIndex().getVertex(taxId);
if(optionalTaxon.isPresent()){
NCBITaxon<I,RV,RVT,RE,RET> taxon = optionalTaxon.get();
taxon.set(ncbiTaxonomyGraph.NCBITaxon().scientificName, scientificNameSt);
}else{
Logger.getLogger(ImportNCBITaxonomy.class.getName()).log(Level.INFO, "Taxon with id: " + taxId + " was not found and its name could not be added... :(");
}
Optional<NCBITaxon<I,RV,RVT,RE,RET>> optionalTaxon = ncbiTaxonomyGraph.nCBITaxonIdIndex().getVertex(taxId);
if(optionalTaxon.isPresent()){
NCBITaxon<I,RV,RVT,RE,RET> taxon = optionalTaxon.get();
taxon.set(ncbiTaxonomyGraph.NCBITaxon().name, taxName);
}else{
Logger.getLogger(ImportNCBITaxonomy.class.getName()).log(Level.INFO, "Taxon with id: " + taxId + " was not found and its name could not be added... :(");
}

linesCounter++;
if((linesCounter % limitForTransaction) == 0){
ncbiTaxonomyGraph.raw().commit();
}
linesCounter++;
if((linesCounter % limitForTransaction) == 0){
ncbiTaxonomyGraph.raw().commit();
}

}

Expand Down Expand Up @@ -208,6 +208,7 @@ public abstract class ImportNCBITaxonomy<I extends UntypedGraph<RV,RVT,RE,RET>,R
}

}

```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ public final class NCBITaxon<I extends UntypedGraph<RV, RVT, RE, RET>, RV, RVT,
return get(type().name);
}

public String comment() {
return get(type().comment);
}

public String scientificName() {
return get(type().scientificName);
}

public String taxonomicRank() {
return get(type().taxonomicRank);
}
Expand Down

0 comments on commit 3fd386d

Please sign in to comment.