Created
August 20, 2014 09:16
-
-
Save fancyerii/777b540f489e5e9e6b6c to your computer and use it in GitHub Desktop.
schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
TitanGraph graph=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
graph.shutdown(); | |
TitanCleanup.clear(graph); | |
graph=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
graph.makeKey("name").dataType(String.class).make(); | |
graph.makeKey("aliases").dataType(String.class).indexed(Vertex.class).list().make(); | |
graph.makeKey("l_name").dataType(String.class).indexed(Vertex.class).indexed(Edge.class).make(); | |
graph.makeKey("v_type").dataType(Integer.class).indexed(Vertex.class).make(); | |
graph.makeLabel("predicate").oneToOne().make(); | |
graph.makeLabel("meaning_to_word").manyToMany().make(); | |
graph.makeLabel("toMeaning").manyToOne().unidirected().make(); | |
graph.commit(); | |
graph.shutdown(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment