Package com.ibm.fhir.model.util
Class XMLSupport
- java.lang.Object
 - 
- com.ibm.fhir.model.util.XMLSupport
 
 
- 
public final class XMLSupport extends Object
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXMLSupport.StreamReaderDelegateSimple subclass ofStreamReaderDelegateto make it AutoCloseablestatic classXMLSupport.StreamWriterDelegateThe corollary toStreamReaderDelegate. 
- 
Field Summary
Fields Modifier and Type Field Description static StringFHIR_NS_URIstatic StringXHTML_NS_URI 
- 
Method Summary
 
 - 
 
- 
- 
Field Detail
- 
FHIR_NS_URI
public static final String FHIR_NS_URI
- See Also:
 - Constant Field Values
 
 
- 
XHTML_NS_URI
public static final String XHTML_NS_URI
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
init
public static void init()
Calling this method allows us to load/initialize this class during startup. 
- 
checkElementOrder
public static int checkElementOrder(String elementName, int current, int previous, boolean repeating)
Checks the order of the current element using its position relative to the position of the previous element- Parameters:
 elementName- the name of the current elementcurrent- the position of the current element in the sequenceprevious- the position of the previous element in the sequencerepeating- true if the element is allowed to repeat- Returns:
 - the position of the current element
 - Throws:
 IllegalArgumentException- if the element is out of order or if the parser has already seen the element and it is not allowed to repeat
 
- 
createStreamReaderDelegate
public static XMLSupport.StreamReaderDelegate createStreamReaderDelegate(InputStream in) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
createStreamReaderDelegate
public static XMLSupport.StreamReaderDelegate createStreamReaderDelegate(Reader reader) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
createStreamWriterDelegate
public static XMLSupport.StreamWriterDelegate createStreamWriterDelegate(OutputStream out) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
createStreamWriterDelegate
public static XMLSupport.StreamWriterDelegate createStreamWriterDelegate(Writer writer) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
createXMLStreamReader
public static XMLStreamReader createXMLStreamReader(InputStream in) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
createXMLStreamReader
public static XMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
createXMLStreamWriter
public static XMLStreamWriter createXMLStreamWriter(OutputStream out) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
createXMLStreamWriter
public static XMLStreamWriter createXMLStreamWriter(Writer writer) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
isResourceContainer
public static boolean isResourceContainer(String elementName)
 
- 
parseDiv
public static String parseDiv(XMLStreamReader reader) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
requireNamespace
public static void requireNamespace(XMLStreamReader reader, String namespaceURI) throws XMLStreamException
- Throws:
 XMLStreamException
 
- 
createNonClosingStreamWriterDelegate
public static XMLSupport.StreamWriterDelegate createNonClosingStreamWriterDelegate(XMLStreamWriter writer)
 
- 
createTransformer
public static Transformer createTransformer()
 
 - 
 
 -