package ecologylab.semantic.service.mmdrepository;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import ecologylab.semantics.namesandnums.SemanticsAssetVersions;

/**
 * mmdrepository version root resource
 * 
 * @author ajit
 * 
 */

@Path("/mmdrepository.version")
@Component
@Scope("singleton")
public class MMDRepositoryVersion {

	@GET
	@Produces("text/plain")
	public float getMmdRepositoryVersion()
	{
		return SemanticsAssetVersions.METAMETADATA_ASSET_VERSION;
	}
}

package ecologylab.semantic.service.mmdrepository;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import ecologylab.semantics.namesandnums.SemanticsAssetVersions;

/**
 * mmdrepository version root resource
 * 
 * @author ajit
 * 
 */

@Path("/mmdrepository.version")
@Component
@Scope("singleton")
public class MMDRepositoryVersion {

	@GET
	@Produces("text/plain")
	public Response getMmdRepositoryVersion()
	{
		return Response.status(Status.OK).
				entity((new Float(SemanticsAssetVersions.METAMETADATA_ASSET_VERSION).toString())).build();
	}
}

prepare response for version no.