Source code: org/miamm/castor/NullIDResolver.java
1 /* -*- Mode: java; indent-tabs-mode:nil; c-basic-offset: 2 -*-
2 * ex: set sw=2 expandtab:
3 * $Id: NullIDResolver.java,v 1.1 2003/03/05 22:54:44 kowey Exp $
4 *
5 * This software is released under a BSD-style license.
6 * Please see the LICENSE file in this distribution.
7 */
8
9 package org.miamm.castor;
10
11 import org.apache.log4j.Logger;
12 import org.exolab.castor.xml.IDResolver;
13
14 /**
15 * A Castor IDResolver which returns the String for the ID instead of
16 * the object. This is useful because we don't always have the
17 * referred object lying about, but we would like to talk about it
18 * anyway.
19 *
20 * @version
21 * $Revision: 1.1 $<br>
22 * $Date: 2003/03/05 22:54:44 $<br>
23 * @author Eric Kow (kow at loria point fr)
24 */
25 public class NullIDResolver implements IDResolver {
26 static Logger _logger = Logger.getLogger(NullIDResolver.class);
27
28 // ---------------------------------------------------------------
29 // constructor
30 // ---------------------------------------------------------------
31 public NullIDResolver() {
32 super();
33 }
34
35 // ---------------------------------------------------------------
36 // IDResolver
37 // ---------------------------------------------------------------
38 public Object resolve(String idref) {
39 return idref;
40 }
41
42 } // end NullIDResolver
43