Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.GraphDatabaseService


  public void execute(Map<String, Object> attributes) throws FrameworkException {

    final String mode                      = (String) attributes.get("mode");
    final String entityType                = (String) attributes.get("type");
    final String relType                   = (String) attributes.get("relType");
    final GraphDatabaseService graphDb     = (GraphDatabaseService) arguments.get("graphDb");
    final SecurityContext superUserContext = SecurityContext.getSuperUserInstance();
    final NodeFactory nodeFactory          = new NodeFactory(superUserContext);
    final RelationshipFactory relFactory   = new RelationshipFactory(superUserContext);

    Class type = null;
View Full Code Here


    return execute(rel, false);
  }
 
  public Object execute(final RelationshipInterface rel, final boolean passiveDeletion) {

    GraphDatabaseService graphDb = (GraphDatabaseService) arguments.get("graphDb");

    if (graphDb != null && rel != null) {

      if (rel.getProperty(AbstractRelationship.id) == null) {
View Full Code Here

  //~--- methods --------------------------------------------------------

  @Override
  public void execute(final Map<String, Object> properties) throws FrameworkException {

    final GraphDatabaseService graphDb     = (GraphDatabaseService) arguments.get("graphDb");
    final SecurityContext superUserContext = SecurityContext.getSuperUserInstance();
    final NodeFactory nodeFactory          = new NodeFactory(superUserContext);

    String type    = null;
    final String oldKey  = (String) properties.get("oldKey");
View Full Code Here

  }


  private void migrateDatabase() {

    final GraphDatabaseService graphDb     = getService(NodeService.class).getGraphDb();
    final SecurityContext superUserContext = SecurityContext.getSuperUserInstance();
    final NodeFactory nodeFactory          = new NodeFactory(superUserContext);
    final RelationshipFactory relFactory   = new RelationshipFactory(superUserContext);
    final App app                          = StructrApp.getInstance();
    final StringProperty uuidProperty      = new StringProperty("uuid");
View Full Code Here

  @Override
  public void execute(Map<String, Object> attributes) throws FrameworkException {

    final String entityType                = (String) attributes.get("type");
    final String relType                   = (String) attributes.get("relType");
    final GraphDatabaseService graphDb     = (GraphDatabaseService) arguments.get("graphDb");
    final SecurityContext superUserContext = SecurityContext.getSuperUserInstance();
    final NodeFactory nodeFactory          = new NodeFactory(superUserContext);
    final RelationshipFactory relFactory   = new RelationshipFactory(superUserContext);

    if (entityType != null) {
View Full Code Here

  private static final Logger logger = Logger.getLogger(BulkCopyRelationshipPropertyCommand.class.getName());

  @Override
  public void execute(final Map<String, Object> map) throws FrameworkException {

    final GraphDatabaseService graphDb   = (GraphDatabaseService)arguments.get("graphDb");
    final RelationshipFactory relFactory = new RelationshipFactory(securityContext);

    final String sourceKey = (String)map.get("sourceKey");
    final String destKey   = (String)map.get("destKey");
View Full Code Here

  //~--- methods --------------------------------------------------------

  @Override
  public void execute(final Map<String, Object> properties) throws FrameworkException {

    final GraphDatabaseService graphDb            = (GraphDatabaseService) arguments.get("graphDb");
    final RelationshipFactory relationshipFactory = new RelationshipFactory(securityContext);

    if (graphDb != null) {

      List<AbstractRelationship> rels = null;
View Full Code Here

*/
public class GetAllNodes extends NodeServiceCommand {

  public List<AbstractNode> execute() throws FrameworkException {

    GraphDatabaseService graphDb = (GraphDatabaseService)arguments.get("graphDb");
    NodeFactory nodeFactory = new NodeFactory(securityContext);

    if(graphDb != null) {
      return nodeFactory.bulkInstantiate(GlobalGraphOperations.at(graphDb).getAllNodes());
    }
View Full Code Here


  @Override
  public void execute(final Map<String, Object> attributes) throws FrameworkException {

    GraphDatabaseService graphDb = Services.getInstance().getService(NodeService.class).getGraphDb();
    String mode                  = (String)attributes.get("mode");
    String fileName              = (String)attributes.get("file");
    String validate              = (String)attributes.get("validate");
    boolean doValidation         = true;
View Full Code Here

  }

  public static void importCypher(final List<String> sources) throws FrameworkException {

    final App app                      = StructrApp.getInstance();
    final GraphDatabaseService graphDb = app.command(GraphDatabaseCommand.class).execute();
    final ExecutionEngine engine       = new ExecutionEngine(graphDb, new BufferingLogger());

    // nothing to do
    if (sources.isEmpty()) {
      return;
View Full Code Here

TOP

Related Classes of org.neo4j.graphdb.GraphDatabaseService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.