@@ -0,0 +1,2482 @@
+/*%0A *  Copyright (C) 2011 The Animo Project%0A *  http://animotron.org%0A *%0A *  This program is free software; you can redistribute it and/or%0A *  modify it under the terms of the GNU Lesser General Public License%0A *  as published by the Free Software Foundation; either version 3%0A *  of the License, or (at your option) any later version.%0A *%0A *  This program is distributed in the hope that it will be useful,%0A *  but WITHOUT ANY WARRANTY; without even the implied warranty of%0A *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A *  GNU Lesser General Public License for more details.%0A *%0A *  You should have received a copy of the GNU Lesser General Public License%0A *  along with this program; if not, write to the Free Software%0A *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.%0A */%0Apackage org.animotron.graph;%0A%0Aimport static org.animotron.Expression.*;%0A%0Aimport javax.xml.stream.XMLStreamException;%0A%0Aimport org.animotron.ATest;%0Aimport org.animotron.Expression;%0Aimport org.animotron.operator.THE;%0Aimport org.junit.Test;%0Aimport org.neo4j.graphdb.Relationship;%0A%0A%0A/**%0A * @author %3Ca href=%22mailto:shabanovd@gmail.com%22%3EDmitriy Shabanov%3C/a%3E%0A *%0A */%0Apublic class TopTest extends ATest %7B%0A%09%0A%09private static final Relationship A = %0A%09%09new Expression(s(THE._, %22A%22)).build();%0A%09%0A%09private static final Relationship B = %0A%09%09new Expression(s(THE._, %22B%22)).build();%0A%09%0A%09private static final Relationship C = %0A%09%09new Expression(s(THE._, %22C%22)).build();%0A%09%0A%09@Test%0A%09public void storeAndSerializeResult() throws XMLStreamException %7B%0A%09%09%0A%09%09System.out.println(%22Prepare%22);%0A%09%09System.out.print(%22The a: %22);%0A%09%09GraphSerializer.serialize(A, System.out);%0A%09%09System.out.println();%0A%09%09System.out.print(%22The b: %22);%0A%09%09GraphSerializer.serialize(B, System.out);%0A%09%09System.out.println();%0A%09%09System.out.print(%22The c: %22);%0A%09%09GraphSerializer.serialize(C, System.out);%0A%09%09System.out.println();%0A%09%09System.out.println();%0A%09%09%0A        %0A//        Transaction tx = AnimoGraph.beginTx();%0A//        try %7B %0A//%09        Relationship r = THE._.relationship(%22B%22);%0A//%09        assertNotNull(r);%0A//%09        XMLStreamWriter writer = OUTPUT_FACTORY.createXMLStreamWriter(System.out);%0A//%09        StAXGraphSerializer serializer = new StAXGraphSerializer(writer);%0A//%09        serializer.serialize(r);%0A//%09        tx.success();%0A//%09        %0A//        %7D catch (Exception e) %7B%0A//        %09e.printStackTrace();%0A//%09%09%09fail(e.toString());%0A//        %7D finally %7B%0A//        %09tx.finish();%0A//        %7D%0A            %0A        System.out.println(%22done.%22);%0A%09%7D%0A%7D%0A

Prepare TopTest