Hi Folks, Thanks for the 2.0rc1 release. I love the new studio. I'm trying to get my Java client running with the new release. It was working with this version: $ cat .git/FETCH_HEAD 422c844dd9174f9b7b14318dc42581a11e5a2a15 branch 'develop' of https://github.com/orientechnologies/orientdb
$ cat build.number
#Build Number for ANT. Do not edit!
#Thu Sep 11 14:48:23 EDT 2014
build.number=3
I need a sample pom.xml that will get me up and running with the 2.0 code.
I have searched and searched and not found a simple, sample pom.xml that
would just work.
I tried the dependency for com.tinkerpop.blueprints, with 2.5.0 and
2.5.0-SNAPSHOT, and IDEA keeps telling me this is not available:
import com.tinkerpop.blueprints......;
^ blueprints not found.
I think it is necessary to have a sample project on github that allows a
developer to get started with Graph database from Java, perhaps going
against the VehicleRegistration or GratefulDead databases. I'd be happy to
help create this project with some guidance.
thanks,
Laramie
P.S. Here is my pom, which I got from your documentation, and changed to
com.tinkerpop.blueprints with 2.5.0-SNAPSHOT. ( I have also attached the
pom and my java test client.)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>anarchia</groupId>
<artifactId>anarchia</artifactId>
<version>1.0-SNAPSHOT</version>
<distributionManagement>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orient-commons</artifactId>
<version>2.0-SNAPSHOT</version>
<type>bundle</type>
</dependency>
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-core</artifactId>
<version>2.0-SNAPSHOT</version>
<type>bundle</type>
</dependency>
<!-- INCLUDE THIS IF YOU'RE CONNECTING TO THE SERVER THROUGH THE
REMOTE ENGINE -->
<dependency>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-client</artifactId>
<version>2.0-SNAPSHOT</version>
<type>bundle</type>
</dependency>
<!-- END REMOTE ENGINE DEPENDENCY -->
<!-- INCLUDE THIS IF YOU'RE USING THE TINKERPOP'S BLUEPRINTS API -->
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-orient-graph</artifactId>
<version>2.5.0-SNAPSHOT</version>
<type>bundle</type>
</dependency>
<!-- END BLUEPRINTS DEPENDENCY -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.6</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
package us.anarchia.db;
import com.orientechnologies.orient.core.db.document.ODatabaseDocument;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentPool;
import com.tinkerpop.blueprints.TransactionalGraph;
// ^^ errors here, says com.tinkerpop does not exist.
import com.tinkerpop.blueprints.impls.orient.OrientGraph;
import com.tinkerpop.blueprints.impls.orient.OrientGraphFactory;
import com.tinkerpop.blueprints.impls.orient.OrientGraphFactory;
import com.tinkerpop.blueprints.impls.orient.OrientGraph;
import com.tinkerpop.blueprints.impls.orient.OrientVertex;
import com.orientechnologies.orient.core.record.impl.ODocument;
//import com.orientechnologies.orient.core.record.impl.OType;
import java.util.*;
public class Populate {
public static void test() {
ODatabaseDocument database = ODatabaseDocumentPool.global().acquire("remote:localhost/tagonomy", "root", "cooper");
try{
} finally {
database.close();
}
}
public static void testGraph(){
//OrientGraphFactory factory = new OrientGraphFactory("remote:localhost/tagonomy", "root", "cooper").setupPool(1,10);
// EVERY TIME YOU NEED A GRAPH INSTANCE:
//OrientGraph graph = factory.getTx();
OrientGraph graph = new OrientGraph("remote:localhost/tagonomy");
try {
OrientVertex tag = graph.addVertex("class:Tag");
tag.setProperty("name", "myname");
System.out.println("tag:"+tag);
tag.save();
System.out.println("tag.id:"+tag.getId());
} finally {
graph.shutdown();
}
}
public static void testGraphLinkMap(){
OrientGraph graph = new OrientGraph("remote:localhost/tagonomy");
try {
System.out.println("starting...");
OrientVertex tag = graph.addVertex("class:Tag");
tag.setProperty("name", "parent");
//you have to know the RID to use this line, but it works, instead of the above lines:
//OrientVertex tag = graph.getVertex("#12:5");
//System.out.println("map:"+tag.getProperty("children"));
OrientVertex tagchild = graph.addVertex("class:Tag");
tagchild.setProperty("name", "theChild3");
final Map<String, OrientVertex> map = new HashMap<String, OrientVertex>();
map.put("child", tagchild);
Iterable<OrientVertex> it = tag.getProperty("children");
if (it != null){
int i = 0;
for (OrientVertex v: it){
map.put("child"+(i++), v);
}
}
tag.setProperty("children", map);
tag.save();
tagchild.save();
System.out.println("done.");
} finally {
graph.shutdown();
}
}
public void finalize() {
ODatabaseDocumentPool.global().close();
}
public static void main(String[] args){
//testGraph();
testGraphLinkMap();
}
}
pom.xml
Description: XML document
