Révision 2206
tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/KRAnnotationEngine.java (revision 2206) | ||
---|---|---|
305 | 305 |
// create the "DEFAULT" KR configuration |
306 | 306 |
Preferences krconf = node.node(corpus.getID()); |
307 | 307 |
krconf.put("name", corpus.getID()); |
308 |
// |
|
309 | 308 |
} |
310 | 309 |
names = node.childrenNames(); |
311 | 310 |
return Arrays.asList(names); // getKnowledgeRepositoryNames(params); |
... | ... | |
413 | 412 |
|
414 | 413 |
@Override |
415 | 414 |
public boolean processFile(File xmlFile, File binaryCorpusDirectory, HashMap<String, Object> parameters) { |
416 |
// TODO not implemented yet. |
|
417 | 415 |
return false; |
418 | 416 |
} |
419 | 417 |
|
... | ... | |
454 | 452 |
Preferences krconf = node.node(name); |
455 | 453 |
krconf.put("name", name); |
456 | 454 |
} |
457 |
|
|
458 | 455 |
} catch (BackingStoreException e) { |
459 | 456 |
e.printStackTrace(); |
460 | 457 |
} |
tmp/org.txm.annotation.kr.core/src/org/txm/annotation/kr/core/storage/temporary/TemporaryAnnotationManager.java (revision 2206) | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import org.eclipse.persistence.config.PersistenceUnitProperties; |
14 | 14 |
import org.eclipse.persistence.jpa.PersistenceProvider; |
15 |
import org.txm.annotation.core.preferences.AnnotationPreferences; |
|
16 | 15 |
import org.txm.annotation.kr.core.Annotation; |
17 | 16 |
import org.txm.annotation.kr.core.AnnotationPK; |
18 | 17 |
import org.txm.annotation.kr.core.DatabasePersistenceManager; |
... | ... | |
256 | 255 |
return query.getResultList(); |
257 | 256 |
} |
258 | 257 |
|
259 |
|
|
260 | 258 |
/** |
261 | 259 |
* returns all annotations with no particular constraints |
262 | 260 |
* @return |
... | ... | |
446 | 444 |
if (em == null) return false; |
447 | 445 |
TypedQuery<Annotation> query = em.createQuery("SELECT annot FROM Annotation AS annot", Annotation.class); |
448 | 446 |
//System.out.println("hasChanges query rez: "+query.getResultList()); |
449 |
return query.setMaxResults(1).getResultList().size() > 0; |
|
447 |
return query.setMaxResults(1).getResultList().size() > 0; // get only the first match -> faster
|
|
450 | 448 |
} catch(Exception e) { |
451 | 449 |
Log.severe("** Error while testing corpus annotations state: "+e); |
452 | 450 |
} |
Formats disponibles : Unified diff