public class RDFizer extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
RDFizer.Callback |
| Modifier and Type | Field and Description |
|---|---|
protected CommunityService |
communityService |
protected ConfigurationService |
configurationService |
protected ContentServiceFactory |
contentServiceFactory |
protected Context |
context |
protected boolean |
dryrun |
protected HandleService |
handleService |
protected ItemService |
itemService |
protected String |
lang |
protected Set<UUID> |
processed
Set to remember with DSpaceObject were converted or deleted from the
triplestore already.
|
protected boolean |
stdout |
protected RDFStorage |
storage |
protected boolean |
verbose |
| Constructor and Description |
|---|
RDFizer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
convert(DSpaceObject dso,
boolean reset) |
void |
convertAll()
Converts and stores all DSpaceObjects that are readable for an anonymous
user.
|
protected org.apache.commons.cli.Options |
createOptions() |
void |
delete(DSpaceObject dso,
boolean reset)
Delete the data about the DSpaceObject from the triplestore.
|
void |
deleteAll()
Deletes all data stored in the triplestore (drops all named graphs and
cleans the default graph).
|
protected void |
dspaceDFS(DSpaceObject dso,
RDFizer.Callback callback,
boolean check,
boolean reset) |
boolean |
isDryrun()
Returns whether this is a dry run.
|
protected boolean |
isProcessed(DSpaceObject dso) |
boolean |
isStdout()
Returns whether all converted data is printed to stdout.
|
boolean |
isVerbose()
Returns whether verbose information is printed to System.err.
|
static void |
main(String[] args) |
protected void |
markProcessed(DSpaceObject dso) |
protected void |
overrideContext(Context context)
This method allows you to override the context used for conversion and to
determine which DSpaceObjects should be deleted from the triplestore,
consider well if this is really necessary.
|
protected void |
report(String message) |
protected DSpaceObject |
resolveHandle(String handle) |
protected void |
runCLI(String[] args) |
void |
setDryrun(boolean dryrun)
Set this true to prevent any changes on the triple store.
|
void |
setStdout(boolean stdout)
Set this to true to print all generated data to stdout.
|
void |
setVerbose(boolean verbose)
Set this to true to print verbose information to System.err.
|
protected static void |
usage(org.apache.commons.cli.Options options) |
protected boolean stdout
protected boolean verbose
protected boolean dryrun
protected String lang
protected Context context
protected final ConfigurationService configurationService
protected final ContentServiceFactory contentServiceFactory
protected final CommunityService communityService
protected final ItemService itemService
protected final HandleService handleService
protected final RDFStorage storage
protected void overrideContext(Context context)
Please consider: If your triplestore offers a public sparql endpoint all information readable with the provided context will be exposed to public! If you store your data in a private triplestore that does not provides public access, you might consider to use this method to convert all data stored in your repository.
context - public boolean isStdout()
true if print all generated data is to be printed to stdoutpublic void setStdout(boolean stdout)
dryrun is set true. Turtle will be used
as serialization.stdout - public boolean isVerbose()
true if verbose mode is onpublic void setVerbose(boolean verbose)
verbose - public boolean isDryrun()
true if dry-run mode is onpublic void setDryrun(boolean dryrun)
dryrun - public void deleteAll()
public void delete(DSpaceObject dso, boolean reset) throws SQLException
SQLExceptionpublic void convertAll()
throws SQLException
SQLExceptionprotected void convert(DSpaceObject dso, boolean reset) throws SQLException
SQLExceptionprotected void dspaceDFS(DSpaceObject dso, RDFizer.Callback callback, boolean check, boolean reset) throws SQLException
SQLExceptionprotected boolean isProcessed(DSpaceObject dso)
protected void markProcessed(DSpaceObject dso)
protected void report(String message)
protected void runCLI(String[] args)
protected DSpaceObject resolveHandle(String handle)
protected org.apache.commons.cli.Options createOptions()
protected static void usage(org.apache.commons.cli.Options options)
public static void main(String[] args)
Copyright © 2022 LYRASIS. All rights reserved.