public abstract class AbstractPropositionDefinition extends Object implements PropositionDefinition
Protempa's public API assumes that they all
share the same namespace. This needs to be fixed. I'm leaning toward having
all knowledge definitions share the same namespace, in which case, no changes
to Protempa's API would be required, and the duplicate id checking could all
occur in this class in a concrete implementation of setId0().| Modifier and Type | Field and Description |
|---|---|
protected String[] |
children |
protected static String |
CHILDREN_PROPERTY |
| Modifier and Type | Method and Description |
|---|---|
Attribute |
attribute(String name) |
String |
getAbbreviatedDisplayName()
This proposition definition's abbreviated display name.
|
Date |
getAccessed()
Returns the timestamp of when this proposition definition was accessed from the knowledge source.
|
Attribute[] |
getAttributes() |
String[] |
getChildren()
Returns the ids of this proposition definition's children.
|
Date |
getCreated()
Returns the timestamp of when this proposition definition was created,
if the knowledge source backend maintains this information.
|
String |
getDescription()
A longer description of the proposition definition.
|
String |
getDisplayName()
This proposition definition's display name.
|
Date |
getDownloaded()
Returns the timestamp of when this proposition definition's information
was downloaded from its source, e.g., a terminology standard, if such
information is available.
|
String |
getId()
This proposition definition's id.
|
boolean |
getInDataSource() |
String[] |
getInverseIsA()
Returns the ids of the proposition definitions that have an is-a
relationship with this proposition definition.
|
PropertyDefinition[] |
getPropertyDefinitions() |
String |
getPropositionId()
The proposition id of propositions derived by this proposition
definition.
|
ReferenceDefinition[] |
getReferenceDefinitions() |
SourceId |
getSourceId() |
String[] |
getTermIds()
Gets the ids of the
TermDefinitions associated with this
proposition definition. |
Date |
getUpdated()
Returns the timestamp of when this proposition definition was last
updated, if the knowledge source backend maintains this information.
|
String |
getVersion()
Returns the version number of this proposition definition, for
knowledge source backends that maintain version information.
|
PropertyDefinition |
propertyDefinition(String id) |
protected abstract void |
recalculateChildren() |
ReferenceDefinition |
referenceDefinition(String name)
Returns the reference definition with the given name.
|
void |
reset()
Resets this proposition definition to default values.
|
void |
setAbbreviatedDisplayName(String abbrev)
Sets this knowledge definition's abbreviated display name.
|
void |
setAccessed(Date accessed) |
void |
setAttributes(Attribute[] attributes) |
void |
setCreated(Date created) |
void |
setDescription(String description) |
void |
setDisplayName(String displayName)
Sets this proposition definition's human-readable display name.
|
void |
setDownloaded(Date downloaded) |
void |
setInDataSource(boolean inDataSource) |
void |
setInverseIsA(String... inverseIsA)
Sets the children of this proposition definition.
|
void |
setPropertyDefinitions(PropertyDefinition... propertyDefinitions) |
void |
setPropositionId(String propId)
Sets the proposition id of propositions derived by this proposition
definition.
|
void |
setReferenceDefinitions(ReferenceDefinition... referenceDefinitions) |
void |
setSourceId(SourceId sourceId) |
void |
setTermIds(String... termIds)
Assigns this proposition with associated
TermDefinition ids. |
void |
setUpdated(Date updated) |
void |
setVersion(String version) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisConcatenable, isSolidacceptacceptCheckedprotected static final String CHILDREN_PROPERTY
protected String[] children
public final String getId()
PropositionDefinitiongetId in interface PropositionDefinitionString, guaranteed not to be null.public final String getPropositionId()
PropositionDefinitionid field.getPropositionId in interface PropositionDefinitionpublic final void setPropositionId(String propId)
propId - a proposition id. Pass in null to set the
value of this field to the value of this proposition definition's
id field.public final String getAbbreviatedDisplayName()
PropositionDefinitiongetAbbreviatedDisplayName in interface PropositionDefinitionString. Guaranteed not null.public final void setAbbreviatedDisplayName(String abbrev)
abbrev - an abbreviated display name String.public final String getDisplayName()
PropositionDefinitiongetDisplayName in interface PropositionDefinitionString. Guaranteed not null.public final void setDisplayName(String displayName)
displayName - a display name String.public String getDescription()
PropositionDefinitiongetDescription in interface PropositionDefinitionString. Guaranteed not null.public void setDescription(String description)
public String[] getInverseIsA()
PropositionDefinitiongetInverseIsA in interface PropositionDefinitionString[] of proposition definition ids.public void setInverseIsA(String... inverseIsA)
inverseIsA - a String[] of proposition definition ids. No
null or duplicate elements allowed.public String[] getChildren()
PropositionDefinitiongetChildren in interface PropositionDefinitionStrings, guaranteed not null.public final String[] getTermIds()
PropositionDefinitionTermDefinitions associated with this
proposition definition.getTermIds in interface PropositionDefinitionStrings.public final void setTermIds(String... termIds)
TermDefinition ids.termId - a term definition id String. No null
or duplicate elements allowed.public final PropertyDefinition[] getPropertyDefinitions()
getPropertyDefinitions in interface PropositionDefinitionpublic final PropertyDefinition propertyDefinition(String id)
propertyDefinition in interface PropositionDefinitionpublic final void setPropertyDefinitions(PropertyDefinition... propertyDefinitions)
public final ReferenceDefinition[] getReferenceDefinitions()
getReferenceDefinitions in interface PropositionDefinitionpublic final ReferenceDefinition referenceDefinition(String name)
PropositionDefinitionreferenceDefinition in interface PropositionDefinitionname - a reference definition name String.ReferenceDefinition with the given name, or
null if this proposition definition has no reference
definition with the given namepublic final void setReferenceDefinitions(ReferenceDefinition... referenceDefinitions)
public boolean getInDataSource()
getInDataSource in interface PropositionDefinitionpublic void setInDataSource(boolean inDataSource)
public SourceId getSourceId()
getSourceId in interface PropositionDefinitionpublic void setSourceId(SourceId sourceId)
public Date getAccessed()
PropositionDefinitiongetAccessed in interface PropositionDefinitionDate. Guaranteed not null.public Date getCreated()
PropositionDefinitiongetCreated in interface PropositionDefinitionDate, or null if the knowledge source
backend does not maintain created timestamp information.public Date getUpdated()
PropositionDefinitiongetUpdated in interface PropositionDefinitionDate, or null if the knowledge source
backend does not maintain last updated timestamp information.public void setAccessed(Date accessed)
public void setCreated(Date created)
public void setUpdated(Date updated)
public String getVersion()
PropositionDefinitiongetVersion in interface PropositionDefinitionString, or null if the
knowledge source backend does not maintain version information. The
string's format is specified to the knowledge source backend and the
original information source.public void setVersion(String version)
public Date getDownloaded()
PropositionDefinitiongetDownloaded in interface PropositionDefinitionDate, or null if no download timestamp
information is available.public void setDownloaded(Date downloaded)
public Attribute[] getAttributes()
getAttributes in interface PropositionDefinitionpublic void setAttributes(Attribute[] attributes)
public Attribute attribute(String name)
attribute in interface PropositionDefinitionpublic void reset()
protected abstract void recalculateChildren()
Copyright © 2012–2018 Emory University. All rights reserved.