public abstract class FedoraTypesUtils extends Object implements org.fcrepo.jcr.FedoraJcrTypes
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.base.Predicate<javax.jcr.Property> |
isBinaryContentProperty
Check if a JCR property is a binary jcr:data property
|
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> |
isFedoraObjectOrDatastream
Predicate for objects, datastreams, whatever!
|
static com.google.common.base.Predicate<javax.jcr.Node> |
isFedoraResource
Predicate for determining whether this
Node is a Fedora resource. |
static com.google.common.base.Predicate<javax.jcr.Node> |
isFrozen
Predicate for determining whether this
Node is a frozen node
(a part of the system version history). |
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.Predicate<javax.jcr.Node> |
isOrWasFedoraResource
Predicate for determining whether this
Node is a Fedora resource
or is a frozen node that was a fedora resource. |
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.Property,Iterator<javax.jcr.Value>> |
property2values
|
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.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 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. |
static boolean |
propertyContains(javax.jcr.Property p,
String value)
Check if the property contains the given string value
|
public static com.google.common.base.Predicate<javax.jcr.Node> isFedoraResource
Node is a Fedora resource.public static com.google.common.base.Predicate<javax.jcr.Node> isFrozen
Node is a frozen node
(a part of the system version history).public static com.google.common.base.Predicate<javax.jcr.Node> isOrWasFedoraResource
Node is a Fedora resource
or is a frozen node that was a fedora resource.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.Predicate<javax.jcr.Node> isFedoraObjectOrDatastream
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.Function<javax.jcr.Property,Iterator<javax.jcr.Value>> property2values
public static com.google.common.base.Predicate<javax.jcr.Property> isMultipleValuedProperty
public static com.google.common.base.Predicate<javax.jcr.Property> isBinaryContentProperty
public static com.google.common.base.Predicate<javax.jcr.Node> isInternalNode
public 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.VersionHistory getVersionHistory(javax.jcr.Session session,
String path)
throws javax.jcr.RepositoryException
session - path - javax.jcr.RepositoryExceptionpublic static boolean propertyContains(javax.jcr.Property p,
String value)
throws javax.jcr.RepositoryException
p - value - javax.jcr.RepositoryExceptionCopyright © 2013–2014 DuraSpace, Inc.. All rights reserved.