All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.okapi.common.annotation.XLIFFPhase Maven / Gradle / Ivy

There is a newer version: 1.46.0
Show newest version
/*===========================================================================
  Copyright (C) 2013 by the Okapi Framework contributors
-----------------------------------------------------------------------------
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
===========================================================================*/

package net.sf.okapi.common.annotation;

import net.sf.okapi.common.Util;

/**
 * Annotation representing the <phase> element within an XLIFF <file><header>.
 * The set of phase elements should be contained within the XLIFFPhaseAnnotation
 * on a StartSubDocument Event.
 */
public class XLIFFPhase {
	// Required
	private String phaseName, processName;
	// Optional
	private String companyName, toolId, jobId, contactName, contactEmail, contactPhone;

	// TODO: Handle date and deprecated tool attributes
//	private Date date;
//	private XLIFFTool tool;
	// TODO: Handle  elements as well.
	private StringBuilder skel = new StringBuilder();

	public XLIFFPhase(String phaseName, String processName) {
		this.phaseName = phaseName;
		this.processName = processName;
	}

	public String getPhaseName() {
		return this.phaseName;
	}

	public String getProcessName() {
		return this.processName;
	}

	public String getCompanyName() {
		return this.companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getToolId() {
		return toolId;
	}

	public void setToolId(String toolId) {
		this.toolId = toolId;
	}

	public String getJobId() {
		return jobId;
	}

	public void setJobId(String jobId) {
		this.jobId = jobId;
	}

	public String getContactName() {
		return contactName;
	}

	public void setContactName(String contactName) {
		this.contactName = contactName;
	}

	public String getContactEmail() {
		return contactEmail;
	}

	public void setContactEmail(String contactEmail) {
		this.contactEmail = contactEmail;
	}

	public String getContactPhone() {
		return contactPhone;
	}

	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}

	public void addSkeletonContent(String text) {
		skel.append(text);
	}

	public String toXML() {
		StringBuilder sb = new StringBuilder();
		sb.append("");
		sb.append(skel);
		sb.append("");
		return sb.toString();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy