KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > jcr > impl > core > itemvisitors > MockVisitor


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5
6 package org.exoplatform.services.jcr.impl.core.itemvisitors;
7
8 import javax.jcr.ItemVisitor;
9 import javax.jcr.RepositoryException;
10 import javax.jcr.Property;
11 import javax.jcr.Node;
12
13 /**
14  * Created by The eXo Platform SARL
15  *
16  * @author <a HREF="mailto:geaz@users.sourceforge.net">Gennady Azarenkov</a>
17  * @version $Id: MockVisitor.java,v 1.3 2004/08/14 10:07:25 benjmestrallet Exp $
18  */

19
20 public class MockVisitor implements ItemVisitor {
21
22   private String JavaDoc str;
23
24   public void visit(Property property) throws RepositoryException {
25     str = "property:" + property.getName();
26   }
27
28   public void visit(Node node) throws RepositoryException {
29     str = "node:" + node.getName();
30   }
31
32   public String JavaDoc toString() {
33     return str;
34   }
35
36 }
37
Popular Tags