public abstract class FedoraTypesUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.base.Function<javax.jcr.Property,com.hp.hpl.jena.rdf.model.Property> |
getPredicateForProperty
Map a JCR property to an RDF property with the right namespace URI and
local name
|
static com.google.common.base.Function<javax.jcr.Node,javax.jcr.ValueFactory> |
getValueFactory
Retrieves a JCR
ValueFactory for use with a |
static com.google.common.base.Predicate<javax.jcr.Node> |
isFedoraDatastream
Predicate for determining whether this
Node is a Fedora
datastream. |
static com.google.common.base.Predicate<javax.jcr.Node> |
isFedoraObject
Predicate for determining whether this
Node is a Fedora object. |
static com.google.common.base.Predicate<javax.jcr.Node> |
isFedoraResource
Predicate for determining whether this
Node is a Fedora object. |
static com.google.common.base.Predicate<javax.jcr.Node> |
isInternalNode
Check if a node is "internal" and should not be exposed e.g.
|
static com.google.common.base.Predicate<javax.jcr.Property> |
isMultipleValuedProperty
Check if a JCR property is a multivalued property or not
|
static com.google.common.base.Function<javax.jcr.nodetype.NodeType,String> |
nodetype2name
Translates a
NodeType to its String name. |
static com.google.common.base.Function<javax.jcr.Value,String> |
value2string
Translates a JCR
Value to its String expression. |
| Constructor and Description |
|---|
FedoraTypesUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
convertDateToXSDString(long date) |
static javax.jcr.version.Version |
getBaseVersion(javax.jcr.Node node)
Get the JCR Base version for a node
|
static javax.jcr.Binary |
getBinary(javax.jcr.Node n,
InputStream i)
Creates a JCR
Binary |
static javax.jcr.Binary |
getBinary(javax.jcr.Node n,
InputStream i,
String hint)
Creates a JCR
Binary |
static javax.jcr.nodetype.PropertyDefinition |
getDefinitionForPropertyName(javax.jcr.Node node,
String propertyName)
Get the property definition information (containing type and multi-value
information)
|
static javax.jcr.nodetype.NodeTypeManager |
getNodeTypeManager(javax.jcr.Node node)
Get the JCR Node Type manager
|
static long |
getRepositoryCount(javax.jcr.Repository repository) |
static long |
getRepositorySize(javax.jcr.Repository repository) |
static javax.jcr.version.VersionHistory |
getVersionHistory(javax.jcr.Node node)
Get the JCR VersionHistory for an existing node
|
static javax.jcr.version.VersionHistory |
getVersionHistory(javax.jcr.Session session,
String path)
Get the JCR VersionHistory for a node at a given JCR path
|
static <F,T> Collection<T> |
map(F[] input,
com.google.common.base.Function<F,T> f)
Convenience method for transforming arrays into
Collections through a mapping Function. |
public static com.google.common.base.Predicate<javax.jcr.Node> isFedoraResource
Node is a Fedora object.public static com.google.common.base.Predicate<javax.jcr.Node> isFedoraObject
Node is a Fedora object.public static com.google.common.base.Predicate<javax.jcr.Node> isFedoraDatastream
Node is a Fedora
datastream.public static com.google.common.base.Function<javax.jcr.nodetype.NodeType,String> nodetype2name
NodeType to its String name.public static com.google.common.base.Function<javax.jcr.Value,String> value2string
Value to its String expression.public static com.google.common.base.Predicate<javax.jcr.Property> isMultipleValuedProperty
public static com.google.common.base.Predicate<javax.jcr.Node> isInternalNode
public static com.google.common.base.Function<javax.jcr.Node,javax.jcr.ValueFactory> getValueFactory
ValueFactory for use with a public static com.google.common.base.Function<javax.jcr.Property,com.hp.hpl.jena.rdf.model.Property> getPredicateForProperty
public static javax.jcr.Binary getBinary(javax.jcr.Node n,
InputStream i)
Binaryn - a Nodei - an InputStreamBinarypublic static javax.jcr.Binary getBinary(javax.jcr.Node n,
InputStream i,
String hint)
Binaryn - a Nodei - an InputStreamBinarypublic static javax.jcr.nodetype.NodeTypeManager getNodeTypeManager(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - javax.jcr.RepositoryExceptionpublic static javax.jcr.nodetype.PropertyDefinition getDefinitionForPropertyName(javax.jcr.Node node,
String propertyName)
throws javax.jcr.RepositoryException
node - the node to use for inferring the property definitionpropertyName - the property name to retrieve a definition forjavax.jcr.RepositoryExceptionpublic static <F,T> Collection<T> map(F[] input, com.google.common.base.Function<F,T> f)
Collections through a mapping Function.input - A Collectionf - A Functionpublic static String convertDateToXSDString(long date)
date - Instance of java.util.Date.public static javax.jcr.version.Version getBaseVersion(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - javax.jcr.RepositoryExceptionpublic static javax.jcr.version.VersionHistory getVersionHistory(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - javax.jcr.RepositoryExceptionpublic static javax.jcr.version.VersionHistory getVersionHistory(javax.jcr.Session session,
String path)
throws javax.jcr.RepositoryException
session - path - javax.jcr.RepositoryExceptionpublic static long getRepositoryCount(javax.jcr.Repository repository)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static long getRepositorySize(javax.jcr.Repository repository)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2013 DuraSpace, Inc.. All Rights Reserved.