INNER CODE UNIT · Java

CmdCreateTaxonIndexes

globalbioticinteractions/globalbioticinteractions · elton4n/src/main/java/org/globalbioticinteractions/elton/CmdCreateTaxonIndexes.java:12

public class CmdCreateTaxonIndexes extends CmdNeo4J {
    private final static Logger LOG = LoggerFactory.getLogger(CmdCreateTaxonIndexes.class);
    @Override
    public void run() {
        GraphDatabaseService graphService = getGraphServiceFactory().getGraphService();
        try (Transaction tx = graphService.beginTx()) {
            Neo4jIndexUtil.createIndexIfNotExists(tx, NodeLabel.Taxon, PropertyAndValueDictionary.EXTERNAL_ID);
            Neo4jIndexUtil.createIndexIfNotExists(tx, NodeLabel.Taxon, PropertyAndValueDictionary.NAME);
            Neo4jIndexUtil.createIndexIfNotExists(tx, NodeLabel.Taxon, PropertyAndValueDictionary.EXTERNAL_IDS, IndexType.TEXT);
            tx.commit();
        }
    }

}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…