01: /*
02: * LICENSE INFORMATION
03: * Copyright 2005-2007 by FZI (http://www.fzi.de).
04: * Licensed under a BSD license (http://www.opensource.org/licenses/bsd-license.php)
05: * <OWNER> = Max Völkel
06: * <ORGANIZATION> = FZI Forschungszentrum Informatik Karlsruhe, Karlsruhe, Germany
07: * <YEAR> = 2007
08: *
09: * Project information at http://semweb4j.org/rdf2go
10: */
11: package org.ontoware.rdf2go.util;
12:
13: /**
14: *
15: * Converts instances from one type to another.
16: * Useful for implementing adapters.
17: * @author sauermann <leo.sauermann@dfki.de>
18: * @param <FROM> The class that is the source of conversion
19: * @param <TO> The class that is converted to
20: */
21: public interface Converter<FROM, TO> {
22:
23: /**
24: * convert the passed object to the outgoing object
25: * @param source the source object to convert
26: * @return the converted object
27: * @throws ConversionException if something goes wrong.
28: */
29: public TO convert(FROM source) throws ConversionException;
30:
31: }
|