net.sf.okapi.common.resource.Property.setValue()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(72)

本文整理了Java中net.sf.okapi.common.resource.Property.setValue()方法的一些代码示例,展示了Property.setValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.setValue()方法的具体详情如下:
包路径:net.sf.okapi.common.resource.Property
类名称:Property
方法名:setValue

Property.setValue介绍

[英]Sets a new value for this property.
[中]设置此属性的新值。

代码示例

代码示例来源:origin: net.sf.okapi.filters/okapi-filter-tmx

/**
 * Add tu-level property. If property (name) already exists the new property value is appended to the existing one.
 * @param prop Property to add.
 */
void addProp(Property prop){
  Property existingProp = getProp(prop.getName());
  if(existingProp!=null){
    existingProp.setValue(existingProp.getValue() + sep + prop.getValue());
  }else{
    propsBefore.add(prop);    
  }
}

代码示例来源:origin: net.sf.okapi/okapi-core

public void updatePhaseAnnotation(StartSubDocument startSubDoc) {
  Property phasePlaceholder = (startSubDoc.getProperty(Property.XLIFF_PHASE) == null) ?
    new Property(Property.XLIFF_PHASE, "") : startSubDoc.getProperty(Property.XLIFF_PHASE);
  phasePlaceholder.setValue(toXML());
}

代码示例来源:origin: net.sf.okapi/okapi-core

/**
 * Synchronize the value of the tool property on the StartSubDocument
 * event with the XML representation of this annotation.
 * @param startSubDoc the {@link StartSubDocument} event
 */
public void updateToolProperty(StartSubDocument startSubDoc) {
  Property toolPlaceholder = (startSubDoc.getProperty(Property.XLIFF_TOOL) == null) ?
    new Property(Property.XLIFF_TOOL, "") : startSubDoc.getProperty(Property.XLIFF_TOOL);
  toolPlaceholder.setValue(toXML());
}

代码示例来源:origin: net.sf.okapi.filters/okapi-filter-tmx

/**
 * Sets the property of this TmxTuv. Adds to existing or creates new one.
 * @param prop Property to add
 */	
void setProperty(Property prop){
  Property existingProp = tc.getProperty(prop.getName());
  if(existingProp!=null){
    existingProp.setValue(existingProp.getValue() + sep + prop.getValue());
  }else{
    tc.setProperty(prop);    
  }
}

代码示例来源:origin: net.sf.okapi.filters/okapi-filter-ts

Property.APPROVED);
if (approvedProp.getValue().equals("yes")) {
  approvedProp.setValue("no");
  tu.setTargetProperty(trgLang, approvedProp);
  logger.warn(

代码示例来源:origin: net.sf.okapi.steps/okapi-step-rainbowkit

Property oriProp = oriTu.createTargetProperty(trgLoc, Property.APPROVED, false, IResource.CREATE_EMPTY);
if ( traProp != null ) {
  oriProp.setValue(traProp.getValue());
  oriProp.setValue("yes");

代码示例来源:origin: net.sf.okapi.steps/okapi-step-translationcomparison

deScore1to2Prop.setValue(String.format("%03d", edScore1to2));
fmScore1to2Prop.setValue(String.format("%03d", fmScore1to2));
tmxTu.setTargetProperty(targetLocale2Extra, deScore1to2Prop);
tmxTu.setTargetProperty(targetLocale2Extra, fmScore1to2Prop);                        
if ( filter3 != null ) {
  tmxTu.setTargetContent(targetLocale3Extra, trgFrag3);
  deScore1to3Prop.setValue(String.format("%03d", edScore1to3));
  fmScore1to3Prop.setValue(String.format("%03d", fmScore1to3));
  tmxTu.setTargetProperty(targetLocale3Extra, deScore1to3Prop);
  tmxTu.setTargetProperty(targetLocale3Extra, fmScore1to3Prop);

相关文章

微信公众号

最新文章

更多