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.Operation, org.modeshape.jcr.api.JcrTools.PrintNodes, org.modeshape.jcr.api.JcrTools.Variable| Modifier and Type | Field and Description |
|---|---|
static GraphSubjects |
DEFAULT_SUBJECT_FACTORY |
protected javax.jcr.Node |
node |
CONTENT_DIGEST, CONTENT_SIZE, FCR_CONTENT, FEDORA_BINARY, FEDORA_DATASTREAM, FEDORA_OBJECT, FEDORA_RESOURCE, JCR_CREATED, JCR_CREATEDBY, JCR_LASTMODIFIED, 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
|
org.modeshape.common.collection.Problems |
getDatasetProblems()
After applying a SPARQL Update to the properties dataset, this may
contain Problems with applying the update.
|
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()
Serialize the JCR properties of this object as an RDF Dataset
|
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()
Serialize the JCR versions information as an RDF dataset
|
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
|
void |
updatePropertiesDataset(GraphSubjects subjects,
String sparqlUpdateStatement)
Update the properties Dataset with a SPARQL Update query.
|
void |
updatePropertiesDataset(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 static final GraphSubjects DEFAULT_SUBJECT_FACTORY
protected javax.jcr.Node node
public 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 org.modeshape.common.collection.Problems getDatasetProblems()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void updatePropertiesDataset(GraphSubjects subjects, String sparqlUpdateStatement) throws javax.jcr.RepositoryException
subjects - sparqlUpdateStatement - javax.jcr.RepositoryExceptionpublic void updatePropertiesDataset(String sparqlUpdateStatement) throws javax.jcr.RepositoryException
sparqlUpdateStatement - javax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getPropertiesDataset(GraphSubjects subjects, long offset, int limit) throws javax.jcr.RepositoryException
subjects - offset - limit - @returnjavax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getPropertiesDataset(GraphSubjects subjects) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getPropertiesDataset()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getVersionDataset(GraphSubjects subjects) throws javax.jcr.RepositoryException
subjects - javax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getVersionDataset()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void addVersionLabel(String label) throws javax.jcr.RepositoryException
label - javax.jcr.RepositoryExceptionpublic boolean isNew()
Copyright © 2013 DuraSpace, Inc.. All Rights Reserved.