#Usage
- Launch Automator (Applications > Utilities > Automator)
- Select Utilities from the Library
- Drag "Run AppleScript" into workflow
- Paste and edit the below as appropriate.
###The AppleScript
| = CBDE - Pràctica Neo4j | |
| :neo4j-version: 2.0.3 | |
| :author: Martí Zamora Casals & Javier Ferrer González | |
| :twitter: @JavierCane | |
| == Disclaimer | |
| Pràctica feta per en Martí Zamora Casals i en https://twitter.com/JavierCane[Javier Ferrer González]. + |
| == Neo4j training | |
| === System init | |
| We'll initialize the system with the actors, movies and directors dataset provided with the Neo4j installation. | |
| // setup | |
| // hide | |
| [source,cypher] | |
| ---- | |
| CREATE (TheMatrix:Movie {title:'The Matrix', released:1999, tagline:'Welcome to the Real World'}) |
| == Neo4j training (inserts, deletes and updates) | |
| === System init | |
| We'll initialize the system with the actors, movies and directors dataset provided with the Neo4j installation. | |
| // setup | |
| // hide | |
| [source,cypher] | |
| ---- | |
| CREATE (TheMatrix:Movie {title:'The Matrix', released:1999, tagline:'Welcome to the Real World'}) |
| private static HashMap<String, String> getAttribute( JSONObject attributesJson ) | |
| { | |
| HashMap<String, String> attribute = new HashMap<String, String>(); | |
| try | |
| { | |
| attribute.put( "key", attributesJson.getString( "key" ) ); | |
| attribute.put( "value", attributesJson.getString( "value" ) ); | |
| } |
#Usage
###The AppleScript
| <?php | |
| namespace AppBundle\Controller; | |
| use FOS\RestBundle\Controller\FOSRestController; | |
| use Symfony\Component\HttpFoundation\Request; | |
| final class CourseController extends FOSRestController | |
| { | |
| public function getCourseAction(Request $request) | |
| { | |
| return $this->getDoctrine() | |
| ->getEntityManager() |
| <?php | |
| namespace AppBundle\Controller; | |
| use FOS\RestBundle\Controller\FOSRestController; | |
| use Symfony\Component\HttpFoundation\Request; | |
| final class CourseController extends FOSRestController | |
| { | |
| public function getCourseAction(Request $request) | |
| { | |
| return $this->getDoctrine() | |
| ->getEntityManager() |
| <?php | |
| namespace AppBundle\Tests\Controller; | |
| use AppBundle\Controller\CourseController; | |
| use Doctrine\Bundle\DoctrineBundle\Registry; | |
| use Doctrine\ORM\AbstractQuery; | |
| use Doctrine\ORM\EntityManager; | |
| use Doctrine\ORM\QueryBuilder; | |
| use PHPUnit_Framework_TestCase; |
| <?php | |
| namespace CodelyTv\Api\Controller; | |
| use CodelyTv\Context\Meetup\Module\Video\Domain\Create\CreateVideoCommand; | |
| use CodelyTv\Infrastructure\Bus\Command\CommandBus; | |
| use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
| use Symfony\Component\HttpFoundation\Request; | |
| use Symfony\Component\HttpFoundation\Response; |
| <?php | |
| namespace CodelyTv\Context\Meetup\Module\Video\Domain\Create; | |
| use CodelyTv\Context\Meetup\Module\Video\Domain\Video; | |
| use CodelyTv\Context\Meetup\Module\Video\Domain\VideoId; | |
| use CodelyTv\Context\Meetup\Module\Video\Domain\VideoRepository; | |
| use CodelyTv\Context\Meetup\Module\Video\Domain\VideoTitle; | |
| use CodelyTv\Context\Meetup\Module\Video\Domain\VideoUrl; | |
| use CodelyTv\Infrastructure\Bus\Event\DomainEventPublisher; |