Class XMLFragments
java.lang.Object
ca.phon.session.io.xml.XMLFragments
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Grasp
graFromXml
(String xml) static IPATranscript
ipaFromXml
(String xml) static void
static Mor
morFromXml
(String xml) static MorTierData
morsFromXml
(String xml) static Orthography
orthographyFromXml
(String xml) Create a new instance of Orthpgraphy from given xmlstatic <T> T
readFragment
(InputStream inputStream, Class<T> type) static String
toXml
(IPATranscript ipa, boolean includeNamespace, boolean formatted) Generate xml fragment for given ipastatic String
Generate xml fragment for given graspstatic String
Generate xml fragment for given morstatic String
toXml
(Orthography orthography, boolean includeNamespace, boolean formatted) Generate xml fragment for Orthogrpahystatic void
writeFragment
(jakarta.xml.bind.JAXBElement<?> jaxbElement, OutputStream out, boolean includeNamespace, boolean formatted) Write xml fragment to given stream
-
Constructor Details
-
XMLFragments
public XMLFragments()
-
-
Method Details
-
writeFragment
public static void writeFragment(jakarta.xml.bind.JAXBElement<?> jaxbElement, OutputStream out, boolean includeNamespace, boolean formatted) throws IOException Write xml fragment to given stream- Parameters:
jaxbElement
-out
-includeNamespace
-formatted
-- Throws:
IOException
-
toXml
public static String toXml(Orthography orthography, boolean includeNamespace, boolean formatted) throws IOException Generate xml fragment for Orthogrpahy- Parameters:
orthography
-includeNamespace
-- Returns:
- xml fragment for given orthography
- Throws:
IOException
- on error
-
toXml
public static String toXml(IPATranscript ipa, boolean includeNamespace, boolean formatted) throws IOException Generate xml fragment for given ipa- Parameters:
ipa
-includeNamespace
-formatted
-- Returns:
- xml fragment for given ipa
- Throws:
IOException
- on error
-
toXml
public static String toXml(Mor mor, String type, boolean includeNamespace, boolean formatted) throws IOException Generate xml fragment for given mor- Parameters:
mor
-formatted
-- Returns:
- xml fragment for given Mor
- Throws:
IOException
-
toXml
public static String toXml(Grasp gra, String type, boolean includeNamespace, boolean formatted) throws IOException Generate xml fragment for given grasp- Parameters:
gra
-formatted
-- Returns:
- xml fragment for given Grasp
- Throws:
IOException
-
readFragment
- Throws:
IOException
-
orthographyFromXml
Create a new instance of Orthpgraphy from given xml- Parameters:
xml
-- Returns:
- orthography described by the xml
- Throws:
IOException
- on error
-
ipaFromXml
- Throws:
IOException
-
morsFromXml
- Throws:
IOException
-
morFromXml
- Throws:
IOException
-
graFromXml
- Throws:
IOException
-
main
-