Class IndividualImpl
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean
-
- edu.cornell.mannlib.vitro.webapp.beans.IndividualImpl
-
- All Implemented Interfaces:
Individual,ResourceBean,Comparable<Individual>
- Direct Known Subclasses:
IndividualJena,IndividualSDB
public class IndividualImpl extends BaseResourceBean implements Individual, Comparable<Individual>
Represents a single entity record.
-
-
Field Summary
-
Fields inherited from class edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean
localName, localNameWithPrefix, namespace, pickListName, URI
-
-
Constructor Summary
Constructors Constructor Description IndividualImpl()IndividualImpl(String URI)
-
Method Summary
-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean
equals, getLabel, getLocalName, getLocalNameWithPrefix, getNamespace, getPickListName, getURI, hashCode, isAnonymous, setLocalName, setLocalNameWithPrefix, setNamespace, setPickListName, setURI
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface edu.cornell.mannlib.vitro.webapp.beans.ResourceBean
getLabel, getLocalName, getNamespace, getPickListName, getURI, isAnonymous, setLocalName, setNamespace, setURI
-
-
-
-
Field Detail
-
NOT_INITIALIZED
protected static final String NOT_INITIALIZED
This can be used as a "not initialized" indicator for a property that could validly be set tonull. Ifget()is called on such a property, and the property has this value, the correct value can be fetched and cached.- See Also:
- Constant Field Values
-
name
public String name
-
rdfsLabel
protected String rdfsLabel
-
vClassURI
public String vClassURI
-
vClass
protected VClass vClass
-
modTime
protected Timestamp modTime
-
propertyList
protected List<ObjectProperty> propertyList
-
populatedObjectPropertyList
protected List<ObjectProperty> populatedObjectPropertyList
-
objectPropertyMap
protected Map<String,ObjectProperty> objectPropertyMap
-
datatypePropertyList
protected List<DataProperty> datatypePropertyList
-
populatedDataPropertyList
protected List<DataProperty> populatedDataPropertyList
-
dataPropertyMap
protected Map<String,DataProperty> dataPropertyMap
-
dataPropertyStatements
protected List<DataPropertyStatement> dataPropertyStatements
-
objectPropertyStatements
protected List<ObjectPropertyStatement> objectPropertyStatements
-
rangeEnts2Ents
protected List<ObjectPropertyStatement> rangeEnts2Ents
-
externalIds
protected List<DataPropertyStatement> externalIds
-
mainImageUri
protected String mainImageUri
-
imageInfo
protected ImageInfo imageInfo
-
searchBoost
protected Float searchBoost
-
searchSnippet
protected String searchSnippet
-
sorted
protected boolean sorted
indicates if sortForDisplay has been called
-
DIRECT
protected boolean DIRECT
-
ALL
protected boolean ALL
-
-
Constructor Detail
-
IndividualImpl
public IndividualImpl()
-
IndividualImpl
public IndividualImpl(String URI)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceIndividual
-
setName
public void setName(String in)
- Specified by:
setNamein interfaceIndividual
-
getRdfsLabel
public String getRdfsLabel()
Description copied from interface:IndividualReturns an rdfs:label if there is one on the individual. Returns null if none can be found. If more than one rdfs:label can be found for the individual one of the labels will be returned, which one is undefined.- Specified by:
getRdfsLabelin interfaceIndividual
-
setRdfsLabel
public void setRdfsLabel(String s)
- Specified by:
setRdfsLabelin interfaceIndividual
-
getVClassURI
public String getVClassURI()
- Specified by:
getVClassURIin interfaceIndividual
-
setVClassURI
public void setVClassURI(String in)
- Specified by:
setVClassURIin interfaceIndividual
-
getModTime
public Timestamp getModTime()
Returns the last time this object was changed in the model. Notice Java API craziness: Timestamp is a subclass of Date but there are notes in the Javadoc that you should not pretend that a Timestamp is a Date. (Crazy ya?) In particular, Timestamp.equals(Date) will never return true because of the 'nanos.'- Specified by:
getModTimein interfaceIndividual
-
setModTime
public void setModTime(Timestamp in)
- Specified by:
setModTimein interfaceIndividual
-
getObjectPropertyList
public List<ObjectProperty> getObjectPropertyList()
- Specified by:
getObjectPropertyListin interfaceIndividual
-
setPropertyList
public void setPropertyList(List<ObjectProperty> propertyList)
- Specified by:
setPropertyListin interfaceIndividual
-
getPopulatedObjectPropertyList
public List<ObjectProperty> getPopulatedObjectPropertyList()
Description copied from interface:IndividualReturns a list of ObjectProperty objects for which statements exist about the individual. Note that this method now returns multiple copies of a given predicate, with the rangeVClassURI changed to indicate the distinct types of the related objects. This supports finding the approriate list views for the "faux" qualified properties.- Specified by:
getPopulatedObjectPropertyListin interfaceIndividual
-
setPopulatedObjectPropertyList
public void setPopulatedObjectPropertyList(List<ObjectProperty> propertyList)
- Specified by:
setPopulatedObjectPropertyListin interfaceIndividual
-
getObjectPropertyMap
public Map<String,ObjectProperty> getObjectPropertyMap()
- Specified by:
getObjectPropertyMapin interfaceIndividual
-
setObjectPropertyMap
public void setObjectPropertyMap(Map<String,ObjectProperty> propertyMap)
- Specified by:
setObjectPropertyMapin interfaceIndividual
-
getDataPropertyList
public List<DataProperty> getDataPropertyList()
- Specified by:
getDataPropertyListin interfaceIndividual
-
setDatatypePropertyList
public void setDatatypePropertyList(List<DataProperty> datatypePropertyList)
- Specified by:
setDatatypePropertyListin interfaceIndividual
-
getPopulatedDataPropertyList
public List<DataProperty> getPopulatedDataPropertyList()
- Specified by:
getPopulatedDataPropertyListin interfaceIndividual
-
setPopulatedDataPropertyList
public void setPopulatedDataPropertyList(List<DataProperty> propertyList)
- Specified by:
setPopulatedDataPropertyListin interfaceIndividual
-
getDataPropertyMap
public Map<String,DataProperty> getDataPropertyMap()
- Specified by:
getDataPropertyMapin interfaceIndividual
-
setDataPropertyMap
public void setDataPropertyMap(Map<String,DataProperty> propertyMap)
- Specified by:
setDataPropertyMapin interfaceIndividual
-
setDataPropertyStatements
public void setDataPropertyStatements(List<DataPropertyStatement> list)
- Specified by:
setDataPropertyStatementsin interfaceIndividual
-
getDataPropertyStatements
public List<DataPropertyStatement> getDataPropertyStatements()
- Specified by:
getDataPropertyStatementsin interfaceIndividual
-
getDataPropertyStatements
public List<DataPropertyStatement> getDataPropertyStatements(String propertyUri)
- Specified by:
getDataPropertyStatementsin interfaceIndividual
-
getDataPropertyStatement
public DataPropertyStatement getDataPropertyStatement(String propertyUri)
- Specified by:
getDataPropertyStatementin interfaceIndividual
-
getDataValues
public List<String> getDataValues(String propertyUri)
- Specified by:
getDataValuesin interfaceIndividual
-
getDataValue
public String getDataValue(String propertyUri)
- Specified by:
getDataValuein interfaceIndividual
-
getVClass
public VClass getVClass()
- Specified by:
getVClassin interfaceIndividual
-
setVClass
public void setVClass(VClass class1)
- Specified by:
setVClassin interfaceIndividual
-
getVClasses
public List<VClass> getVClasses()
- Specified by:
getVClassesin interfaceIndividual
-
isVClass
public boolean isVClass(String uri)
Description copied from interface:IndividualDoes the individual belong to this class?- Specified by:
isVClassin interfaceIndividual
-
getVClasses
public List<VClass> getVClasses(boolean direct)
- Specified by:
getVClassesin interfaceIndividual
-
setVClasses
public void setVClasses(List<VClass> vClassList, boolean direct)
- Specified by:
setVClassesin interfaceIndividual
-
getMostSpecificTypeURIs
public List<String> getMostSpecificTypeURIs()
- Specified by:
getMostSpecificTypeURIsin interfaceIndividual
-
setObjectPropertyStatements
public void setObjectPropertyStatements(List<ObjectPropertyStatement> list)
- Specified by:
setObjectPropertyStatementsin interfaceIndividual
-
getObjectPropertyStatements
public List<ObjectPropertyStatement> getObjectPropertyStatements()
- Specified by:
getObjectPropertyStatementsin interfaceIndividual
-
getObjectPropertyStatements
public List<ObjectPropertyStatement> getObjectPropertyStatements(String propertyUri)
- Specified by:
getObjectPropertyStatementsin interfaceIndividual
-
getRelatedIndividuals
public List<Individual> getRelatedIndividuals(String propertyUri)
- Specified by:
getRelatedIndividualsin interfaceIndividual
-
getRelatedIndividual
public Individual getRelatedIndividual(String propertyUri)
- Specified by:
getRelatedIndividualin interfaceIndividual
-
getExternalIds
public List<DataPropertyStatement> getExternalIds()
- Specified by:
getExternalIdsin interfaceIndividual
-
setExternalIds
public void setExternalIds(List<DataPropertyStatement> externalIds)
- Specified by:
setExternalIdsin interfaceIndividual
-
getMainImageUri
public String getMainImageUri()
- Specified by:
getMainImageUriin interfaceIndividual
-
setMainImageUri
public void setMainImageUri(String mainImageUri)
- Specified by:
setMainImageUriin interfaceIndividual
-
getImageUrl
public String getImageUrl()
- Specified by:
getImageUrlin interfaceIndividual
-
getThumbUrl
public String getThumbUrl()
- Specified by:
getThumbUrlin interfaceIndividual
-
getSearchBoost
public Float getSearchBoost()
- Specified by:
getSearchBoostin interfaceIndividual
-
setSearchBoost
public void setSearchBoost(Float boost)
- Specified by:
setSearchBoostin interfaceIndividual
-
getSearchSnippet
public String getSearchSnippet()
- Specified by:
getSearchSnippetin interfaceIndividual
-
setSearchSnippet
public void setSearchSnippet(String snippet)
- Specified by:
setSearchSnippetin interfaceIndividual
-
sortForDisplay
public void sortForDisplay()
Sorts the ents2ents records into the proper order for display.- Specified by:
sortForDisplayin interfaceIndividual
-
sortEnts2EntsForDisplay
protected void sortEnts2EntsForDisplay()
-
sortPropertiesForDisplay
protected void sortPropertiesForDisplay()
-
toJSON
public com.fasterxml.jackson.databind.JsonNode toJSON()
- Specified by:
toJSONin interfaceIndividual
-
compareTo
public int compareTo(Individual o2)
- Specified by:
compareToin interfaceComparable<Individual>
-
hasThumb
public boolean hasThumb()
- Specified by:
hasThumbin interfaceIndividual
-
resolveAsFauxPropertyStatements
public void resolveAsFauxPropertyStatements(List<ObjectPropertyStatement> list)
Description copied from interface:IndividualThis is crap. It was put in so IndividualFiltering could filter object properties properly, but what we really need is either: filters have a reference to a webappDaoFactory, or all ObjectPropertyStatements are resolved when they are created. See VIVO-946 and VIVO-984.- Specified by:
resolveAsFauxPropertyStatementsin interfaceIndividual- Parameters:
list- Object property statements
-
-