Class CpeCheckpointImpl
- java.lang.Object
-
- org.apache.uima.resource.metadata.impl.MetaDataObject_impl
-
- org.apache.uima.collection.impl.metadata.cpe.CpeCheckpointImpl
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,CpeCheckpoint
,MetaDataObject
,XMLizable
public class CpeCheckpointImpl extends MetaDataObject_impl implements CpeCheckpoint
The Class CpeCheckpointImpl.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer
-
-
Field Summary
Fields Modifier and Type Field Description private int
batch
The batch.private java.lang.String
file
The file.private static long
serialVersionUID
The Constant serialVersionUID.private java.lang.String
time
The time.private static XmlizationInfo
XMLIZATION_INFO
The Constant XMLIZATION_INFO.-
Fields inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
serialContext
-
-
Constructor Summary
Constructors Constructor Description CpeCheckpointImpl()
Instantiates a new cpe checkpoint impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildFromXMLElement(org.w3c.dom.Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions)
Overridden to read Checkpoint attributes.private int
convert2Number(java.lang.Object anObject)
Convert 2 number.int
getBatch()
int
getBatchSize()
java.lang.String
getFile()
Gets the file.java.lang.String
getFilePath()
Returns file where checkpoint information is storedint
getFrequency()
Returns frequency of checkpoints.java.lang.String
getTime()
Gets the time.protected org.xml.sax.helpers.AttributesImpl
getXMLAttributes()
Overridden to handle Checkpoint attributes.protected XmlizationInfo
getXmlizationInfo()
To be implemented by subclasses to return information describing how to represent this object in XML.boolean
isTimeBased()
Returns true if frequency of checkpoints is time-basedvoid
setBatch(int i)
Sets the batch.void
setBatchSize(int aBatchSize)
void
setFile(java.lang.String string)
Sets the file.void
setFilePath(java.lang.String aCheckpointFilePath)
Sets the file where checkpoint information will be storedvoid
setFrequency(int aFrequency, boolean aTimeBased)
Sets frequency of checkpoints.void
setTime(java.lang.String i)
Sets the time.-
Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, clone, equals, getAdditionalAttributes, getAttributeClass, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getWrapperClass, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXml, writePropertyAsElement
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The Constant serialVersionUID.- See Also:
- Constant Field Values
-
file
private java.lang.String file
The file.
-
time
private java.lang.String time
The time.
-
batch
private int batch
The batch.
-
XMLIZATION_INFO
private static final XmlizationInfo XMLIZATION_INFO
The Constant XMLIZATION_INFO.
-
-
Method Detail
-
setFilePath
public void setFilePath(java.lang.String aCheckpointFilePath) throws CpeDescriptorException
Description copied from interface:CpeCheckpoint
Sets the file where checkpoint information will be stored- Specified by:
setFilePath
in interfaceCpeCheckpoint
- Parameters:
aCheckpointFilePath
- - checkpoint file path- Throws:
CpeDescriptorException
- tbd
-
getFilePath
public java.lang.String getFilePath()
Description copied from interface:CpeCheckpoint
Returns file where checkpoint information is stored- Specified by:
getFilePath
in interfaceCpeCheckpoint
- Returns:
- - checkpoint file path
-
setFrequency
public void setFrequency(int aFrequency, boolean aTimeBased)
Description copied from interface:CpeCheckpoint
Sets frequency of checkpoints. Currently only time-based checkpointing is supported.- Specified by:
setFrequency
in interfaceCpeCheckpoint
- Parameters:
aFrequency
- - number of millis between checkpointsaTimeBased
- - true if checkpoint is based on time
-
convert2Number
private int convert2Number(java.lang.Object anObject)
Convert 2 number.- Parameters:
anObject
- the an object- Returns:
- the int
-
getFrequency
public int getFrequency()
Description copied from interface:CpeCheckpoint
Returns frequency of checkpoints.- Specified by:
getFrequency
in interfaceCpeCheckpoint
- Returns:
- - number of millis between checkpoints
-
isTimeBased
public boolean isTimeBased()
Description copied from interface:CpeCheckpoint
Returns true if frequency of checkpoints is time-based- Specified by:
isTimeBased
in interfaceCpeCheckpoint
- Returns:
- true;
-
setBatchSize
public void setBatchSize(int aBatchSize)
- Specified by:
setBatchSize
in interfaceCpeCheckpoint
- Parameters:
aBatchSize
- the size of the batch
-
getBatchSize
public int getBatchSize()
- Specified by:
getBatchSize
in interfaceCpeCheckpoint
-
buildFromXMLElement
public void buildFromXMLElement(org.w3c.dom.Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Overridden to read Checkpoint attributes.- Specified by:
buildFromXMLElement
in interfaceXMLizable
- Overrides:
buildFromXMLElement
in classMetaDataObject_impl
- Parameters:
aElement
- the a elementaParser
- the a parseraOptions
- the a options- Throws:
InvalidXMLException
- the invalid XML exception- See Also:
MetaDataObject_impl.buildFromXMLElement(org.w3c.dom.Element, org.apache.uima.util.XMLParser, org.apache.uima.util.XMLParser.ParsingOptions)
-
getXMLAttributes
protected org.xml.sax.helpers.AttributesImpl getXMLAttributes()
Overridden to handle Checkpoint attributes.- Overrides:
getXMLAttributes
in classMetaDataObject_impl
- Returns:
- the XML attributes
- See Also:
MetaDataObject_impl.getXMLAttributes()
-
getXmlizationInfo
protected XmlizationInfo getXmlizationInfo()
Description copied from class:MetaDataObject_impl
To be implemented by subclasses to return information describing how to represent this object in XML.- Specified by:
getXmlizationInfo
in classMetaDataObject_impl
- Returns:
- information defining this object's XML representation
-
getBatch
public int getBatch()
- Returns:
- the batch size
-
getFile
public java.lang.String getFile()
Gets the file.- Returns:
- a file
-
getTime
public java.lang.String getTime()
Gets the time.- Returns:
- a time
-
setBatch
public void setBatch(int i)
Sets the batch.- Parameters:
i
- the new batch
-
setFile
public void setFile(java.lang.String string)
Sets the file.- Parameters:
string
- the new file
-
setTime
public void setTime(java.lang.String i)
Sets the time.- Parameters:
i
- the new time
-
-