public class FedoraResourceImpl extends org.modeshape.jcr.api.JcrTools implements FedoraJcrTypes, FedoraResource
org.modeshape.jcr.api.JcrTools.BasicOperation, org.modeshape.jcr.api.JcrTools.BrowseContent, org.modeshape.jcr.api.JcrTools.CountNodes, org.modeshape.jcr.api.JcrTools.NodeOperation, org.modeshape.jcr.api.JcrTools.Operation, org.modeshape.jcr.api.JcrTools.PrintNodes, org.modeshape.jcr.api.JcrTools.Variable| Modifier and Type | Field and Description |
|---|---|
protected javax.jcr.Node |
node |
CONTENT_DIGEST, CONTENT_SIZE, EXPOSED_PROTECTED_JCR_TYPES, FCR_METADATA, FCR_VERSIONS, FEDORA_BINARY, FEDORA_BLANKNODE, FEDORA_CONTAINER, FEDORA_NON_RDF_SOURCE_DESCRIPTION, FEDORA_PAIRTREE, FEDORA_RESOURCE, FEDORA_TOMBSTONE, FROZEN_MIXIN_TYPES, FROZEN_NODE, JCR_CREATED, JCR_CREATEDBY, JCR_FROZEN_NODE, JCR_LASTMODIFIED, JCR_MIXIN_TYPES, JCR_PRIMARY_TYPE, JCR_UUID, LDP_BASIC_CONTAINER, LDP_DIRECT_CONTAINER, LDP_HAS_MEMBER_RELATION, LDP_INDIRECT_CONTAINER, LDP_INSERTED_CONTENT_RELATION, LDP_IS_MEMBER_OF_RELATION, LDP_MEMBER_RESOURCE, PREMIS_FILE_NAME, ROOT, VERSIONABLE| Constructor and Description |
|---|
FedoraResourceImpl(javax.jcr.Node node)
Construct a FedoraObject from an existing JCR Node
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVersionLabel(String label)
Tag the current version of the Node with a version label that
can be retrieved by name later.
|
void |
delete()
Delete this resource, and any inbound references to it
|
void |
disableVersioning()
Disable versioning
|
void |
enableVersioning()
Enable versioning
|
boolean |
equals(Object object) |
javax.jcr.version.Version |
getBaseVersion()
Get the JCR Base version for the node
|
FedoraResource |
getChild(String relPath)
Get the child of this resource at the given path
|
Iterator<FedoraResource> |
getChildren()
Get the children of this resource
|
FedoraResource |
getContainer()
Get the container of this resource
|
Date |
getCreatedDate()
Get the date this datastream was created
|
String |
getEtagValue()
Construct an ETag value from the last modified date and path.
|
Date |
getLastModifiedDate()
Get the date this datastream was last modified
|
javax.jcr.Node |
getNode() |
javax.jcr.Node |
getNodeVersion(String label)
Get the node for this object at the version provided.
|
String |
getPath()
Get the path to the JCR node
|
javax.jcr.Property |
getProperty(String relPath)
Retrieve the given property value for this resource
|
protected javax.jcr.Session |
getSession() |
RdfStream |
getTriples(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator,
Class<? extends RdfStream> context)
Return the RDF properties of this object using the provided context
|
RdfStream |
getTriples(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator,
Iterable<? extends Class<? extends RdfStream>> contexts)
Return the RDF properties of this object using the provided contexts
|
FedoraResource |
getUnfrozenResource()
Get the unfrozen equivalent of a frozen versioned node
|
FedoraResource |
getVersionedAncestor()
When this is a frozen node, get the ancestor that was explicitly versioned
|
javax.jcr.version.VersionHistory |
getVersionHistory()
Get JCR VersionHistory for the node.
|
int |
hashCode() |
boolean |
hasProperty(String relPath)
Does this resource have a property
|
boolean |
hasType(String type)
Check if this object uses a given mixin
|
boolean |
isFrozenResource()
Check if a resource is frozen (a historic version).
|
Boolean |
isNew()
Check if a resource was created in this session
|
boolean |
isVersioned()
Check if a resource is versioned
|
void |
replaceProperties(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator,
com.hp.hpl.jena.rdf.model.Model inputModel,
RdfStream originalTriples)
Replace the properties of this object with the properties from the given
model
|
String |
toString() |
void |
updateProperties(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator,
String sparqlUpdateStatement,
RdfStream originalTriples)
Update the provided properties with a SPARQL Update query.
|
findOrCreateChild, findOrCreateChild, findOrCreateNode, findOrCreateNode, findOrCreateNode, findOrCreateNode, getNode, getReadable, getStringValue, importContent, importContent, importContent, importContent, importContent, importContent, importContent, isDebug, onEachNode, onEachNodeBelow, print, printNode, printQuery, printQuery, printQuery, printQuery, printSubgraph, printSubgraph, printSubgraph, registerNodeTypes, removeAllChildren, removeAllChildren, repeatedlyWithSession, resourceUrl, setDebug, uploadFile, uploadFile, uploadFile, uploadFileAndBlock, uploadFileAndBlock, uploadFileAndBlock, uploadFilesAndBlock, var, vars, withSessionprotected javax.jcr.Node node
public FedoraResourceImpl(javax.jcr.Node node)
node - an existing JCR node to treat as an fcrepo objectpublic javax.jcr.Node getNode()
getNode in interface FedoraResourcepublic String getPath()
FedoraResourcegetPath in interface FedoraResourcepublic Iterator<FedoraResource> getChildren()
FedoraResourcegetChildren in interface FedoraResourcepublic FedoraResource getContainer()
FedoraResourcegetContainer in interface FedoraResourcepublic FedoraResource getChild(String relPath)
FedoraResourcegetChild in interface FedoraResourcepublic boolean hasProperty(String relPath)
FedoraResourcehasProperty in interface FedoraResourcepublic javax.jcr.Property getProperty(String relPath)
FedoraResourcegetProperty in interface FedoraResourcepublic void delete()
FedoraResourcedelete in interface FedoraResourcepublic Date getCreatedDate()
FedoraResourcegetCreatedDate in interface FedoraResourcepublic Date getLastModifiedDate()
FedoraResourcegetLastModifiedDate in interface FedoraResourcepublic boolean hasType(String type)
FedoraResourcehasType in interface FedoraResourcepublic void updateProperties(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator, String sparqlUpdateStatement, RdfStream originalTriples) throws MalformedRdfException
FedoraResourceupdateProperties in interface FedoraResourceMalformedRdfExceptionpublic RdfStream getTriples(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator, Class<? extends RdfStream> context)
FedoraResourcegetTriples in interface FedoraResourcepublic RdfStream getTriples(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator, Iterable<? extends Class<? extends RdfStream>> contexts)
FedoraResourcegetTriples in interface FedoraResourcepublic void addVersionLabel(String label)
FedoraResourceaddVersionLabel in interface FedoraResourcepublic javax.jcr.version.Version getBaseVersion()
FedoraResourcegetBaseVersion in interface FedoraResourcepublic javax.jcr.version.VersionHistory getVersionHistory()
FedoraResourcegetVersionHistory in interface FedoraResourcepublic Boolean isNew()
FedoraResourceisNew in interface FedoraResourcepublic void replaceProperties(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator, com.hp.hpl.jena.rdf.model.Model inputModel, RdfStream originalTriples) throws MalformedRdfException
FedoraResourcereplaceProperties in interface FedoraResourceMalformedRdfExceptionpublic String getEtagValue()
FedoraResourcegetEtagValue in interface FedoraResourcepublic void enableVersioning()
FedoraResourceenableVersioning in interface FedoraResourcepublic void disableVersioning()
FedoraResourcedisableVersioning in interface FedoraResourcepublic boolean isVersioned()
FedoraResourceisVersioned in interface FedoraResourcepublic boolean isFrozenResource()
FedoraResourceisFrozenResource in interface FedoraResourcepublic FedoraResource getVersionedAncestor()
FedoraResourcegetVersionedAncestor in interface FedoraResourcepublic FedoraResource getUnfrozenResource()
FedoraResourcegetUnfrozenResource in interface FedoraResourcepublic javax.jcr.Node getNodeVersion(String label)
FedoraResourcegetNodeVersion in interface FedoraResourceprotected javax.jcr.Session getSession()
Copyright © 2013-2014 DuraSpace, Inc.. All Rights Reserved.