package edu.vt.marian.common;

import java.io.*;
import java.net.*;
import java.util.*;


/**
 *	A Digital Information Object is a digital object whose primary function is
 *		to carry information (generally although not necessarily to a human
 *		being.  DIOs occupy the place of Streams in the 5S model, and of
 *		text documents in a classical information retrieval system.
 *
 *		<P>DigInfObjs do not need to be made up of text.  We require them,
 *		however, to be able to produce a short piece of text that will serve
 *		as a surrogate or short description, for instance in a list of search
 *		results or as the label on an image.  Since that text also has a
 *		context, it can be produced in a variety of markups, selected by
 *		a flag in the presentShort() method.
 *
 *	@author	Robert France.
 */
public interface DigInfObj extends Cloneable
{
	/** these are the possible markup types
	*/
	public final static int ASCII = 0;
	public final static int ANSEL = 1;
	public final static int HTML = 2;
	public final static int SGML = 3;
	public final static int XML = 4;

	public boolean isValid();

	public String presentShort(int markupType);
	public int presentShort(int markupType, BufferedWriter out) throws IOException;

	public DigInfObj copy();	// Should be public Object clone(), but I keep
}					//  confusing the compiler when I say so.
