This file contains hidden or 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
2014-01-03 10:59:58.498+0000 INFO [o.n.k.i.DiagnosticsManager]: --- INITIALIZED diagnostics START --- | |
2014-01-03 10:59:58.506+0000 INFO [o.n.k.i.DiagnosticsManager]: Neo4j Kernel properties: | |
2014-01-03 10:59:58.516+0000 INFO [o.n.k.i.DiagnosticsManager]: neostore.propertystore.db.mapped_memory=182M | |
2014-01-03 10:59:58.517+0000 INFO [o.n.k.i.DiagnosticsManager]: neo_store=C:\Users\PAUL-J~1\DEVELO~1\CUBBYH~1\CUBBYH~2.WEB\neo4j\NEO4J-~1.0\data\graph.db\neostore | |
2014-01-03 10:59:58.517+0000 INFO [o.n.k.i.DiagnosticsManager]: neostore.nodestore.db.mapped_memory=50M | |
2014-01-03 10:59:58.517+0000 INFO [o.n.k.i.DiagnosticsManager]: neostore.propertystore.db.strings.mapped_memory=154M | |
2014-01-03 10:59:58.517+0000 INFO [o.n.k.i.DiagnosticsManager]: neo4j.ext.udc.source=server | |
2014-01-03 10:59:58.518+0000 INFO [o.n.k.i.DiagnosticsManager]: store_dir=data/graph.db | |
2014-01-03 10:59:58.518+0000 INFO [o.n.k.i.DiagnosticsManager]: neostore.relationshipstore.db.mapped_memory=223M | |
2014-01-03 10:59:58.518+0000 INFO [o. |
This file contains hidden or 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
package com.supinfo.java; | |
import javax.ejb.Remote; | |
@Remote | |
public interface FirstSessionBean { | |
public String sayHello(); | |
} |
This file contains hidden or 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
package com.supinfo.suprails.web.servlet; | |
import com.supinfo.suprails.entity.Customer; | |
import com.supinfo.suprails.entity.CustomerOrder; | |
import com.supinfo.suprails.entity.Trip; | |
import com.supinfo.suprails.service.CustomerOrderService; | |
import com.supinfo.suprails.service.TripService; | |
import java.io.IOException; | |
import javax.ejb.EJB; | |
import javax.servlet.ServletException; |
This file contains hidden or 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
@NodeEntity | |
public class User { | |
@GraphId | |
private Long id; | |
private String firstName; | |
private String lastName; | |
This file contains hidden or 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
// Put the article titles into a database | |
Class.forName("org.neo4j.jdbc.Driver"); | |
Connection con = DriverManager.getConnection("jdbc:neo4j://localhost:7474/"); | |
titles.each { | |
def cypherQuery = """ | |
MERGE (w:Website {name: {1}}) | |
MERGE (d:Day {date: {2}}) | |
CREATE | |
(a:Article {3}), |
This file contains hidden or 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
// Load Jsoup used the get html pages and query them | |
@Grab("org.jsoup:jsoup:1.8.2") | |
import org.jsoup.Jsoup | |
// Load Neo4j JDBC to load data and query a Neo4j database | |
@GrabResolver(name='neo4j-public', root='http://m2.neo4j.org/content/groups/public') | |
@Grab("org.neo4j:neo4j-jdbc:2.1.4") | |
import org.neo4j.jdbc.Driver | |
import groovy.sql.Sql |
This file contains hidden or 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
@Repository | |
public interface IdeaRepository extends GraphRepository<Idea> { | |
@Query("MATCH (i:Idea) WHERE id(i) = {0} WITH i " + | |
"OPTIONAL MATCH (u:User)-[:UPVOTE]->(i) " + | |
"WITH i, collect(u) as upVoters " + | |
"OPTIONAL MATCH (u:User)-[:DOWNVOTE]->(i) " + | |
"RETURN id(i) as ideaId, upVoters, collect(u) as downVoters ") | |
Iterable<IdeaVotesQueryResult> findVoters(Long id); | |
This file contains hidden or 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 class Main { | |
public static void main(String[] args) { | |
Configuration config = new Configuration(); | |
config | |
.driverConfiguration() | |
.setDriverClassName(HttpDriver.class.getName()) | |
.setURI("http://localhost:7474"); | |
SessionFactory sessionFactory = new SessionFactory(config, "fr.zenika.zenapp.ogm.domain"); |
This file contains hidden or 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
@Component | |
public class Neo4jHelper { | |
@Autowired | |
private Neo4jOperations neo4jOperations; | |
public <T extends DomainComponent> Set<T> queryAsSetWithSingleParam(String cypher, Object param1, Class<T> targetClass, String targetKey) { | |
Map<String, Object> params = new HashMap<>(); | |
params.put("0", param1); | |
return queryAsSet(cypher, params, targetClass, targetKey); |
This file contains hidden or 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
FROM leward/codenvy-jekyll |
OlderNewer