The ContractParser interface provides two methods:
- public static Contract getContractFromXml(String stFileName)
- public static void getXmlFromContract(Contract ct, OutputStream os)
For effective work with contracts I suggest extending the interface at least by following method:
- public static Contract getContractFromString(String contractContent)
The reason for it is that Contract Repository provides contract XML in String. Therefore if the output from the Contract Repository has to be translated to the Contract object, it must be saved into a file that is later used by ContractParser.