/*
 * Copyright 2014, Hridesh Rajan, Robert Dyer, 
 *                 and Iowa State University of Science and Technology
 *
 * 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 boa.types.proto;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import boa.types.BoaInt;
import boa.types.BoaProtoList;
import boa.types.BoaProtoTuple;
import boa.types.BoaString;
import boa.types.BoaType;
import boa.types.proto.enums.ChangeKindProtoMap;

/**
 * A {@link ASTRootProtoTuple}.
 * 
 * @author rdyer
 */
public class ASTRootProtoTuple extends BoaProtoTuple {
	private final static List<BoaType> members = new ArrayList<BoaType>();
	private final static Map<String, Integer> names = new HashMap<String, Integer>();

	static {
		int counter = 0;

		names.put("namespaces", counter++);
		members.add(new BoaProtoList(new NamespaceProtoTuple()));
		
		names.put("names", counter++);
		members.add(new BoaString());
		
		names.put("change_kind", counter++);
		members.add(new ChangeKindProtoMap());
		
		names.put("mapped_node", counter++);
		members.add(new BoaInt());
		
		names.put("key", counter++);
		members.add(new BoaInt());
	}

	/**
	 * Construct a {@link ASTRootProtoTuple}.
	 */
	public ASTRootProtoTuple() {
		super(members, names);
	}

	/** @{inheritDoc} */
	@Override
	public String toJavaType() {
		return "boa.types.Ast.ASTRoot";
	}
}

@@ -1495,16 +1495,33 @@
 add(new 
+BoaProtoList(new 
 BoaStrin
@@ -1524,16 +1524,17 @@
 tring())
+)
 ;%0D%0A%09%09%0D%0A%09

names in NameSpace should be a list of strings