/* NodeTexter.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 Tuomas Lukka, ported to fenfire by Matti J. Katila */ /* * `He's got a good memory, you've got to grant him that,' said * Didactylos. `Show him some more scrolls.' * `How will we know he's remembered them?' Urn demanded, unrolling * a scroll of geometrical theorems. `He can't read! And even if he * could read, he can't write!' * `We shall have to teach him.' * - Terry Pratchett, Small Gods, p.214 */ package org.fenfire; import com.hp.hpl.mesa.rdf.jena.model.*; import java.util.*; /** An interface for getting and setting referential text in cells. */ public interface NodeTexter { /** Set the text for the given node. * @diagram zzstruct */ void setText(RDFNode node, String s); /** Get the text for the given node. * @diagram zzstruct */ String getText(RDFNode node, Obs o); /** Insert the given string into the text in the node C. * This can be a routine that preserves Xanadu-model permanence. * @diagram zzstruct */ void insertText(RDFNode node, int ind, String s); /** Delete a piece of text from a node. * @see RDFNode.deleteText * @diagram zzstruct */ void deleteText(RDFNode node, int begin, int end); /** Copy some text from one node to another. * @diagram zzstruct */ void copyText(RDFNode to, int ind, RDFNode from, int begin, int end); /** Move some text from one node to another. * @diagram zzstruct */ void moveText(RDFNode to, int ind, RDFNode from, int begin, int end); /** Get the set of all nodes for which there is a content mapping. * Most important use: Saving. */ Set getNodesWithContent(); }