/*
 * Copyright (C) 2004-2005  exedio GmbH (www.exedio.com)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package com.exedio.cope.instrument;


final class CopeDataVariant
{
	final String name;
	final String shortName;
	final CopeDataAttribute mediaAttribute;

	public CopeDataVariant(final JavaAttribute javaAttribute, final CopeDataAttribute mediaAttribute)
	{
		this.name = javaAttribute.name;
		this.mediaAttribute = mediaAttribute;
		final String prefix = mediaAttribute.getName();
		this.shortName = this.name.startsWith(prefix)
				? this.name.substring(prefix.length())
				: this.name;
		mediaAttribute.addVariant(this);
	}

}

@@ -926,38 +926,33 @@
 peDataAttribute 
-mediaA
+a
 ttribute;%0A%0A%09publ
@@ -1029,22 +1029,17 @@
 tribute 
-mediaA
+a
 ttribute
@@ -1084,22 +1084,17 @@
 %0A%09%09this.
-mediaA
+a
 ttribute
@@ -1096,22 +1096,17 @@
 ibute = 
-mediaA
+a
 ttribute
@@ -1131,22 +1131,17 @@
 refix = 
-mediaA
+a
 ttribute
@@ -1266,14 +1266,9 @@
 ;%0A%09%09
-mediaA
+a
 ttri

rename mediaAttribute to attribute