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
import org.neo4j.graphdb.Transaction; | |
import com.tinkerpop.blueprints.Vertex; | |
import com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph; | |
public class Neo4jTest { | |
private final String[] testData = { | |
"foo", |
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
import com.tinkerpop.blueprints.TransactionalGraph.Conclusion; | |
import com.tinkerpop.blueprints.Vertex; | |
import com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph; | |
public class BlueprintsTest { | |
private final String[] testData = { | |
"foo", | |
"bar", |
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
/** | |
app/controllers/MyProxyController.scala | |
*/ | |
package controllers | |
// Basic proxying web service... | |
// Standard play libs - all the Scala stuff | |
// is in the play.api package so it doesn't | |
// conflict with the Java equivalents. |
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
// Create a doc unit with a repository and a user... | |
// Glosses over lots of potential errors! | |
public void createDocumentaryUnit(Long repositoryId, Long userId, | |
Map<String, Object> data) throws ValidationError, | |
DeserializationError, PermissionDenied { | |
// Load the repository this collection will be part of... | |
Agent repo = graph.getVertex(repositoryId, Agent.class); |
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
def init_i18n_class(cls): | |
"""Create, via metadata reflection, an I18N class object | |
for i18n-enabled tables.""" | |
tablename = cls.__tablename__ + "_i18n" | |
if Base.metadata.tables.get(tablename) is not None: | |
classname = cls.__name__ + "I18N" | |
i18nt = Table(tablename, Base.metadata, | |
Column("id", ForeignKey("%s.id" % cls.__tablename__), primary_key=True), | |
Column("culture", String(25), primary_key=True), | |
ForeignKeyConstraint(["id"], ["%s.id" % cls.__tablename__]), |
NewerOlder