Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Dernière révision Les deux révisions suivantes | ||
scrutaridata:exportapi:java [2010/02/11 18:40] vincent |
scrutaridata:exportapi:java [2016/07/06 18:28] vincent |
||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
* Fichier JAR : [[http://dataexport.scrutari.net/impl/java/ScrutariDataExport.jar]] | * Fichier JAR : [[http://dataexport.scrutari.net/impl/java/ScrutariDataExport.jar]] | ||
- | * Sources : [[http://dataexport.scrutari.net/impl/java/ScrutariDataExport-src.tar.gz]] | + | * Sources : [[http://dataexport.scrutari.net/impl/java/ScrutariDataExport-src.zip]] |
* JavaDoc : [[http://dataexport.scrutari.net/impl/java/javadoc]] | * JavaDoc : [[http://dataexport.scrutari.net/impl/java/javadoc]] | ||
+ | |||
+ | Les sources peuvent être également obtenue via le dépôt Subversion : | ||
+ | |||
+ | svn co http://depot.exemole.fr/svn/java/ScrutariDataExport/src/ | ||
===== Utilisation de l'implémentation ===== | ===== Utilisation de l'implémentation ===== | ||
Ligne 37: | Ligne 41: | ||
public static void main(String[] args) throws IOException { | public static void main(String[] args) throws IOException { | ||
/* Ouverture d'un fichier en écriture */ | /* Ouverture d'un fichier en écriture */ | ||
- | File file = new File("/home/vic/test.scrutari-data.xml"); | + | File file = new File("test.scrutari-data.xml"); |
BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")); | BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")); | ||
Ligne 47: | Ligne 51: | ||
/*Définition des métadonnées de la base */ | /*Définition des métadonnées de la base */ | ||
- | baseMetadataExport.setAuthorityUUID("e17a05b0-c45e-11d8-9669-0800200c9a66"); | + | baseMetadataExport.setAuthority("e17a05b0-c45e-11d8-9669-0800200c9a66"); |
baseMetadataExport.setBaseName("test"); | baseMetadataExport.setBaseName("test"); | ||
baseMetadataExport.setBaseIcon("http://monsite.net/icon-16x16pixels.png"); | baseMetadataExport.setBaseIcon("http://monsite.net/icon-16x16pixels.png"); | ||
Ligne 93: | Ligne 97: | ||
/* Exemple d'indexation : celle-ci peut de se faire à n'importe quel moment | /* Exemple d'indexation : celle-ci peut de se faire à n'importe quel moment | ||
* même s'il ne s'agit du mot-clé ou de la fiche en cours ou que le thésaurus ou le corpus | * même s'il ne s'agit du mot-clé ou de la fiche en cours ou que le thésaurus ou le corpus | ||
- | * n'ont pas encore été définis. | + | * n'ont pas encore été définis. */ |
- | */ | + | |
scrutariDataExport.addIndexation("fiches", "1", "motscles", "A01",1); | scrutariDataExport.addIndexation("fiches", "1", "motscles", "A01",1); | ||
Ligne 107: | Ligne 110: | ||
MotcleExport motcleExport = scrutariDataExport.newMotcle("A01"); | MotcleExport motcleExport = scrutariDataExport.newMotcle("A01"); | ||
motcleExport.setLibelle("fr","Eau"); | motcleExport.setLibelle("fr","Eau"); | ||
+ | |||
+ | /* Autre exemple d'insertion d'indexation n'importe où*/ | ||
+ | scrutariDataExport.addIndexation("fiches", "fiche2", "motscles", "A01",4); | ||
+ | |||
+ | /* L'indexation précédente n'a pas changé l'état de l'export, on travaille | ||
+ | * toujours sur le premier mot-clé */ | ||
motcleExport.setLibelle("en","Water"); | motcleExport.setLibelle("en","Water"); | ||
Ligne 117: | Ligne 126: | ||
} | } | ||
- | |||
</code> | </code> | ||