|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.languagecomputer.api.text.DefaultText com.languagecomputer.api.text.DefaultSpatialSpan
public class DefaultSpatialSpan
Default implementation of a SpatialSpan
.
DefaultText
Field Summary |
---|
Fields inherited from interface com.languagecomputer.api.text.SpatialSpan |
---|
TYPE |
Constructor Summary | |
---|---|
DefaultSpatialSpan()
Creates a new DefaultSpatialSpan . |
Method Summary | |
---|---|
Double |
getLatitude()
Returns the latitude of the geographic object (optional). |
Double |
getLongitude()
Returns the longitude of the geographic object (optional). |
List<String> |
getParents()
Returns the list of geographic objects that contain this one in increasing order (optional). |
Integer |
getPopulation()
Returns the human population of the geographic object (optional). |
void |
setAnnotationType(AnnotationType annType)
Not necessary: defaults to SpatialSpan.TYPE . |
void |
setLatitude(Double latitude)
Sets the latitude. |
void |
setLongitude(Double longitude)
Sets the longitude. |
void |
setParents(List<String> parents)
Sets the parents. |
void |
setPopulation(Integer population)
Sets the population. |
String |
toString()
Returns a String representation of a
DefaultSpatialSpan . |
Methods inherited from class com.languagecomputer.api.text.DefaultText |
---|
getAnnotationType, getCongruentAnnotations, getDocument, getDocumentID, getEndCharOffset, getIntersectingAnnotations, getRawString, getStartCharOffset, getSubAnnotations, getSuperAnnotations, setDocument, setEndCharOffset, setRawString, setStartCharOffset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.languagecomputer.api.text.Text |
---|
getAnnotationType, getCongruentAnnotations, getDocument, getDocumentID, getEndCharOffset, getIntersectingAnnotations, getRawString, getStartCharOffset, getSubAnnotations, getSuperAnnotations |
Constructor Detail |
---|
public DefaultSpatialSpan()
DefaultSpatialSpan
.
Method Detail |
---|
public void setAnnotationType(AnnotationType annType)
SpatialSpan.TYPE
.
setAnnotationType
in class DefaultText
annType
- AnnotationType
to use for this
DefaultSpatialSpan
.Text.getAnnotationType()
,
AnnotationType
public void setLatitude(Double latitude)
latitude
- The latitude to use, where null
represents
an unknown value.SpatialSpan.getLatitude()
public Double getLatitude()
null
.
getLatitude
in interface SpatialSpan
null
if this functionality isn't
implemented.public void setLongitude(Double longitude)
longitude
- The longitude to use, where null
represents
an unknown value.SpatialSpan.getLongitude()
public Double getLongitude()
null
.
getLongitude
in interface SpatialSpan
null
if this functionality isn't
implemented.public void setParents(List<String> parents)
parents
- The parents to use, where null
represents
an unknown value.SpatialSpant#getParents
public List<String> getParents()
SpatialSpan
covers the
text Dallas, then the parents could be Texas, United
States, North America, and Earth. Implementors that
choose not to provide the geographic parents should return
null
.
getParents
in interface SpatialSpan
List
of the geographic parents of this
SpatialSpan
, or null
if this functionality
isn't implemented.public void setPopulation(Integer population)
population
- The population to use, where null
represents
an unknown value.SpatialSpan.getPopulation()
public Integer getPopulation()
null
.
getPopulation
in interface SpatialSpan
null
if this functionality isn't
implemented.public String toString()
String
representation of a
DefaultSpatialSpan
.
toString
in class DefaultText
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |