public class NodePropertiesTools extends Object
Constructor and Description |
---|
NodePropertiesTools() |
Modifier and Type | Method and Description |
---|---|
void |
addReferencePlaceholders(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator,
javax.jcr.Node node,
String propertyName,
com.hp.hpl.jena.rdf.model.Resource resource)
Add a reference placeholder from one node to another in-domain resource
|
void |
appendOrReplaceNodeProperty(javax.jcr.Node node,
String propertyName,
javax.jcr.Value newValue)
Given a JCR node, property and value, either:
- if the property is single-valued, replace the existing property with
the new value
- if the property is multivalued, append the new value to the property
|
void |
removeNodeProperty(javax.jcr.Node node,
String propertyName,
javax.jcr.Value valueToRemove)
Given a JCR node, property and value, remove the value (if it exists)
from the property, and remove the
property if no values remove
|
void |
removeReferencePlaceholders(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator,
javax.jcr.Node node,
String propertyName,
com.hp.hpl.jena.rdf.model.Resource resource)
Remove a reference placeholder that links one node to another in-domain resource
|
public NodePropertiesTools()
public void appendOrReplaceNodeProperty(javax.jcr.Node node, String propertyName, javax.jcr.Value newValue) throws javax.jcr.RepositoryException
node
- the JCR nodepropertyName
- a name of a JCR property (either pre-existing or
otherwise)newValue
- the JCR value to insertjavax.jcr.RepositoryException
- if repository exception occurredpublic void addReferencePlaceholders(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator, javax.jcr.Node node, String propertyName, com.hp.hpl.jena.rdf.model.Resource resource) throws javax.jcr.RepositoryException
idTranslator
- the id translatornode
- the nodepropertyName
- the property nameresource
- the resourcejavax.jcr.RepositoryException
- if repository exception occurredpublic void removeReferencePlaceholders(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator, javax.jcr.Node node, String propertyName, com.hp.hpl.jena.rdf.model.Resource resource) throws javax.jcr.RepositoryException
idTranslator
- the id translatornode
- the nodepropertyName
- the property nameresource
- the resourcejavax.jcr.RepositoryException
- if repository exception occurredpublic void removeNodeProperty(javax.jcr.Node node, String propertyName, javax.jcr.Value valueToRemove) throws javax.jcr.RepositoryException
node
- the JCR nodepropertyName
- a name of a JCR property (either pre-existing or
otherwise)valueToRemove
- the JCR value to removejavax.jcr.RepositoryException
- if repository exception occurredCopyright © 2013–2016 DuraSpace, Inc.. All rights reserved.