public class FedoraResource extends org.modeshape.jcr.api.JcrTools implements FedoraJcrTypes
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, FCR_CONTENT, FEDORA_BINARY, FEDORA_DATASTREAM, FEDORA_OBJECT, FEDORA_RESOURCE, FROZEN_MIXIN_TYPES, FROZEN_NODE, JCR_CREATED, JCR_CREATEDBY, JCR_LASTMODIFIED, PREMIS_FILE_NAME, ROOT| Constructor and Description |
|---|
FedoraResource()
Construct a FedoraObject without a backing JCR Node
|
FedoraResource(javax.jcr.Node node)
Construct a FedoraObject from an existing JCR Node
|
FedoraResource(javax.jcr.Session session,
String path,
String nodeType)
Create or find a FedoraObject at the given path
|
| 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.
|
Date |
getCreatedDate()
Get the date this datastream was created
|
String |
getEtagValue()
Construct an ETag value from the last modified date and path.
|
RdfStream |
getHierarchyTriples(GraphSubjects graphSubjects)
Return the JCR properties of this object as an
RdfStream |
Date |
getLastModifiedDate()
Get the date this datastream was last modified
|
Collection<String> |
getModels()
Get the mixins this object uses
|
javax.jcr.Node |
getNode() |
String |
getPath()
Get the path to the JCR node
|
com.hp.hpl.jena.query.Dataset |
getPropertiesDataset(GraphSubjects subjects)
Return the JCR properties of this object as a Jena
Dataset |
com.hp.hpl.jena.query.Dataset |
getPropertiesDataset(GraphSubjects graphSubjects,
int offset,
int limit)
Return the JCR properties of this object as a Jena
Dataset |
long |
getSize()
Get the total size of this object and its datastreams
|
RdfStream |
getTriples(GraphSubjects graphSubjects)
Return the JCR properties of this object as an
RdfStream |
RdfStream |
getVersionTriples(GraphSubjects graphSubjects)
Serialize the JCR versions information as an RDF dataset
|
boolean |
hasContent()
Does the resource have a jcr:content child node?
|
static boolean |
hasMixin(javax.jcr.Node node)
Is the given node a Fedora resource
(because it has a fedora:resource mixin)?
|
static boolean |
isFrozen(javax.jcr.Node node)
Is the given node a frozen node?
|
boolean |
isNew()
Check if a resource was created in this session
|
RdfStream |
replaceProperties(GraphSubjects graphSubjects,
com.hp.hpl.jena.rdf.model.Model inputModel)
Replace the properties of this object with the properties from the given
model
|
com.hp.hpl.jena.query.Dataset |
updatePropertiesDataset(GraphSubjects subjects,
String sparqlUpdateStatement)
Update the properties Dataset 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, uploadFile, uploadFile, uploadFile, uploadFileAndBlock, uploadFileAndBlock, uploadFileAndBlock, uploadFilesAndBlock, var, vars, withSessionpublic FedoraResource()
public FedoraResource(javax.jcr.Node node)
node - an existing JCR node to treat as an fcrepo objectpublic FedoraResource(javax.jcr.Session session,
String path,
String nodeType)
throws javax.jcr.RepositoryException
session - the JCR session to use to retrieve the objectpath - the absolute path to the objectjavax.jcr.RepositoryExceptionpublic static boolean isFrozen(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - Node to checkjavax.jcr.RepositoryExceptionpublic static boolean hasMixin(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - Node to checkjavax.jcr.RepositoryExceptionpublic boolean hasContent()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic javax.jcr.Node getNode()
public String getPath() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic Date getCreatedDate() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic Date getLastModifiedDate() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic long getSize()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic Collection<String> getModels() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset updatePropertiesDataset(GraphSubjects subjects, String sparqlUpdateStatement) throws javax.jcr.RepositoryException
subjects - sparqlUpdateStatement - javax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getPropertiesDataset(GraphSubjects graphSubjects, int offset, int limit) throws javax.jcr.RepositoryException
DatasetgraphSubjects - offset - limit - javax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getPropertiesDataset(GraphSubjects subjects) throws javax.jcr.RepositoryException
DatasetgraphSubjects - javax.jcr.RepositoryExceptionpublic RdfStream getTriples(GraphSubjects graphSubjects) throws javax.jcr.RepositoryException
RdfStreamgraphSubjects - javax.jcr.RepositoryExceptionpublic RdfStream getHierarchyTriples(GraphSubjects graphSubjects) throws javax.jcr.RepositoryException
RdfStreamgraphSubjects - javax.jcr.RepositoryExceptionpublic RdfStream getVersionTriples(GraphSubjects graphSubjects) throws javax.jcr.RepositoryException
subjects - javax.jcr.RepositoryExceptionpublic void addVersionLabel(String label) throws javax.jcr.RepositoryException
label - javax.jcr.RepositoryExceptionpublic boolean isNew()
public RdfStream replaceProperties(GraphSubjects graphSubjects, com.hp.hpl.jena.rdf.model.Model inputModel) throws javax.jcr.RepositoryException
graphSubjects - inputModel - javax.jcr.RepositoryExceptionpublic String getEtagValue() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2013 DuraSpace, Inc.. All Rights Reserved.