Package org.fcrepo.kernel.impl.models
Class FedoraResourceImpl
- java.lang.Object
-
- org.fcrepo.kernel.impl.models.FedoraResourceImpl
-
- All Implemented Interfaces:
org.fcrepo.kernel.api.models.FedoraResource
- Direct Known Subclasses:
BinaryImpl,ContainerImpl,NonRdfSourceDescriptionImpl,TimeMapImpl,TombstoneImpl
public class FedoraResourceImpl extends Object implements org.fcrepo.kernel.api.models.FedoraResource
Implementation of a Fedora resource, containing functionality common to the more concrete resource implementations.- Author:
- bbpennel
-
-
Field Summary
Fields Modifier and Type Field Description protected org.fcrepo.kernel.api.identifiers.FedoraIdfedoraIdprotected org.fcrepo.kernel.api.models.ResourceFactoryresourceFactoryprotected org.fcrepo.kernel.api.Transactiontransaction
-
Constructor Summary
Constructors Modifier Constructor Description protectedFedoraResourceImpl(org.fcrepo.kernel.api.identifiers.FedoraId fedoraId, org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.persistence.api.PersistentStorageSessionManager pSessionManager, org.fcrepo.kernel.api.models.ResourceFactory resourceFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.fcrepo.kernel.api.models.FedoraResourcefindMementoByDatetime(Instant mementoDatetime)org.fcrepo.kernel.api.models.FedoraResourcegetAcl()Stream<org.fcrepo.kernel.api.models.FedoraResource>getChildren(Boolean recursive)org.fcrepo.kernel.api.models.FedoraResourcegetContainer()StringgetCreatedBy()InstantgetCreatedDate()org.fcrepo.kernel.api.models.FedoraResourcegetDescribedResource()org.fcrepo.kernel.api.models.FedoraResourcegetDescription()StringgetEtagValue()org.fcrepo.kernel.api.identifiers.FedoraIdgetFedoraId()StringgetId()StringgetInteractionModel()StringgetLastModifiedBy()InstantgetLastModifiedDate()InstantgetMementoDatetime()org.fcrepo.kernel.api.models.FedoraResourcegetOriginalResource()org.fcrepo.kernel.api.models.FedoraResourcegetParent()protected org.fcrepo.persistence.api.PersistentStorageSessiongetSession()StringgetStateToken()List<URI>getSystemTypes(boolean forRdf)org.fcrepo.kernel.api.models.TimeMapgetTimeMap()org.fcrepo.kernel.api.RdfStreamgetTriples()List<URI>getTypes()List<URI>getUserTypes()booleanhasProperty(String relPath)booleanhasType(String type)booleanisAcl()booleanisMemento()booleanisOriginalResource()protected List<URI>resolveSystemTypes(boolean forRdf)protected voidsetCreatedBy(String createdBy)protected voidsetCreatedDate(Instant createdDate)protected voidsetEtag(String etag)voidsetInteractionModel(String interactionModel)voidsetIsArchivalGroup(boolean isArchivalGroup)voidsetIsMemento(boolean isMemento)protected voidsetLastModifiedBy(String lastModifiedBy)protected voidsetLastModifiedDate(Instant lastModifiedDate)protected voidsetMementoDatetime(Instant mementoDatetime)protected voidsetParentId(org.fcrepo.kernel.api.identifiers.FedoraId parentId)protected voidsetStateToken(String stateToken)protected voidsetTypes(List<URI> types)
-
-
-
Field Detail
-
resourceFactory
protected final org.fcrepo.kernel.api.models.ResourceFactory resourceFactory
-
fedoraId
protected final org.fcrepo.kernel.api.identifiers.FedoraId fedoraId
-
transaction
protected final org.fcrepo.kernel.api.Transaction transaction
-
-
Constructor Detail
-
FedoraResourceImpl
protected FedoraResourceImpl(org.fcrepo.kernel.api.identifiers.FedoraId fedoraId, org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.persistence.api.PersistentStorageSessionManager pSessionManager, org.fcrepo.kernel.api.models.ResourceFactory resourceFactory)
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getChildren
public Stream<org.fcrepo.kernel.api.models.FedoraResource> getChildren(Boolean recursive)
- Specified by:
getChildrenin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getContainer
public org.fcrepo.kernel.api.models.FedoraResource getContainer()
- Specified by:
getContainerin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getOriginalResource
public org.fcrepo.kernel.api.models.FedoraResource getOriginalResource()
- Specified by:
getOriginalResourcein interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getTimeMap
public org.fcrepo.kernel.api.models.TimeMap getTimeMap()
- Specified by:
getTimeMapin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getMementoDatetime
public Instant getMementoDatetime()
- Specified by:
getMementoDatetimein interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
isMemento
public boolean isMemento()
- Specified by:
isMementoin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
isAcl
public boolean isAcl()
- Specified by:
isAclin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
findMementoByDatetime
public org.fcrepo.kernel.api.models.FedoraResource findMementoByDatetime(Instant mementoDatetime)
- Specified by:
findMementoByDatetimein interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getAcl
public org.fcrepo.kernel.api.models.FedoraResource getAcl()
- Specified by:
getAclin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
hasProperty
public boolean hasProperty(String relPath)
- Specified by:
hasPropertyin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getCreatedDate
public Instant getCreatedDate()
- Specified by:
getCreatedDatein interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getLastModifiedDate
public Instant getLastModifiedDate()
- Specified by:
getLastModifiedDatein interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
hasType
public boolean hasType(String type)
- Specified by:
hasTypein interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getTypes
public List<URI> getTypes()
- Specified by:
getTypesin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getSystemTypes
public List<URI> getSystemTypes(boolean forRdf)
- Specified by:
getSystemTypesin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getUserTypes
public List<URI> getUserTypes()
- Specified by:
getUserTypesin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getTriples
public org.fcrepo.kernel.api.RdfStream getTriples()
- Specified by:
getTriplesin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getEtagValue
public String getEtagValue()
- Specified by:
getEtagValuein interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getStateToken
public String getStateToken()
- Specified by:
getStateTokenin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
isOriginalResource
public boolean isOriginalResource()
- Specified by:
isOriginalResourcein interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getDescription
public org.fcrepo.kernel.api.models.FedoraResource getDescription()
- Specified by:
getDescriptionin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getDescribedResource
public org.fcrepo.kernel.api.models.FedoraResource getDescribedResource()
- Specified by:
getDescribedResourcein interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getSession
protected org.fcrepo.persistence.api.PersistentStorageSession getSession()
-
getParent
public org.fcrepo.kernel.api.models.FedoraResource getParent() throws org.fcrepo.kernel.api.exception.PathNotFoundException
- Specified by:
getParentin interfaceorg.fcrepo.kernel.api.models.FedoraResource- Throws:
org.fcrepo.kernel.api.exception.PathNotFoundException
-
getCreatedBy
public String getCreatedBy()
- Specified by:
getCreatedByin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getLastModifiedBy
public String getLastModifiedBy()
- Specified by:
getLastModifiedByin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getFedoraId
public org.fcrepo.kernel.api.identifiers.FedoraId getFedoraId()
- Specified by:
getFedoraIdin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
getInteractionModel
public String getInteractionModel()
- Specified by:
getInteractionModelin interfaceorg.fcrepo.kernel.api.models.FedoraResource
-
setParentId
protected void setParentId(org.fcrepo.kernel.api.identifiers.FedoraId parentId)
- Parameters:
parentId- the parentId to set
-
setLastModifiedDate
protected void setLastModifiedDate(Instant lastModifiedDate)
- Parameters:
lastModifiedDate- the lastModifiedDate to set
-
setLastModifiedBy
protected void setLastModifiedBy(String lastModifiedBy)
- Parameters:
lastModifiedBy- the lastModifiedBy to set
-
setCreatedDate
protected void setCreatedDate(Instant createdDate)
- Parameters:
createdDate- the createdDate to set
-
setCreatedBy
protected void setCreatedBy(String createdBy)
- Parameters:
createdBy- the createdBy to set
-
setMementoDatetime
protected void setMementoDatetime(Instant mementoDatetime)
- Parameters:
mementoDatetime- the mementoDatetime to set
-
setStateToken
protected void setStateToken(String stateToken)
- Parameters:
stateToken- the stateToken to set
-
setIsMemento
public void setIsMemento(boolean isMemento)
- Parameters:
isMemento- indicates if the resource is a memento
-
setIsArchivalGroup
public void setIsArchivalGroup(boolean isArchivalGroup)
- Parameters:
isArchivalGroup- true if the resource is an AG
-
setInteractionModel
public void setInteractionModel(String interactionModel)
- Parameters:
interactionModel- the resource's interaction model
-
resolveSystemTypes
protected List<URI> resolveSystemTypes(boolean forRdf)
-
-