Class XmlSessionReaderV2_0
java.lang.Object
ca.phon.session.io.xml.v2_0.XmlSessionReaderV2_0
- All Implemented Interfaces:
IPluginExtensionPoint<SessionReader>
,SessionReader
,XMLObjectReader<Session>
@XMLSerial(namespace="https://phon.ca/ns/session",
elementName="session",
bindType=Session.class)
@SessionIO(group="ca.phon",
id="phonbank",
version="2.0",
mimetype="application/xml",
extension="xml",
name="Phon 4.0+ (.xml)")
public final class XmlSessionReaderV2_0
extends Object
implements SessionReader, XMLObjectReader<Session>, IPluginExtensionPoint<SessionReader>
Session XML reader for session files with starting element {https://phon.ca/ns/session}session (version '2.0'.)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check to see if this reader can open the given file.Class
<?> Get type of extensionGet factory for extension point objectsRead from the given xml input stream.readGra
(SessionFactory factory, XmlGraType xmlGraType) readMor
(SessionFactory factory, XmlMorType xmlMorType) readMorTierData
(SessionFactory factory, XmlMorTierData xmlTierData) readSession
(InputStream stream) Create session from given input stream
-
Constructor Details
-
XmlSessionReaderV2_0
public XmlSessionReaderV2_0()
-
-
Method Details
-
read
Description copied from interface:XMLObjectReader
Read from the given xml input stream.- Specified by:
read
in interfaceXMLObjectReader<Session>
- Returns:
- object of given type read from the given eventReader
- Throws:
IOException
- if something goes wrong
-
readOrthography
-
readTranscript
-
readGra
-
readMorTierData
-
readMor
-
readSession
Description copied from interface:SessionReader
Create session from given input stream- Specified by:
readSession
in interfaceSessionReader
- Parameters:
stream
-- Returns:
- session
- Throws:
IOException
- if an error occurs
-
canRead
Description copied from interface:SessionReader
Check to see if this reader can open the given file.- Specified by:
canRead
in interfaceSessionReader
- Parameters:
file
-- Returns:
true
if this reader can open the given file,false
otherwise- Throws:
IOException
- if an error occurs when attempting to open a file
-
getExtensionType
Description copied from interface:IPluginExtensionPoint
Get type of extension- Specified by:
getExtensionType
in interfaceIPluginExtensionPoint<SessionReader>
-
getFactory
Description copied from interface:IPluginExtensionPoint
Get factory for extension point objects- Specified by:
getFactory
in interfaceIPluginExtensionPoint<SessionReader>
-