Skip to content

Commit

Permalink
Merge pull request #105 from dterefe/uima-3
Browse files Browse the repository at this point in the history
Fixed unimplemented serialization methods.
  • Loading branch information
dterefe authored Sep 29, 2024
2 parents a6b6284 + 252c365 commit 2c13d2d
Showing 1 changed file with 38 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,42 @@ public interface IDUUICommunicationLayer {

public void deserialize(JCas jc, ByteArrayInputStream input, String targetView) throws IOException, SAXException, CASException;

/**
* Serializes a JCas to a byte array output stream by using the LUA script provided by the component.
* @param jc Input JCas.
* @param out Output stream, i.e. the input to the component.
* @param parameters Parameters for use in the LUA script.
* @throws CompressorException
* @throws IOException
* @throws SAXException
*/
public void serialize(JCas jc, ByteArrayOutputStream out, Map<String,String> parameters) throws CompressorException, IOException, SAXException;

/**
* Deserializes a byte array input stream to a JCas by using the LUA script provided by the component.
* @param jc Output JCas, note that the CAS is not reset before deserialization.
* @param input Input stream, i.e. the output of the component.
* @throws IOException
* @throws SAXException
*/
public void deserialize(JCas jc, ByteArrayInputStream input) throws IOException, SAXException;

/**
*
* @return
*/
public IDUUICommunicationLayer copy();

/**
*
* @param results
* @return
*/
public ByteArrayInputStream merge(List<ByteArrayInputStream> results);

String myLuaTestMerging();
/**
* Serializes a JCas to a byte array output stream by using the LUA script provided by the component.
* @param jc Input JCas.
* @param out Output stream, i.e. the input to the component.
* @param parameters Parameters for use in the LUA script.
* @throws CompressorException
* @throws IOException
* @throws SAXException
*/
default void serialize(JCas jc, ByteArrayOutputStream out, Map<String,String> parameters) throws CompressorException, IOException, SAXException, CASException {
serialize(jc, out, parameters, "_InitialView");
}

/**
* Deserializes a byte array input stream to a JCas by using the LUA script provided by the component.
* @param jc Output JCas, note that the CAS is not reset before deserialization.
* @param input Input stream, i.e. the output of the component.
* @throws IOException
* @throws SAXException
*/
default void deserialize(JCas jc, ByteArrayInputStream input) throws IOException, SAXException, CASException {
deserialize(jc, input, "_InitialView");
}

/**
*
* @return
*/
public IDUUICommunicationLayer copy();

/**
*
* @param results
* @return
*/
public ByteArrayInputStream merge(List<ByteArrayInputStream> results);

String myLuaTestMerging();
}

0 comments on commit 2c13d2d

Please sign in to comment.