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 voidclose()close.protected abstract javax.xml.bind.UnmarshallercreateJAXBUnmarshaller()createJAXBUnmarshaller.protected PsiXmlParserExceptioncreatePsiXmlExceptionFrom(String message, Exception e)createPsiXmlExceptionFrom.AbstractEntrySet<AbstractBaseEntry<T>>getEntrySet()Getter for the fieldentrySet.XmlInteractorFactorygetInteractorFactory()Getter for the fieldinteractorFactory.PsiXmlParserListenergetListener()getListener.PsiXmlVersiongetVersion()Getter for the fieldversion.booleanhasFinished()hasFinished.protected AbstractEntrySet<AbstractBaseEntry<T>>parseEntrySet()parseEntrySet.TparseNextInteraction()parseNextInteraction.voidreInit()reInit.voidsetCacheOfObjects(PsiXmlIdCache indexOfObjects)setCacheOfObjects.voidsetInteractorFactory(XmlInteractorFactory interactorFactory)setInteractorFactory.voidsetListener(PsiXmlParserListener listener)setListener.
-
-
-
Constructor Detail
-
AbstractFullPsiXmlParser
public AbstractFullPsiXmlParser(File file) throws javax.xml.bind.JAXBException, FileNotFoundException
Constructor for AbstractFullPsiXmlParser.
- Parameters:
file- aFileobject.- 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- aInputStreamobject.- Throws:
javax.xml.bind.JAXBException- if any.
-
AbstractFullPsiXmlParser
public AbstractFullPsiXmlParser(URL url) throws IOException, javax.xml.bind.JAXBException
Constructor for AbstractFullPsiXmlParser.
- Parameters:
url- aURLobject.- Throws:
IOException- if any.javax.xml.bind.JAXBException- if any.
-
-
Method Detail
-
parseNextInteraction
public T parseNextInteraction() throws PsiXmlParserException
parseNextInteraction.
- Specified by:
parseNextInteractionin interfacePsiXmlParser<T extends Interaction>- Returns:
- a T object.
- Throws:
PsiXmlParserException- if any.
-
close
public void close() throws MIIOExceptionclose.
- Specified by:
closein interfaceFullPsiXmlParser<T extends Interaction>- Specified by:
closein interfacePsiXmlParser<T extends Interaction>- Throws:
MIIOException- if any.
-
getInteractorFactory
public XmlInteractorFactory getInteractorFactory()
Getter for the field
interactorFactory.- Specified by:
getInteractorFactoryin interfacePsiXmlParser<T extends Interaction>- Returns:
- a
XmlInteractorFactoryobject.
-
setInteractorFactory
public void setInteractorFactory(XmlInteractorFactory interactorFactory)
setInteractorFactory.
- Specified by:
setInteractorFactoryin interfacePsiXmlParser<T extends Interaction>- Parameters:
interactorFactory- aXmlInteractorFactoryobject.
-
hasFinished
public boolean hasFinished() throws PsiXmlParserExceptionhasFinished.
- Specified by:
hasFinishedin interfaceFullPsiXmlParser<T extends Interaction>- Specified by:
hasFinishedin interfacePsiXmlParser<T extends Interaction>- Returns:
- a boolean.
- Throws:
PsiXmlParserException- if any.
-
reInit
public void reInit() throws MIIOExceptionreInit.
- Specified by:
reInitin interfaceFullPsiXmlParser<T extends Interaction>- Specified by:
reInitin interfacePsiXmlParser<T extends Interaction>- Throws:
MIIOException- if any.
-
getListener
public PsiXmlParserListener getListener()
getListener.
- Specified by:
getListenerin interfaceFullPsiXmlParser<T extends Interaction>- Specified by:
getListenerin interfacePsiXmlParser<T extends Interaction>- Returns:
- a
PsiXmlParserListenerobject.
-
setListener
public void setListener(PsiXmlParserListener listener)
setListener.
- Specified by:
setListenerin interfaceFullPsiXmlParser<T extends Interaction>- Specified by:
setListenerin interfacePsiXmlParser<T extends Interaction>- Parameters:
listener- aPsiXmlParserListenerobject.
-
setCacheOfObjects
public void setCacheOfObjects(PsiXmlIdCache indexOfObjects)
setCacheOfObjects.
- Specified by:
setCacheOfObjectsin interfaceFullPsiXmlParser<T extends Interaction>- Specified by:
setCacheOfObjectsin interfacePsiXmlParser<T extends Interaction>- Parameters:
indexOfObjects- aPsiXmlIdCacheobject.
-
getEntrySet
public AbstractEntrySet<AbstractBaseEntry<T>> getEntrySet() throws PsiXmlParserException
Getter for the field
entrySet.- Specified by:
getEntrySetin interfaceFullPsiXmlParser<T extends Interaction>- Returns:
- a
AbstractEntrySetobject. - Throws:
PsiXmlParserException- if any.
-
createJAXBUnmarshaller
protected abstract javax.xml.bind.Unmarshaller createJAXBUnmarshaller() throws javax.xml.bind.JAXBExceptioncreateJAXBUnmarshaller.
- Returns:
- a
Unmarshallerobject. - Throws:
javax.xml.bind.JAXBException- if any.
-
parseEntrySet
protected AbstractEntrySet<AbstractBaseEntry<T>> parseEntrySet() throws PsiXmlParserException
parseEntrySet.
- Returns:
- a
AbstractEntrySetobject. - Throws:
PsiXmlParserException- if any.
-
createPsiXmlExceptionFrom
protected PsiXmlParserException createPsiXmlExceptionFrom(String message, Exception e)
createPsiXmlExceptionFrom.
- Parameters:
message- aStringobject.e- aExceptionobject.- Returns:
- a
PsiXmlParserExceptionobject.
-
getVersion
public PsiXmlVersion getVersion()
Getter for the field
version.- Specified by:
getVersionin interfacePsiXmlParser<T extends Interaction>- Returns:
- a
PsiXmlVersionobject.
-
-