// Path: src/main/java/com/rolfje/anonimatron/synonyms/Synonym.java
// public interface Synonym {
// 
// 	/**
// 	 * Indicates if this Synonym is short-lived or transient, meaning that
//      * it should not be stored in the synonyms file. Transient Synonyms
//      * are not stored, need to be calculated each run time.
// 	 *
// 	 * Transient synonyms are:
// 	 *
// 	 * <ol>
// 	 *     <li>Not stored in memory.</li>
// 	 *     <li>Not stored in the synonym file.</li>
// 	 * </ol>
// 	 *
// 	 * @return <code>true</code> if the synonym should be thrown away
// 	 * after use (not stored in the synonym file).
// 	 */
// 	boolean isShortLived();
// 
// 	/**
// 	 * @return The semantic data type of this Synonym, usually something
// 	 *         descriptive as "NAME" or "STREET".
// 	 */
// 	String getType();
// 
// 	/**
// 	 * @return The data which was in the original database for this Synonym
// 	 */
// 	Object getFrom();
// 
// 	/**
// 	 * 
// 	 * @return The data with which the original data in the database will be or
// 	 *         is replaced when the Anonymizer runs.
// 	 */
// 	Object getTo();
// }


import com.rolfje.anonimatron.synonyms.Synonym;
import java.sql.Date;
import java.util.Map;
package com.rolfje.anonimatron.anonymizer;



/**
 * Provides functionality for consitently anonymizing a piece of data.
 * <p>
 * Implementations of this interface must make sure that anonymization is done
 * in a reproducable manner. That is, if A transforms into B, it has to
 * consistently do so on each and every call.
 * <p>
 * By doing this, anonimatron can guarantee that data is transformed
 * consistently accross all tables of the database, and referential constraints
 * can be re-enforced after anonymization.
 */
public interface Anonymizer {

    /**
     * @return The ID or name of this anonymizer, as used in the XML
     * configuration file. This is generally something along the lines
     * of "LASTNAME" or "UNEVENNUMBER". Please see the output of the
     * -configexample command line option when running Anonimatron.
     */
    String getType();

    /**
     * Anonymizes the given data into a non-tracable, non-reversible synonym,
     * and does it consistently, so that A always translates to B.
     *
     * @param from       the data to be anonymized, usually passed in as a
     *                   {@link String}, {@link Integer}, {@link Date} or other classes
     *                   which can be stored in a single JDBC database column.
     * @param size       the optional maximum size of the generated value
     * @param shortlived indicates that the generated synonym must have the
     *                   {@link Synonym#isShortLived()} boolean set
     * @return a {@link Synonym}
     */
// Path: src/main/java/com/rolfje/anonimatron/synonyms/Synonym.java
// public interface Synonym {
// 
// 	/**
// 	 * Indicates if this Synonym is short-lived or transient, meaning that
//      * it should not be stored in the synonyms file. Transient Synonyms
//      * are not stored, need to be calculated each run time.
// 	 *
// 	 * Transient synonyms are:
// 	 *
// 	 * <ol>
// 	 *     <li>Not stored in memory.</li>
// 	 *     <li>Not stored in the synonym file.</li>
// 	 * </ol>
// 	 *
// 	 * @return <code>true</code> if the synonym should be thrown away
// 	 * after use (not stored in the synonym file).
// 	 */
// 	boolean isShortLived();
// 
// 	/**
// 	 * @return The semantic data type of this Synonym, usually something
// 	 *         descriptive as "NAME" or "STREET".
// 	 */
// 	String getType();
// 
// 	/**
// 	 * @return The data which was in the original database for this Synonym
// 	 */
// 	Object getFrom();
// 
// 	/**
// 	 * 
// 	 * @return The data with which the original data in the database will be or
// 	 *         is replaced when the Anonymizer runs.
// 	 */
// 	Object getTo();
// }


// Path: src/main/java/com/rolfje/anonimatron/anonymizer/Anonymizer.java
import com.rolfje.anonimatron.synonyms.Synonym;
import java.sql.Date;
import java.util.Map;

package com.rolfje.anonimatron.anonymizer;



/**
 * Provides functionality for consitently anonymizing a piece of data.
 * <p>
 * Implementations of this interface must make sure that anonymization is done
 * in a reproducable manner. That is, if A transforms into B, it has to
 * consistently do so on each and every call.
 * <p>
 * By doing this, anonimatron can guarantee that data is transformed
 * consistently accross all tables of the database, and referential constraints
 * can be re-enforced after anonymization.
 */
public interface Anonymizer {

    /**
     * @return The ID or name of this anonymizer, as used in the XML
     * configuration file. This is generally something along the lines
     * of "LASTNAME" or "UNEVENNUMBER". Please see the output of the
     * -configexample command line option when running Anonimatron.
     */
    String getType();

    /**
     * Anonymizes the given data into a non-tracable, non-reversible synonym,
     * and does it consistently, so that A always translates to B.
     *
     * @param from       the data to be anonymized, usually passed in as a
     *                   {@link String}, {@link Integer}, {@link Date} or other classes
     *                   which can be stored in a single JDBC database column.
     * @param size       the optional maximum size of the generated value
     * @param shortlived indicates that the generated synonym must have the
     *                   {@link Synonym#isShortLived()} boolean set
     * @return a {@link Synonym}
     */
    Synonym anonymize(Object from, int size, boolean shortlived);