001    /**
002     * ObtainQueryFromProfile.java
003     * jCOLIBRI2 framework. 
004     * @author Juan A. Recio-García.
005     * GAIA - Group for Artificial Intelligence Applications
006     * http://gaia.fdi.ucm.es
007     * 04/11/2007
008     */
009    package jcolibri.extensions.recommendation.ContentBasedProfile;
010    
011    import jcolibri.cbrcore.CBRQuery;
012    import jcolibri.connector.xmlutils.QuerySerializer;
013    
014    /**
015     * Obtains an user profile (query object) from a XML file.
016     * 
017     * @author Juan A. Recio-Garcia
018     * @author Developed at University College Cork (Ireland) in collaboration with Derek Bridge.
019     * @version 1.0
020     * @see jcolibri.connector.xmlutils.QuerySerializer
021     */
022    public class ObtainQueryFromProfile
023    {
024        /**
025         * Obtains a query from a XML file
026         * @param filename of the XML file
027         * @return the query
028         */
029        public static CBRQuery obtainQueryFromProfile(String filename)
030        {
031            return QuerySerializer.deserializeQuery(filename);
032        }
033    }