/** * @param db * @return a db transformed in a database of events ??? */ public Database preProcessing(Database db) { Vector<Element> alphabet = m_tdm.m_contentC.m_taxonomy.getAlphabet(m_tdm.m_contentC.m_level); Database preprocDB = new Database(); for (int i = 0; i < db.getSize(); i++) { EventSequence s = db.elementAt(i); Vector<Event> events = new Vector<Event>(0); for (int k = 0; k < s.length(); k++) { Event e = s.elementAtIndex(k); if (m_tdm.m_temporalC.accepts(e)) { Vector<Element> v = getParents(e.getSet(), alphabet, m_tdm.m_contentC.m_taxonomy); if (null != v) events.addElement(new Event(new ItemSet(v), e.getInstant())); } } if (0 != events.size()) preprocDB.addElement(new EventSequence(events)); } preprocDB.setAlphabet(alphabet); return preprocDB; }