Qualify

The purpose of this tools is to allow batch changes to be applied to data within a jena model.

Reason for Use

When there are sections of data that need to be removed or changed then the qualify tool is a way of performing
those changes without the need to know how to form the sparql update queries.

Parameters

wordiness - (optional) sets the lowest level of log messages to be displayed to the console. The lower the log level, the more detailed the messages.

Qualification will execute specific user defined sparql queries against a model in order to clean and qualify the data contained inside the model before storing inside of VIVO. Qualification queries will be site specific. As such the default configuration for the harvester doesn't currently invoke Qualification.

Overview

Short Option

Long Option

Parameter Value Map

Description

Required

d

datatype

RDF_PREDICATE

data type (rdf predicate)

false

i

jenaConfig

CONFIG_FILE

config file for jena model

false

I

jenaOverride

JENA_PARAM = VALUE

override the JENA_PARAM of jena model config using VALUE

false

r

regexMatch

REGEX

Match this regex expression

false

t

textMatch

MATCH_STRING

Match this exact text string

false

v

value

REPLACE_VALUE

Replace matching record data with this value

false

n

remove-namespace

RDF_NAMESPACE

Specify namespace for p/predicate clean and -c/-clean-resources flag

false

p

predicate-clean

 

remove all statements where the predicate is from the given n/-remove-namespace

false

c

clean-resources

 

remove all statements where the subject or object is from the given n/-remove-namespace

false

Usage

preparation:
Qualify="java $OPTS -Dprocess-task=Qualify org.vivoweb.harvester.qualify.Qualify"
MATCHEDINPUT="-i $H2MODEL -ImodelName=$MATCHEDNAME -IdbUrl=$MATCHEDDBURL -IcheckEmpty=$CHECKEMPTY"

Call:
$Qualify $MATCHEDINPUT -n http://vivoweb.org/ontology/score -p

Methods

strReplace

  1. Get statements of the specified dataType with the oldValue
  2. iterate through those statements
    1. replace oldValue with newValue

regexReplace

  1. get statements with the given predicate and who's object matches the regexMatch filter
  2. assemble insert and delete sparql statements to delete the old and insert the new.

cleanResources

  1. construct and call the query to remove subjects and objects in the given namespace

cleanPredicates

  1. construct and call the query to remove predicates in the given namespace