Package psidev.psi.mi.jami.xml.io.parser
Class AbstractFullPsiXmlParser<T extends Interaction>
- java.lang.Object
-
- psidev.psi.mi.jami.xml.io.parser.AbstractFullPsiXmlParser<T>
-
- All Implemented Interfaces:
FullPsiXmlParser<T>
,PsiXmlParser<T>
- Direct Known Subclasses:
FullXmlComplexParser
,FullXmlEvidenceParser
,FullXmlModelledParser
,FullXmlParser
,LightFullXmlParser
public abstract class AbstractFullPsiXmlParser<T extends Interaction> extends Object implements PsiXmlParser<T>, FullPsiXmlParser<T>
This class if for parser that will load the all file in memory- Since:
07/11/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractFullPsiXmlParser(File file)
Constructor for AbstractFullPsiXmlParser.AbstractFullPsiXmlParser(InputStream inputStream)
Constructor for AbstractFullPsiXmlParser.AbstractFullPsiXmlParser(Reader reader)
Constructor for AbstractFullPsiXmlParser.AbstractFullPsiXmlParser(URL url)
Constructor for AbstractFullPsiXmlParser.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
close.protected abstract javax.xml.bind.Unmarshaller
createJAXBUnmarshaller()
createJAXBUnmarshaller.protected PsiXmlParserException
createPsiXmlExceptionFrom(String message, Exception e)
createPsiXmlExceptionFrom.AbstractEntrySet<AbstractBaseEntry<T>>
getEntrySet()
Getter for the fieldentrySet
.XmlInteractorFactory
getInteractorFactory()
Getter for the fieldinteractorFactory
.PsiXmlParserListener
getListener()
getListener.PsiXmlVersion
getVersion()
Getter for the fieldversion
.boolean
hasFinished()
hasFinished.protected AbstractEntrySet<AbstractBaseEntry<T>>
parseEntrySet()
parseEntrySet.T
parseNextInteraction()
parseNextInteraction.void
reInit()
reInit.void
setCacheOfObjects(PsiXmlIdCache indexOfObjects)
setCacheOfObjects.void
setInteractorFactory(XmlInteractorFactory interactorFactory)
setInteractorFactory.void
setListener(PsiXmlParserListener listener)
setListener.
-
-
-
Constructor Detail
-
AbstractFullPsiXmlParser
public AbstractFullPsiXmlParser(File file) throws javax.xml.bind.JAXBException, FileNotFoundException
Constructor for AbstractFullPsiXmlParser.
- Parameters:
file
- aFile
object.- Throws:
javax.xml.bind.JAXBException
- if any.FileNotFoundException
- if any.
-
AbstractFullPsiXmlParser
public AbstractFullPsiXmlParser(InputStream inputStream) throws javax.xml.bind.JAXBException
Constructor for AbstractFullPsiXmlParser.
- Parameters:
inputStream
- aInputStream
object.- Throws:
javax.xml.bind.JAXBException
- if any.
-
AbstractFullPsiXmlParser
public AbstractFullPsiXmlParser(URL url) throws IOException, javax.xml.bind.JAXBException
Constructor for AbstractFullPsiXmlParser.
- Parameters:
url
- aURL
object.- Throws:
IOException
- if any.javax.xml.bind.JAXBException
- if any.
-
-
Method Detail
-
parseNextInteraction
public T parseNextInteraction() throws PsiXmlParserException
parseNextInteraction.
- Specified by:
parseNextInteraction
in interfacePsiXmlParser<T extends Interaction>
- Returns:
- a T object.
- Throws:
PsiXmlParserException
- if any.
-
close
public void close() throws MIIOException
close.
- Specified by:
close
in interfaceFullPsiXmlParser<T extends Interaction>
- Specified by:
close
in interfacePsiXmlParser<T extends Interaction>
- Throws:
MIIOException
- if any.
-
getInteractorFactory
public XmlInteractorFactory getInteractorFactory()
Getter for the field
interactorFactory
.- Specified by:
getInteractorFactory
in interfacePsiXmlParser<T extends Interaction>
- Returns:
- a
XmlInteractorFactory
object.
-
setInteractorFactory
public void setInteractorFactory(XmlInteractorFactory interactorFactory)
setInteractorFactory.
- Specified by:
setInteractorFactory
in interfacePsiXmlParser<T extends Interaction>
- Parameters:
interactorFactory
- aXmlInteractorFactory
object.
-
hasFinished
public boolean hasFinished() throws PsiXmlParserException
hasFinished.
- Specified by:
hasFinished
in interfaceFullPsiXmlParser<T extends Interaction>
- Specified by:
hasFinished
in interfacePsiXmlParser<T extends Interaction>
- Returns:
- a boolean.
- Throws:
PsiXmlParserException
- if any.
-
reInit
public void reInit() throws MIIOException
reInit.
- Specified by:
reInit
in interfaceFullPsiXmlParser<T extends Interaction>
- Specified by:
reInit
in interfacePsiXmlParser<T extends Interaction>
- Throws:
MIIOException
- if any.
-
getListener
public PsiXmlParserListener getListener()
getListener.
- Specified by:
getListener
in interfaceFullPsiXmlParser<T extends Interaction>
- Specified by:
getListener
in interfacePsiXmlParser<T extends Interaction>
- Returns:
- a
PsiXmlParserListener
object.
-
setListener
public void setListener(PsiXmlParserListener listener)
setListener.
- Specified by:
setListener
in interfaceFullPsiXmlParser<T extends Interaction>
- Specified by:
setListener
in interfacePsiXmlParser<T extends Interaction>
- Parameters:
listener
- aPsiXmlParserListener
object.
-
setCacheOfObjects
public void setCacheOfObjects(PsiXmlIdCache indexOfObjects)
setCacheOfObjects.
- Specified by:
setCacheOfObjects
in interfaceFullPsiXmlParser<T extends Interaction>
- Specified by:
setCacheOfObjects
in interfacePsiXmlParser<T extends Interaction>
- Parameters:
indexOfObjects
- aPsiXmlIdCache
object.
-
getEntrySet
public AbstractEntrySet<AbstractBaseEntry<T>> getEntrySet() throws PsiXmlParserException
Getter for the field
entrySet
.- Specified by:
getEntrySet
in interfaceFullPsiXmlParser<T extends Interaction>
- Returns:
- a
AbstractEntrySet
object. - Throws:
PsiXmlParserException
- if any.
-
createJAXBUnmarshaller
protected abstract javax.xml.bind.Unmarshaller createJAXBUnmarshaller() throws javax.xml.bind.JAXBException
createJAXBUnmarshaller.
- Returns:
- a
Unmarshaller
object. - Throws:
javax.xml.bind.JAXBException
- if any.
-
parseEntrySet
protected AbstractEntrySet<AbstractBaseEntry<T>> parseEntrySet() throws PsiXmlParserException
parseEntrySet.
- Returns:
- a
AbstractEntrySet
object. - Throws:
PsiXmlParserException
- if any.
-
createPsiXmlExceptionFrom
protected PsiXmlParserException createPsiXmlExceptionFrom(String message, Exception e)
createPsiXmlExceptionFrom.
- Parameters:
message
- aString
object.e
- aException
object.- Returns:
- a
PsiXmlParserException
object.
-
getVersion
public PsiXmlVersion getVersion()
Getter for the field
version
.- Specified by:
getVersion
in interfacePsiXmlParser<T extends Interaction>
- Returns:
- a
PsiXmlVersion
object.
-
-