org.treebind
Interface Sink

All Superinterfaces:
PipeElement
All Known Subinterfaces:
Filter
All Known Implementing Classes:
DefaultFilterImplementation, JavaObject2XmlSaxFilter, JavaObjectSink, JenaRdf2JavaObjectFilter, Ldap2JavaObjectFilter, Ldap2XmlSaxFilter, TraceSink, TreeBom, XmlSax2JavaObjectFilter, XmlSaxSink

public interface Sink
extends PipeElement

Sinks are PipeElement which receive properties in streaming mode. A pipe element that is both a Sink and a Source is called a Filter.

Author:
Eric van der Vlist
See Also:
PipeElement, Filter, Source

Method Summary
 void addLeaf(Name role, Name nature, java.lang.Object value)
          Pour a new LeafProperty into the sink.
 void endProperty()
          Declares to the sink the end of the current ComplexProperty.
 void startProperty(Name role, Name nature)
          Start pouring a new ComplexProperty into the sink.
 
Methods inherited from interface org.treebind.PipeElement
getPipe, setPipe
 

Method Detail

startProperty

public void startProperty(Name role,
                          Name nature)
                   throws java.lang.Exception
Start pouring a new ComplexProperty into the sink.

Parameters:
role - the role of the property
nature - the nature of the property
Throws:
java.lang.Exception - when anything goes wrong

addLeaf

public void addLeaf(Name role,
                    Name nature,
                    java.lang.Object value)
             throws java.lang.Exception
Pour a new LeafProperty into the sink.

Parameters:
role - role the role of the property
nature - nature the nature of the property
value - value of the property
Throws:
java.lang.Exception - when anything goes wrong

endProperty

public void endProperty()
                 throws java.lang.Exception
Declares to the sink the end of the current ComplexProperty.

Throws:
java.lang.Exception - when anything goes wrong