Code Search for Developers
 
 
  

Ionia.java from gzz at Krugle


Show Ionia.java syntax highlighted

/*
Ionia.java
 *
 *    Copyright (c) 2001, Ted Nelson and Tuomas Lukka
 *
 *    This file is part of Gzz.
 *    
 *    Gzz 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 of the License, or
 *    (at your option) any later version.
 *    
 *    Gzz 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 Gzz; if not, write to the Free
 *    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *    MA  02111-1307  USA
 *    
 *
 */
/*
 * Written by Tero Mäyränen
 */

package org.gzigzag.module.homer;
import org.gzigzag.*;
import java.awt.*;
import java.lang.*;

/*
 *	Homer wrote The Iliad around 800 B.C.
 *	The text-only version is around 800 Kb.
 *	It was originally released as a scrolltext and performed as a play.
 */

public abstract class Ionia implements ZOb
{
	protected ZZCell macroParameters = null;

	public static Class getClass(ZZCell cell)
	{
		if (cell == null) return null;

		ZZCell name = cell.h("d.clone");

		ZZCell type = name.s("d.1");
		if (type == null) return null;

		return getType(type.getText());
	}

	public static Ionia getObject(ZZCell cell) throws InstantiationException, IllegalAccessException
	{
		Class typeClass = getClass(cell);
		if (typeClass == null) return null;
		Ionia ion = (Ionia)typeClass.newInstance();

		ZZCell name = cell.h("d.clone");

		ZZCell type = name.s("d.1");
		if (type == null) return null;

		ZZCell master = type.h("d.clone");

		if (master.equals(type))
			ion.readParams(master.s("d.1"));

		else
			ion.readParams(master.s("d.1"), type.s("d.1"));

		return ion;
	}

	public static Class getType(String type) { return null; }

	public String readParams(ZZCell cell, ZZCell param)
	{
		macroParameters = param;
		return readParams(cell);
	}

	public String readParams(ZZCell cell) { return ""; }
}




See more files for this project here

gzz

An implementation of Ted Nelson's ZZstructure. ZZstructure is a new type of programming platform for structured data.

Project homepage: http://savannah.nongnu.org/projects/gzz
Programming language(s): C++,Java,Python
License: lgpl21

  Chios.java
  Euboia.java
  Ionia.java
  Smyrna.java
  Springfield.java