KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snipsnap > serialization > LabelSerializer


1 package org.snipsnap.serialization;
2
3 import java.util.List JavaDoc;
4
5 /**
6  * @author gis This is the interface all Label handlers have to implement. Whenever a label,
7  * attached to a Snip is to be serialized, a LabelSerializer supporting this type
8  * of label is used and its @see serialize( Label, Serializer ) method is called.
9  * @see Serializer
10  */

11 public interface LabelSerializer {
12     /**
13      * We don't want RDF/Jena specifics in this interface, so pass the serializer around and let LabelSerializer cast
14      * it to specific subclasses
15      */

16     public void serialize(LabelContext labelContext);
17
18     /**
19      * A LabelSerializer may be able to support more than one type of Labels.
20      * Here it returns the List of Label types (i.e. the class names as Strings).
21      * @return List A list of strings containing the supported label types
22      */

23     public List JavaDoc getSupportedLabelTypes();
24
25     /**
26      * @return int The supported output-format constant as specified in
27      * @see SerializerFactory
28      */

29     public int getOutputFormat();
30 }
31
Popular Tags