Skip to content

Commit

Permalink
Moved resource file to folder structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfries committed Jun 18, 2024
1 parent b2a9ac2 commit 6f893ec
Show file tree
Hide file tree
Showing 13 changed files with 1,462 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void main(String[] args) throws Exception {

final String marketDataStartXml = new String(Objects.requireNonNull(ValuationClient.class.getClassLoader().getResourceAsStream("net/finmath/smartcontract/valuation/client/md_testset1.xml")).readAllBytes(), StandardCharsets.UTF_8);
final String marketDataEndXml = new String(Objects.requireNonNull(ValuationClient.class.getClassLoader().getResourceAsStream("net/finmath/smartcontract/valuation/client/md_testset2.xml")).readAllBytes(), StandardCharsets.UTF_8);
final String product = new String(Objects.requireNonNull(ValuationClient.class.getClassLoader().getResourceAsStream("net.finmath.smartcontract.product.xml/smartderivativecontract.xml")).readAllBytes(), StandardCharsets.UTF_8);
final String product = new String(Objects.requireNonNull(ValuationClient.class.getClassLoader().getResourceAsStream("net/finmath/smartcontract/product/xml/smartderivativecontract.xml")).readAllBytes(), StandardCharsets.UTF_8);

final MarginRequest marginRequest = new MarginRequest().marketDataStart(marketDataStartXml).marketDataEnd(marketDataEndXml).tradeData(product).valuationDate("");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class LaunchAGenerator {

public static void main(String[] args) throws Exception {

String sdcXML = new String(LaunchAGenerator.class.getClassLoader().getResourceAsStream("net.finmath.smartcontract.product.xml/smartderivativecontract.xml").readAllBytes(), StandardCharsets.UTF_8);
String sdcXML = new String(LaunchAGenerator.class.getClassLoader().getResourceAsStream("net/finmath/smartcontract/product/xml/smartderivativecontract.xml").readAllBytes(), StandardCharsets.UTF_8);
SmartDerivativeContractDescriptor sdc = SDCXMLParser.parse(sdcXML);
List<CalibrationDataItem.Spec> mdItemList = sdc.getMarketdataItemList();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class DemoStarter {

public static void main(String[] args) throws Exception {

String sdcXML = new String(DemoStarter.class.getClassLoader().getResourceAsStream("net.finmath.smartcontract.product.xml/smartderivativecontract.xml").readAllBytes(), StandardCharsets.UTF_8);
String sdcXML = new String(DemoStarter.class.getClassLoader().getResourceAsStream("net/finmath/smartcontract/product/xml/smartderivativecontract.xml").readAllBytes(), StandardCharsets.UTF_8);
WebSocketClientEndpoint client = new WebSocketClientEndpoint(new URI("ws://localhost:443/valuationfeed"), "user1", "password1");
long timeout = client.getUserSession().getMaxIdleTimeout();
client.sendTextMessage(sdcXML);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns="uri:sdc"
targetNamespace="uri:sdc">
<xs:import namespace="http://www.fpml.org/FpML-5/confirmation"
schemaLocation="../schemas/fpml-schemas/fpml-main-5-9.xsd"/>
schemaLocation="../../../../../schemas/fpml-schemas/fpml-main-5-9.xsd"/>
<xs:element name="smartderivativecontract">
<xs:complexType>
<xs:sequence>
Expand Down
Loading

0 comments on commit 6f893ec

Please sign in to comment.