public class FedoraResource
extends org.modeshape.jcr.api.JcrTools
implements org.fcrepo.jcr.FedoraJcrTypes
org.modeshape.jcr.api.JcrTools.BasicOperation, org.modeshape.jcr.api.JcrTools.BrowseContent, org.modeshape.jcr.api.JcrTools.CountNodes, 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 |
| 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.
|
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)
Serialize the JCR properties of this object as an RDF Dataset
|
com.hp.hpl.jena.query.Dataset |
getPropertiesDataset(GraphSubjects subjects,
long offset,
int limit)
Serialize the JCR properties as an RDF Dataset
|
long |
getSize()
Get the total size of this object and its datastreams
|
com.hp.hpl.jena.query.Dataset |
getVersionDataset(GraphSubjects subjects)
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)?
|
boolean |
isNew()
Check if a resource was created in this session
|
com.hp.hpl.jena.query.Dataset |
replacePropertiesDataset(GraphSubjects subjects,
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, 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 hasMixin(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - javax.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 subjects, long offset, int limit) throws javax.jcr.RepositoryException
subjects - offset - limit - javax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getPropertiesDataset(GraphSubjects subjects) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getVersionDataset(GraphSubjects subjects) throws javax.jcr.RepositoryException
subjects - javax.jcr.RepositoryExceptionpublic void addVersionLabel(String label) throws javax.jcr.RepositoryException
label - javax.jcr.RepositoryExceptionpublic boolean isNew()
public com.hp.hpl.jena.query.Dataset replacePropertiesDataset(GraphSubjects subjects, com.hp.hpl.jena.rdf.model.Model inputModel) throws javax.jcr.RepositoryException
subjects - inputModel - javax.jcr.RepositoryExceptionpublic String getEtagValue() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2013 DuraSpace, Inc.. All rights reserved.