public abstract class FedoraTypesUtils extends Object implements FedoraJcrTypes
Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Predicate<javax.jcr.Node> |
isBlankNode
Predicate for determining whether this
Node is a Fedora
binary. |
static com.google.common.base.Predicate<javax.jcr.Node> |
isContainer
Predicate for determining whether this
Node is a Container . |
static com.google.common.base.Predicate<javax.jcr.Node> |
isFedoraBinary
Predicate for determining whether this
Node is a Fedora
binary. |
static com.google.common.base.Predicate<FedoraResource> |
isFrozenNode
Predicate for determining whether this
FedoraResource has a frozen node |
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> |
isInternalProperty
Check whether a property is an internal property that should be suppressed
from external output.
|
static com.google.common.base.Predicate<javax.jcr.Property> |
isInternalReferenceProperty
Check if a property is a reference property.
|
static com.google.common.base.Predicate<javax.jcr.Node> |
isNonRdfSourceDescription
Predicate for determining whether this
Node is a NonRdfSourceDescription |
static com.google.common.base.Predicate<javax.jcr.Property> |
isProtectedAndShouldBeHidden
Check whether a property is protected (ie, cannot be modified directly) but
is not one we've explicitly chosen to include.
|
static String |
REFERENCE_PROPERTY_SUFFIX |
CONTENT_DIGEST, CONTENT_SIZE, EXPOSED_PROTECTED_JCR_TYPES, FCR_METADATA, FCR_VERSIONS, FEDORA_BINARY, FEDORA_BLANKNODE, FEDORA_CONTAINER, FEDORA_NON_RDF_SOURCE_DESCRIPTION, FEDORA_PAIRTREE, FEDORA_RESOURCE, FEDORA_TOMBSTONE, FROZEN_MIXIN_TYPES, FROZEN_NODE, JCR_CREATED, JCR_CREATEDBY, JCR_FROZEN_NODE, JCR_LASTMODIFIED, JCR_MIXIN_TYPES, JCR_PRIMARY_TYPE, JCR_UUID, LDP_BASIC_CONTAINER, LDP_DIRECT_CONTAINER, LDP_HAS_MEMBER_RELATION, LDP_INDIRECT_CONTAINER, LDP_INSERTED_CONTENT_RELATION, LDP_IS_MEMBER_OF_RELATION, LDP_MEMBER_RESOURCE, PREMIS_FILE_NAME, ROOT, VERSIONABLE
Constructor and Description |
---|
FedoraTypesUtils() |
Modifier and Type | Method and Description |
---|---|
static javax.jcr.Node |
getClosestExistingAncestor(javax.jcr.Session session,
String path)
Get the closest ancestor that current exists
|
static javax.jcr.nodetype.PropertyDefinition |
getDefinitionForPropertyName(javax.jcr.Node node,
String propertyName)
Get the property definition information (containing type and multi-value
information)
|
static int |
getPropertyType(javax.jcr.Node node,
String propertyName)
Get the JCR property type ID for a given property name.
|
static String |
getReferencePropertyName(String propertyName)
When we add certain URI properties, we also want to leave a reference node
|
static String |
getReferencePropertyOriginalName(String refPropertyName)
Given an internal reference node property, get the original name
|
static boolean |
isMultivaluedProperty(javax.jcr.Node node,
String propertyName)
Determine if a given JCR property name is single- or multi- valued.
|
static boolean |
isReferenceProperty(javax.jcr.Node node,
String propertyName)
Check if a property definition is a reference property
|
public static final String REFERENCE_PROPERTY_SUFFIX
public static com.google.common.base.Predicate<javax.jcr.Node> isContainer
Node
is a Container
.public static com.google.common.base.Predicate<javax.jcr.Node> isNonRdfSourceDescription
Node
is a NonRdfSourceDescription
public static com.google.common.base.Predicate<javax.jcr.Node> isFedoraBinary
Node
is a Fedora
binary.public static com.google.common.base.Predicate<FedoraResource> isFrozenNode
FedoraResource
has a frozen nodepublic static com.google.common.base.Predicate<javax.jcr.Node> isBlankNode
Node
is a Fedora
binary.public static com.google.common.base.Predicate<javax.jcr.Property> isInternalReferenceProperty
public static com.google.common.base.Predicate<javax.jcr.Property> isInternalProperty
public static com.google.common.base.Predicate<javax.jcr.Property> isProtectedAndShouldBeHidden
public static com.google.common.base.Predicate<javax.jcr.Node> isInternalNode
public FedoraTypesUtils()
public static int getPropertyType(javax.jcr.Node node, String propertyName) throws javax.jcr.RepositoryException
node
- the JCR node to add the property onpropertyName
- the property namejavax.jcr.RepositoryException
public static boolean isMultivaluedProperty(javax.jcr.Node node, String propertyName) throws javax.jcr.RepositoryException
node
- the JCR node to checkpropertyName
- the property name
(which may or may not already exist)javax.jcr.RepositoryException
public 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.RepositoryException
public static String getReferencePropertyName(String propertyName)
propertyName
- public static String getReferencePropertyOriginalName(String refPropertyName)
refPropertyName
- public static boolean isReferenceProperty(javax.jcr.Node node, String propertyName) throws javax.jcr.RepositoryException
node
- propertyName
- javax.jcr.RepositoryException
public static javax.jcr.Node getClosestExistingAncestor(javax.jcr.Session session, String path) throws javax.jcr.RepositoryException
session
- path
- javax.jcr.RepositoryException
Copyright © 2013-2015 DuraSpace, Inc.. All Rights Reserved.