Acuatally remove libraries/neo4j source files
Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/c9c4910c Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/c9c4910c Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/c9c4910c Branch: refs/heads/develop Commit: c9c4910c9fa07ebec1423b3736bbf1e6bc338580 Parents: 2699953 Author: Paul Merlin <[email protected]> Authored: Mon Jun 15 12:05:57 2015 +0200 Committer: Paul Merlin <[email protected]> Committed: Mon Jun 15 12:05:57 2015 +0200 ---------------------------------------------------------------------- libraries/neo4j/build.gradle | 14 --- libraries/neo4j/dev-status.xml | 19 ---- libraries/neo4j/src/docs/neo4j.txt | 31 ------- .../library/neo4j/EmbeddedDatabaseService.java | 98 -------------------- .../java/org/qi4j/library/neo4j/package.html | 5 - .../library/neo4j/DocumentationSupport.java | 45 --------- .../neo4j/EmbeddedDatabaseServiceTest.java | 71 -------------- 7 files changed, 283 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c9c4910c/libraries/neo4j/build.gradle ---------------------------------------------------------------------- diff --git a/libraries/neo4j/build.gradle b/libraries/neo4j/build.gradle deleted file mode 100644 index 8819f7b..0000000 --- a/libraries/neo4j/build.gradle +++ /dev/null @@ -1,14 +0,0 @@ -description = "Qi4j Neo4j Library provides a service wrapper for the Neo4j Graph Database" - -jar { manifest { name = "Qi4j Library - Neo4j" }} - -dependencies { - compile(project(":org.qi4j.core:org.qi4j.core.spi")) - compile(project(":org.qi4j.libraries:org.qi4j.library.fileconfig")) - compile(libraries.neo4j) - - testCompile(project(":org.qi4j.core:org.qi4j.core.testsupport")) - - testRuntime(project(":org.qi4j.core:org.qi4j.core.runtime")) - testRuntime(libraries.logback) -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c9c4910c/libraries/neo4j/dev-status.xml ---------------------------------------------------------------------- diff --git a/libraries/neo4j/dev-status.xml b/libraries/neo4j/dev-status.xml deleted file mode 100644 index 26a1204..0000000 --- a/libraries/neo4j/dev-status.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.qi4j.org/schemas/2008/dev-status/1 - http://www.qi4j.org/schemas/2008/dev-status/1/dev-status.xsd"> - <status> - <!--none,early,beta,stable,mature--> - <codebase>beta</codebase> - - <!-- none, brief, good, complete --> - <documentation>brief</documentation> - - <!-- none, some, good, complete --> - <unittests>some</unittests> - </status> - <licenses> - <license>ALv2</license> - </licenses> -</module> http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c9c4910c/libraries/neo4j/src/docs/neo4j.txt ---------------------------------------------------------------------- diff --git a/libraries/neo4j/src/docs/neo4j.txt b/libraries/neo4j/src/docs/neo4j.txt deleted file mode 100644 index 0e13414..0000000 --- a/libraries/neo4j/src/docs/neo4j.txt +++ /dev/null @@ -1,31 +0,0 @@ -[[library-neo4j, Neo4j Library]] -= Neo4j = - -[devstatus] --------------- -source=libraries/neo4j/dev-status.xml --------------- - -The Neo4J Library provides a Neo4J embedded database as a Qi4j Service. - -include::../../build/docs/buildinfo/artifact.txt[] - -== Assembly == - -Simply assemble the Service: - -[snippet,java] ----- -source=libraries/neo4j/src/test/java/org/qi4j/library/neo4j/DocumentationSupport.java -tag=assembly ----- - -== Usage == - -The embedded Neo4J database files are stored in the `data` directory defined using the <<library-fileconfig>>. - -[snippet,java] ----- -source=libraries/neo4j/src/test/java/org/qi4j/library/neo4j/DocumentationSupport.java -tag=neo4j ----- http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c9c4910c/libraries/neo4j/src/main/java/org/qi4j/library/neo4j/EmbeddedDatabaseService.java ---------------------------------------------------------------------- diff --git a/libraries/neo4j/src/main/java/org/qi4j/library/neo4j/EmbeddedDatabaseService.java b/libraries/neo4j/src/main/java/org/qi4j/library/neo4j/EmbeddedDatabaseService.java deleted file mode 100644 index cecd08b..0000000 --- a/libraries/neo4j/src/main/java/org/qi4j/library/neo4j/EmbeddedDatabaseService.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2011, Rickard Ãberg. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package org.qi4j.library.neo4j; - -import java.io.File; -import org.neo4j.graphdb.GraphDatabaseService; -import org.neo4j.kernel.EmbeddedGraphDatabase; -import org.qi4j.api.activation.ActivatorAdapter; -import org.qi4j.api.activation.Activators; -import org.qi4j.api.injection.scope.Service; -import org.qi4j.api.injection.scope.Uses; -import org.qi4j.api.mixin.Mixins; -import org.qi4j.api.service.ServiceComposite; -import org.qi4j.api.service.ServiceDescriptor; -import org.qi4j.api.service.ServiceReference; -import org.qi4j.library.fileconfig.FileConfiguration; - -/** - * TODO - */ -@Mixins(EmbeddedDatabaseService.Mixin.class) -@Activators( EmbeddedDatabaseService.Activator.class ) -public interface EmbeddedDatabaseService - extends ServiceComposite -{ - void startDatabase() - throws Exception; - - void stopDatabase() - throws Exception; - - GraphDatabaseService database(); - - class Activator - extends ActivatorAdapter<ServiceReference<EmbeddedDatabaseService>> - { - - @Override - public void afterActivation( ServiceReference<EmbeddedDatabaseService> activated ) - throws Exception - { - activated.get().startDatabase(); - } - - @Override - public void beforePassivation( ServiceReference<EmbeddedDatabaseService> passivating ) - throws Exception - { - passivating.get().stopDatabase(); - } - - } - - abstract class Mixin - implements EmbeddedDatabaseService - { - @Service - FileConfiguration config; - - @Uses - ServiceDescriptor descriptor; - - EmbeddedGraphDatabase db; - - @Override - public void startDatabase() - throws Exception - { - String path = new File( config.dataDirectory(), identity().get() ).getAbsolutePath(); - db = new EmbeddedGraphDatabase( path ); - } - - @Override - public void stopDatabase() - throws Exception - { - db.shutdown(); - } - - @Override - public GraphDatabaseService database() - { - return db; - } - - } -} http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c9c4910c/libraries/neo4j/src/main/java/org/qi4j/library/neo4j/package.html ---------------------------------------------------------------------- diff --git a/libraries/neo4j/src/main/java/org/qi4j/library/neo4j/package.html b/libraries/neo4j/src/main/java/org/qi4j/library/neo4j/package.html deleted file mode 100644 index 6083b0c..0000000 --- a/libraries/neo4j/src/main/java/org/qi4j/library/neo4j/package.html +++ /dev/null @@ -1,5 +0,0 @@ -<html> - <body> - <h2>Neo4j Library.</h2> - </body> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c9c4910c/libraries/neo4j/src/test/java/org/qi4j/library/neo4j/DocumentationSupport.java ---------------------------------------------------------------------- diff --git a/libraries/neo4j/src/test/java/org/qi4j/library/neo4j/DocumentationSupport.java b/libraries/neo4j/src/test/java/org/qi4j/library/neo4j/DocumentationSupport.java deleted file mode 100644 index 357db1f..0000000 --- a/libraries/neo4j/src/test/java/org/qi4j/library/neo4j/DocumentationSupport.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012, Paul Merlin. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package org.qi4j.library.neo4j; - -import org.neo4j.graphdb.GraphDatabaseService; -import org.qi4j.api.injection.scope.Service; -import org.qi4j.bootstrap.Assembler; -import org.qi4j.bootstrap.AssemblyException; -import org.qi4j.bootstrap.ModuleAssembly; - -public class DocumentationSupport - implements Assembler -{ - - // START SNIPPET: assembly - public void assemble( ModuleAssembly module ) - throws AssemblyException - { - module.services( EmbeddedDatabaseService.class ); - } - // END SNIPPET: assembly - - // START SNIPPET: neo4j - @Service EmbeddedDatabaseService neo4jService; - - public void doSomething() - { - GraphDatabaseService db = neo4jService.database(); - // END SNIPPET: neo4j - // START SNIPPET: neo4j - } - // END SNIPPET: neo4j - -} http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c9c4910c/libraries/neo4j/src/test/java/org/qi4j/library/neo4j/EmbeddedDatabaseServiceTest.java ---------------------------------------------------------------------- diff --git a/libraries/neo4j/src/test/java/org/qi4j/library/neo4j/EmbeddedDatabaseServiceTest.java b/libraries/neo4j/src/test/java/org/qi4j/library/neo4j/EmbeddedDatabaseServiceTest.java deleted file mode 100644 index 5368cdb..0000000 --- a/libraries/neo4j/src/test/java/org/qi4j/library/neo4j/EmbeddedDatabaseServiceTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2011, Rickard Ãberg. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package org.qi4j.library.neo4j; - -import org.junit.Test; -import org.neo4j.graphdb.GraphDatabaseService; -import org.neo4j.graphdb.Node; -import org.neo4j.graphdb.RelationshipType; -import org.neo4j.graphdb.Transaction; -import org.qi4j.bootstrap.AssemblyException; -import org.qi4j.bootstrap.ModuleAssembly; -import org.qi4j.library.fileconfig.FileConfigurationService; -import org.qi4j.test.AbstractQi4jTest; - -/** - * TODO - */ -public class EmbeddedDatabaseServiceTest - extends AbstractQi4jTest -{ - enum TestRelationships implements RelationshipType - { - KNOWS - } - - @Override - public void assemble( ModuleAssembly module ) - throws AssemblyException - { - module.services( FileConfigurationService.class ); - module.services( EmbeddedDatabaseService.class ); - } - - @Test - public void testDatabase() - { - GraphDatabaseService database = module.findService( EmbeddedDatabaseService.class ).get().database(); - - { - Transaction tx = database.beginTx(); - - try - { - Node rickard = database.createNode(); - rickard.setProperty( "name", "Rickard" ); - - Node niclas = database.createNode(); - niclas.setProperty( "name", "Niclas" ); - - rickard.createRelationshipTo( niclas, TestRelationships.KNOWS ); - - tx.success(); - } - finally - { - tx.finish(); - } - } - } -}
