/* BuoyAdaptor.java * * Copyright (c) 2003, Tuomas J. 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 Tuomas J. Lukka * RDF port by Matti J. Katila */ package org.fenfire.view.buoy; import org.fenfire.view.*; import org.nongnu.libvob.*; import org.nongnu.libvob.buoy.*; import com.hp.hpl.mesa.rdf.jena.model.*; /** A class that allows different node-based views * to be connected easily to a buoy view, separating * the viewing and linking. */ public class BuoyAdaptor implements BuoyViewNodeType { public static boolean dbg = false; private static void pa(String s) { System.out.println("BuoyAdaptor:"+s); } /** The node node types used by the current instance. */ public NodeBuoyViewNodeType[] nodes; /** The node-to-X link types used by the current instance. */ public BuoyNodeViewLinker[] nodeLinkers; /** Get the node type that is responsible for showing the * given Node. */ private NodeBuoyViewNodeType getNode(RDFNode node) { for(int i=0; i