/**
 * Copyright 2008-2009 DRIVER PROJECT (ICM UW)
 * Original author: Marek Horst
 *
 * 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 eu.dnetlib.common.profile;

/**
 * Index Body ver 1.1.0.
 * @author mhorst
 *
 */
public class IndexBody implements Body {

	IndexConfiguration configuration;
	
	IndexStatus status;
	
	public IndexBody() {
		configuration = new IndexConfiguration();
		status = new IndexStatus();
	}

	public long getSize() {
		return configuration.getSize();
	}

	public void setSize(long size) {
		configuration.setSize(size);
	}

	public String getLastUpdate() {
		return status.getLastUpdate();
	}

	public void setLastUpdate(String lastUpdate) {
		status.setLastUpdate(lastUpdate);
	}


	public IndexConfiguration getConfiguration() {
		return configuration;
	}

	public void setConfiguration(IndexConfiguration configuration) {
		this.configuration = configuration;
	}

	public IndexStatus getStatus() {
		return status;
	}

	public void setStatus(IndexStatus status) {
		this.status = status;
	}

	public String getMetaDataFormat() {
		return configuration.getMetaDataFormat();
	}

	public String getMetaDataFormatInterpretation() {
		return configuration.getMetaDataFormatInterpretation();
	}

	public String getMetaDataFormatLayout() {
		return configuration.getMetaDataFormatLayout();
	}

	public void setMetaDataFormat(String metaDataFormat) {
		configuration.setMetaDataFormat(metaDataFormat);
	}

	public void setMetaDataFormatInterpretation(String metaDataFormatInterpretation) {
		configuration.setMetaDataFormatInterpretation(metaDataFormatInterpretation);
	}

	public void setMetaDataFormatLayout(String metaDataFormatLayout) {
		configuration.setMetaDataFormatLayout(metaDataFormatLayout);
	}
	
	/**
	 * Sets invalid flag to this indexDS profile.
	 * @param invalid
	 */
	public void setInvalid(boolean invalid) {
		configuration.setInvalid(invalid);
	}
	
	/**
	 * Returns invalid flag to this indexDS profile.
	 * @return invalid flag to this indexDS profile
	 */
	public boolean isInvalid() {
		return configuration.isInvalid();
	}
}
