public abstract class AbstractProposition extends Object implements Proposition
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProposition()
Here only for use by deserialization of
Serializable
subclasses of this class. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a
PropertyChangeListener to the listener list. |
void |
addReference(String name,
UniqueId ref) |
boolean |
equals(Object o) |
Date |
getCreateDate()
Gets the timestamp this proposition was created in the source system, or
for derived propositions, the timestamp it was created through the
temporal abstraction process.
|
Date |
getDeleteDate()
Gets the timestamp this proposition was deleted from the source system,
or for derived propositions, the timestamp it was invalidated due to
data changes.
|
Date |
getDownloadDate()
Gets the timestamp this proposition was downloaded from the source
system.
|
String |
getId()
Gets this proposition's data type.
|
Value |
getProperty(String name)
Gets the value of the specified property.
|
String[] |
getPropertyNames()
Get the property names for the proposition
|
String[] |
getReferenceNames()
Get the reference names for the proposition
|
List<UniqueId> |
getReferences(String name)
Gets the global unique identifiers for the propositions that have the
specified 1:N relationship with this proposition.
|
SourceSystem |
getSourceSystem()
Returns the data source type of the Proposition.
|
UniqueId |
getUniqueId()
Gets this proposition's global unique identifier.
|
Date |
getUpdateDate()
Gets the timestamp when this proposition was last updated in the source
system, or for derived propositions, the timestamp it was last updated
through the temporal abstraction process.
|
int |
hashCode() |
protected void |
initializeAbstractProposition(String id,
UniqueId uniqueId)
Assigns fields specified in the constructor.
|
protected void |
initializeProperties() |
protected void |
initializePropertyChangeSupport() |
protected void |
initializeReferences() |
boolean |
isEqual(Object other)
Determines if the specified object is a
Proposition and has
the same field values as this proposition. |
protected void |
readAbstractProposition(ObjectInputStream s) |
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a
PropertyChangeListener from the listener list. |
void |
setCreateDate(Date createDate)
Sets the date this proposition was created according to the source
system from which it was obtained, or for derived propositions, the
date it was created through the temporal abstraction process.
|
void |
setDeleteDate(Date deleteDate)
Sets the timestamp this proposition was deleted from the source system.
|
void |
setDownloadDate(Date downloadDate)
Sets the date this proposition was downloaded from the source system.
|
void |
setProperty(String name,
Value value) |
void |
setReferences(String name,
List<UniqueId> refs) |
void |
setSourceSystem(SourceSystem sourceSystem) |
void |
setUpdateDate(Date updateDate)
Sets the timestamp this proposition was last updated according to the
source system from which it was obtained, or for derived propositions,
the date it was last updated through the temporal abstraction process.
|
String |
toString() |
protected void |
writeAbstractProposition(ObjectOutputStream s) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitacceptacceptCheckedprotected AbstractProposition()
Serializable
subclasses of this class. Do not call this for any other reason because
id and uniqueId are left uninitialized! Subclasses that are serializable
should implement a
readObject method that calls readAbstractProposition(java.io.ObjectInputStream).protected final void initializeAbstractProposition(String id, UniqueId uniqueId)
id - the proposition id.uniqueId - the proposition's unique id.protected void initializeProperties()
protected void initializeReferences()
protected void initializePropertyChangeSupport()
public String getId()
PropositiongetId in interface PropositionString for the type of data
represented by this proposition.public final Value getProperty(String name)
PropositiongetProperty in interface Propositionname - the name String of a valid property. Cannot be
null.Value of the specified property.public final String[] getPropertyNames()
PropositiongetPropertyNames in interface Propositionpublic SourceSystem getSourceSystem()
PropositiongetSourceSystem in interface PropositionSourceSystem.public void setSourceSystem(SourceSystem sourceSystem)
public final UniqueId getUniqueId()
PropositiongetUniqueId in interface PropositionUniqueIdentifier.public final List<UniqueId> getReferences(String name)
PropositiongetReferences in interface Propositionname - the name of the relationship. Cannot be null.List of global unique identifiers.
Guaranteed not null.to get the propositions with the specified
relationship.public final String[] getReferenceNames()
PropositiongetReferenceNames in interface Propositionpublic final void addPropertyChangeListener(PropertyChangeListener l)
PropositionPropertyChangeListener to the listener list. The listener
is registered for all bound properties of this class (none at present).
If listener is null, no exception is thrown and no action is performed.addPropertyChangeListener in interface Propositionl - the PropertyChangeListener to be added.public final void removePropertyChangeListener(PropertyChangeListener l)
PropositionPropertyChangeListener from the listener list. This
method should be used to remove PropertyChangeListeners that were
registered for all bound properties of this class.
If listener is null, no exception is thrown and no action is performed.removePropertyChangeListener in interface Propositionl - the PropertyChangeListener to be removedpublic boolean isEqual(Object other)
PropositionProposition and has
the same field values as this proposition.isEqual in interface Propositionother - an Object.true if the specified object is a
Proposition and has the same field values, false
otherwise.protected void writeAbstractProposition(ObjectOutputStream s) throws IOException
IOExceptionprotected void readAbstractProposition(ObjectInputStream s) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic final Date getCreateDate()
Propositionnull value means the create
timestamp was not recorded, or the source system did not have an
accurate created timestamp. Returned values may be in the future, if
that is what the source system provided. Protempa does not use this
timestamp in any fashion to control how propositions are used in
computing temporal abstractions.getCreateDate in interface Propositionnull.public final void setCreateDate(Date createDate)
null.
Protempa implements no validation checking for future timestamps.
Protempa does not use the create timestamp in any fashion to control
how propositions are used in computing temporal abstractions. The
default value is null.createDate - a timestamp, or null.public final Date getUpdateDate()
Propositionnull value means that the
proposition's value has not been updated. When a source system does
not provide accurate update timestamps, a data source backend may set
this value to the downloaded timestamp to ensure that Protempa does not
miss an update.getUpdateDate in interface Propositionnull.public final void setUpdateDate(Date updateDate)
null, for
example, if the source system cannot distinguish between created and
updated records. Protempa may ignore propositions with an update
timestamp set in the future. The default value is null.updateDate - a timestamp, or null.public final Date getDownloadDate()
Propositionnull value means the proposition was not downloaded from a
source system, or the source system did not provide an accurate
downloaded timestamp. Protempa does not use this timestamp in any
fashion to control how propositions are used in computing temporal
abstractions.getDownloadDate in interface Propositionnull.public final void setDownloadDate(Date downloadDate)
null if the source system did not provide
a download date or it is inaccurate. The default value is
null.downloadDate - a date, or null.public Date getDeleteDate()
Propositionnull value means the proposition should not
be deleted. Any non-null timestamp will cause the proposition to be
deleted, even a timestamp in the future. A data source backend may set
this timestamp to the downloaded timestamp if it knows a proposition
should be deleted but the source system does not provide an accurate
delete timestamp.getDeleteDate in interface Propositionnull.public void setDeleteDate(Date deleteDate)
null to indicate that this
proposition has not been deleted. If you know that a proposition should
be deleted but the source system does not maintain accurate delete
timestamps, set it to the query/read timestamp. The default value is
null. Any non-null timestamp will cause Protempa to delete
the proposition, even if the timestamp is in the future.deleteDate - a timestamp, or null.Copyright © 2012–2017 Emory University. All rights reserved.