Révision 2963

tmp/org.txm.groovy.core/src/groovy/org/txm/macro/projects/antract/BuildAFMetadataMacro.groovy (revision 2963)
52 52
	columnsToRenameRules.put("Identifiant de la notice", "id");
53 53
	
54 54
	//columnsToCopy.put("Notes du titre", ["subtitle"] as String[]);
55
	columnsToCopy.put("Titre propre", ["title"] as String[]); 
55
	columnsToCopy.put("Titre propre", ["title"] as String[]);
56 56
	columnsToCopy.put("Date de diffusion", ["text-order"] as String[]);
57 57
	
58 58
	searchAndReplaceRules.put("text-order", ["([0-9][0-9])/([0-9][0-9])/([0-9][0-9][0-9][0-9])", '$3$2$1'] as String[]);
tmp/org.txm.groovy.core/src/groovy/org/txm/macro/projects/antract/PrepareAFVOIXOFFCorpusMacro.groovy (revision 2963)
1
import org.txm.utils.io.IOUtils
2

  
3 1
package org.txm.macro.projects.antract
4 2

  
3
import org.txm.utils.io.IOUtils
5 4
import groovy.transform.Field
6 5
import org.txm.rcp.swt.widget.parameters.*
7 6

  
......
49 48
paramFile.getParentFile().mkdirs()
50 49

  
51 50
// create the corpus parameters file
52
String content = """backtomedia/backtomedia_endproperty=endtime
53
backtomedia/backtomedia_startproperty=starttime
51
String content = """backtomedia/backtomedia_endproperty=end
52
backtomedia/backtomedia_startproperty=start
54 53
backtomedia/backtomedia_structure=sp
55 54
backtomedia/backtomedia_time_property=time
56 55
backtomedia/media_auth=true
57 56
backtomedia/media_auth_login=
58 57
backtomedia/media_extension=mp4
59
backtomedia/media_path_prefix=https\://{0}\:{1}@okapi.ina.fr/antract/Media/AF/
58
backtomedia/media_path_prefix=https\\://{0}\\:{1}@okapi.ina.fr/antract/Media/AF/
60 59
backtomedia/name=backtomedia
61 60
backtomedia/secured_media_login=okapi_reader
62
backtomedia/secured_media_path_prefix=https\://{0}\:{1}@okapi.ina.fr/antract/Media/AF/
61
backtomedia/secured_media_path_prefix=https\\://{0}\\:{1}@okapi.ina.fr/antract/Media/AF/
63 62
backtomedia/sync_mode=Structure
64 63
concordance/context_limits=text
65 64
concordance/context_limits_type=list
66
concordance/view_reference_pattern=text_date-de-diffusion-tri\tu_time\tdiv_identifiant-de-la-notice
67
concordance/view_reference_pattern_format=%s, %s, %s
68
concordance/sort_reference_pattern=text_date-de-diffusion-tri\tu_time\tdiv_identifiant-de-la-notice
65
concordance/view_reference_pattern={"format"\\:"","properties"\\:["text_datedediffusion","u_time","div_identifiantdelanotice"]}
66
concordance/sort_reference_pattern={"format"\\:"","properties"\\:["text_datedediffusion","u_time","div_identifiantdelanotice"]}
69 67
concordance/name=concordance
70 68
eclipse.preferences.version=1"""
71 69

  
tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java (revision 2963)
269 269
			}
270 270
			
271 271
			refPropertyNames = this.getStringParameterValue(ConcordancePreferences.SORT_REFERENCE_PATTERN);
272
			refPropertyNames2 = this.getCorpus().getProject().getCommandPreferences("concordance").get(ConcordancePreferences.SORT_REFERENCE_PATTERN);
273
			if (refPropertyNames2 != null && refPropertyNames2.length() > 0) {
274
				refPropertyNames = refPropertyNames2;
275
			}
272 276
			if ("*".equals(refPropertyNames)) { //$NON-NLS-1$
273 277
				Property refProperty = getCorpus().getProperty("ref");//$NON-NLS-1$
274 278
				if (refProperty == null) {
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java (revision 2963)
181 181
		return this;
182 182
	}
183 183
	
184
	public String format(Collection<String> collection) {
184
	public String format(Collection<?> collection) {
185 185
		return String.format(pattern, collection.toArray()).toString();
186 186
	}
187 187
	
188
	public String format(String[] values) {
188
	public String format(Object[] values) {
189 189
		return String.format(pattern, values).toString();
190 190
	}
191 191
	
......
236 236
	public String getTitle() {
237 237
		if (this.properties == null || this.properties.size() == 0) return "none";
238 238
		
239
		if (pattern != null && pattern.length() > 0) {
240
			return this.format(this.properties);
241
		}
242
		
239 243
		String title = ""; //$NON-NLS-1$
240 244
		for (Property p : this.properties) {
241
			if (p == null) continue;
245
			if (p == null) {
246
				continue;
247
			}
242 248
			if (p instanceof StructuralUnitProperty || p instanceof VirtualProperty) {
243 249
				title += p.getFullName() + ", "; //$NON-NLS-1$
244 250
			}
......
246 252
				title += p.getName() + ", "; //$NON-NLS-1$
247 253
			}
248 254
		}
249
		if (title.length() == 0)
255
		if (title.length() == 0) {
250 256
			title = TXMCoreMessages.common_reference;
251
		else
257
		} else {
252 258
			title = title.substring(0, title.length() - 2);
259
		}
253 260
		return title;
254 261
	}
255 262
	

Formats disponibles : Unified diff