src/authoring/entities/data/SudoEntityLoader.java
public Object[] buildEntity(File entityFile) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, ClassNotFoundException {
		Object[] result = new Object[2];
		Element root = getRootElement(entityFile);
		String type = extractTypeFromRoot(root);
		result[0] = type;
		NodeList nList = root.getChildNodes();
		Map<Class,Object[]> sudoComponents = new HashMap<>();
		for (int i = 0; i < nList.getLength(); i++) {
			sudoComponents.put(this.getClass().forName(COMPONENT_PREFIX + nList.item(i).getNodeName().trim()),
					new Object[] {nList.item(i).getTextContent()});
		}
		result[1] = sudoComponents;
		return result;
	}
/**
	 * Get and build an entity that is represented by a given XML File.
	 * @param entityName the name of the entity to pull the xml file for
	 * @param ID the ID of the entity to create
	 * @param type the type of entity to instantiate
	 * @return an Entity object represented by the xml file
	 * @throws ClassNotFoundException 
	 * @throws SecurityException 
	 * @throws InvocationTargetException 
	 * @throws IllegalArgumentException 
	 * @throws IllegalAccessException 
	 * @throws InstantiationException 
	 */
Get and build an entity that is represented by a given XML File.
Get and build an entity that is represented by a given XML File .
public Object[] buildEntity(File entityFile) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, ClassNotFoundException {
		Object[] result = new Object[2];
		Element root = getRootElement(entityFile);
		String type = extractTypeFromRoot(root);
		result[0] = type;
		NodeList nList = root.getChildNodes();
		Map<Class,Object[]> sudoComponents = new HashMap<>();
		for (int i = 0; i < nList.getLength(); i++) {
			sudoComponents.put(this.getClass().forName(COMPONENT_PREFIX + nList.item(i).getNodeName().trim()),
					new Object[] {nList.item(i).getTextContent()});
		}
		result[1] = sudoComponents;
		return result;
	}
public Object [ ] buildEntity ( File entityFile ) throws InstantiationException , IllegalAccessException , IllegalArgumentException , InvocationTargetException , SecurityException , ClassNotFoundException { Object [ ] result = new Object [ 2 ] ; Element root = getRootElement ( entityFile ) ; String type = extractTypeFromRoot ( root ) ; result [ 0 ] = type ; NodeList nList = root . getChildNodes ( ) ; Map < Class , Object [ ] > sudoComponents = new HashMap < > ( ) ; for ( int i = 0 ; i < nList . getLength ( ) ; i ++ ) { sudoComponents . put ( this . getClass ( ) . forName ( COMPONENT_PREFIX + nList . item ( i ) . getNodeName ( ) . trim ( ) ) , new Object [ ] { nList . item ( i ) . getTextContent ( ) } ) ; } result [ 1 ] = sudoComponents ; return result ; }
Get and build an entity that is represented by a given XML File.
Get and build an entity that is represented by a given XML File .