Using the Schematron API
Perform the following to invoke the schematron API from a Java Collaboration:
■
Obtaining the Factory Object
■
Obtaining the Validator Object
■
Performing the Validation
Obtaining the Factory Object
Below is a sample call to the getSchematronValidatorFactory method.
com.stc.connector.hl7.schematron.SchematronValidatorFactory
factory = com.stc.connector.hl7.schematron.SchematronValidatorFactory.
getSchematronValidatorFactory();
Obtaining the Validator Object
Below is a sample call to the getDefaultValidator method.
com.stc.connector.hl7.schematron.SchematronValidator
validator = factory.getDefaultValidator( domSource );
In the above example, domSource is the DOMSource object of the schematron XML.
Performing the Validation
Below is a sample call to the validate method.
com.stc.connector.hl7.schematron.ValidationOutput
output = validator.validate( dataSrc );
In the above example, dataSrc is the source of the payload. The payload can be an entire V3
XML document or a CDA document.
The ValidationOutput object contains the resulting XML document as well as a method
isValid(), which returns values when the validation has passed or failed.
Adding and Conguring a TCP/IP HL7 Adapter in a
Connectivity Map
All Adapters contain a set of properties that are unique to that Adapter type. When you add a
TCP/IP HL7 Adapter to a Connectivity Map, you can modify the properties for that specic
Adapter. When you add a TCP/IP HL7 External System in the Project’s Environment, you can
modify the properties for that Adapter type for all Projects that use that Environment.
AddingandConguringaTCP/IPHL7Adapterina ConnectivityMap
SunAdapterforTCP/IPHL7User's Guide 27