Package org.fcrepo.kernel.impl.models
Class TimeMapImpl
- java.lang.Object
-
- org.fcrepo.kernel.impl.models.FedoraResourceImpl
-
- org.fcrepo.kernel.impl.models.TimeMapImpl
-
- All Implemented Interfaces:
FedoraResource
,TimeMap
public class TimeMapImpl extends FedoraResourceImpl implements TimeMap
FedoraResource implementation that represents a Memento TimeMap of the base resource.- Author:
- pwinckles
-
-
Field Summary
-
Fields inherited from class org.fcrepo.kernel.impl.models.FedoraResourceImpl
fedoraId, resourceFactory, transaction
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TimeMapImpl(FedoraResource originalResource, Transaction transaction, PersistentStorageSessionManager pSessionManager, ResourceFactory resourceFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<FedoraResource>
getChildren(Boolean recursive)
Get the children of this resource, possibly recursivelyString
getInteractionModel()
Get the resource's interaction model.FedoraResource
getOriginalResource()
Get the Original Resource for which this resource is a memento or timemap for.List<URI>
getSystemTypes(boolean forRdf)
Get only the system defined types from their RDF.TimeMap
getTimeMap()
Get the TimeMap/LDPCv of this resourceRdfStream
getTriples()
Return the RDF properties for this resource.List<URI>
getUserTypes()
Get only the user provided types from their RDF.boolean
isOriginalResource()
Check if a resource is an original resource (ie versionable, as opposed to non-versionable resources like mementos, timemaps, and acls).List<Instant>
listMementoDatetimes()
List all of the memento datetimes for the resource-
Methods inherited from class org.fcrepo.kernel.impl.models.FedoraResourceImpl
findMementoByDatetime, getAcl, getArchivalGroupId, getContainer, getCreatedBy, getCreatedDate, getDescribedResource, getDescription, getEtagValue, getFedoraId, getId, getLastModifiedBy, getLastModifiedDate, getMementoDatetime, getParent, getParentId, getSession, getStateToken, getTypes, hasProperty, hasType, isAcl, isMemento, resolveSystemTypes, setArchivalGroupId, setCreatedBy, setCreatedDate, setEtag, setInteractionModel, setIsArchivalGroup, setIsMemento, setLastModifiedBy, setLastModifiedDate, setMementoDatetime, setParentId, setStateToken, setTypes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fcrepo.kernel.api.models.FedoraResource
findMementoByDatetime, getAcl, getArchivalGroupId, getChildren, getContainer, getCreatedBy, getCreatedDate, getDescribedResource, getDescription, getEtagValue, getFedoraId, getId, getLastModifiedBy, getLastModifiedDate, getMementoDatetime, getParent, getParentId, getStateToken, getTypes, hasProperty, hasType, isAcl, isMemento
-
-
-
-
Constructor Detail
-
TimeMapImpl
protected TimeMapImpl(FedoraResource originalResource, Transaction transaction, PersistentStorageSessionManager pSessionManager, ResourceFactory resourceFactory)
-
-
Method Detail
-
getTriples
public RdfStream getTriples()
Description copied from interface:FedoraResource
Return the RDF properties for this resource.- Specified by:
getTriples
in interfaceFedoraResource
- Overrides:
getTriples
in classFedoraResourceImpl
- Returns:
- the RDF properties of this object.
-
getSystemTypes
public List<URI> getSystemTypes(boolean forRdf)
Description copied from interface:FedoraResource
Get only the system defined types from their RDF.- Specified by:
getSystemTypes
in interfaceFedoraResource
- Overrides:
getSystemTypes
in classFedoraResourceImpl
- Parameters:
forRdf
- whether we only want types for displaying in a RDF body.- Returns:
- a list of types from the user provided RDF.
-
getUserTypes
public List<URI> getUserTypes()
Description copied from interface:FedoraResource
Get only the user provided types from their RDF.- Specified by:
getUserTypes
in interfaceFedoraResource
- Overrides:
getUserTypes
in classFedoraResourceImpl
- Returns:
- a list of types from the user provided RDF.
-
getChildren
public Stream<FedoraResource> getChildren(Boolean recursive)
Description copied from interface:FedoraResource
Get the children of this resource, possibly recursively- Specified by:
getChildren
in interfaceFedoraResource
- Overrides:
getChildren
in classFedoraResourceImpl
- Parameters:
recursive
- whether to recursively fetch child resources- Returns:
- a stream of Fedora resources
-
getOriginalResource
public FedoraResource getOriginalResource()
Description copied from interface:FedoraResource
Get the Original Resource for which this resource is a memento or timemap for. If this resource is not a memento or timemap, then it is the original.- Specified by:
getOriginalResource
in interfaceFedoraResource
- Overrides:
getOriginalResource
in classFedoraResourceImpl
- Returns:
- the original resource for this
-
isOriginalResource
public boolean isOriginalResource()
Description copied from interface:FedoraResource
Check if a resource is an original resource (ie versionable, as opposed to non-versionable resources like mementos, timemaps, and acls).- Specified by:
isOriginalResource
in interfaceFedoraResource
- Overrides:
isOriginalResource
in classFedoraResourceImpl
- Returns:
- whether the resource is an original resource.
-
getTimeMap
public TimeMap getTimeMap()
Description copied from interface:FedoraResource
Get the TimeMap/LDPCv of this resource- Specified by:
getTimeMap
in interfaceFedoraResource
- Overrides:
getTimeMap
in classFedoraResourceImpl
- Returns:
- the container for TimeMap/LDPCv of this resource
-
listMementoDatetimes
public List<Instant> listMementoDatetimes()
Description copied from interface:TimeMap
List all of the memento datetimes for the resource- Specified by:
listMementoDatetimes
in interfaceTimeMap
- Returns:
- list of memento datetimes, in ascending chronologic order
-
getInteractionModel
public String getInteractionModel()
Description copied from interface:FedoraResource
Get the resource's interaction model.- Specified by:
getInteractionModel
in interfaceFedoraResource
- Overrides:
getInteractionModel
in classFedoraResourceImpl
- Returns:
- the interaction model.
-
-