com._3kbo.talis
Class TalisStoreLoader

java.lang.Object
  extended by com._3kbo.talis.TalisStoreLoader
All Implemented Interfaces:
groovy.lang.GroovyObject

public class TalisStoreLoader
extends Object
implements groovy.lang.GroovyObject

TalisStoreLoader is a Groovy utility class for uploading RDF files to the Talis Platform See Using Groovy to Upload RDF files to the Talis Platform for details.

Author:
Richard Hancock

Constructor Summary
TalisStoreLoader()
           
TalisStoreLoader(String store, String user, String password)
           
 
Method Summary
 Object encodeRDF(Object data)
           
static String getAPPLICATION_RDF()
           
static String getCONFIGURATION_FILE()
           
 String getMetaboxPath()
           
 groovy.lang.MetaClass getMetaClass()
           
 String getPassword()
           
 Object getProperty(String name)
           
 String getStore()
           
static String getTALIS_DEV_HOST()
           
static String getTALIS_PASSWORD()
           
static String getTALIS_STORE_NAME()
           
static String getTALIS_USER()
           
 groovyx.net.http.RESTClient getTalis()
           
 String getUser()
           
 void init()
           
 Object invokeMethod(String name, Object args)
           
 int listDirectory(String directory)
          List *.rdf files in the specified directory
 int loadDirectory()
          Load only *.rdf files from the current directory
 int loadDirectory(File directory)
          Load only *.rdf files from the specified directory
 int loadDirectory(String directory)
          Load only *.rdf files from the specified directory
 int loadRdfFile(File file)
          Load an rdf file
static Object main(Object args)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setPassword(String value)
           
 void setProperty(String name, Object value)
           
 void setStore(String value)
           
 void setTalis(groovyx.net.http.RESTClient value)
           
 void setUser(String value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TalisStoreLoader

public TalisStoreLoader()

TalisStoreLoader

public TalisStoreLoader(String store,
                        String user,
                        String password)
Method Detail

getTALIS_DEV_HOST

public static final String getTALIS_DEV_HOST()

getAPPLICATION_RDF

public static final String getAPPLICATION_RDF()

getCONFIGURATION_FILE

public static final String getCONFIGURATION_FILE()

getTALIS_STORE_NAME

public static final String getTALIS_STORE_NAME()

getTALIS_USER

public static final String getTALIS_USER()

getTALIS_PASSWORD

public static final String getTALIS_PASSWORD()

getTalis

public groovyx.net.http.RESTClient getTalis()

setTalis

public void setTalis(groovyx.net.http.RESTClient value)

getStore

public String getStore()

setStore

public void setStore(String value)

getUser

public String getUser()

setUser

public void setUser(String value)

getPassword

public String getPassword()

setPassword

public void setPassword(String value)

encodeRDF

public Object encodeRDF(Object data)
                 throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

getMetaboxPath

public String getMetaboxPath()

toString

public String toString()
Overrides:
toString in class Object

init

public void init()

loadRdfFile

public int loadRdfFile(File file)
Load an rdf file

Parameters:
file - The RDF file to upload
Returns:
1 if the RDF file was successfully uploaded, 0 otherwise.

loadDirectory

public int loadDirectory()
Load only *.rdf files from the current directory

Returns:
count of the RDF files successfully uploaded.

loadDirectory

public int loadDirectory(String directory)
Load only *.rdf files from the specified directory

Parameters:
directory - Path to the directory to scoan for RDF files to upload
Returns:
count of the RDF files successfully uploaded.

loadDirectory

public int loadDirectory(File directory)
Load only *.rdf files from the specified directory

Parameters:
directory - The directory to scoan for RDF files to upload
Returns:
count of the RDF files successfully uploaded.

listDirectory

public int listDirectory(String directory)
List *.rdf files in the specified directory

Parameters:
directory - Path to the directory to scoan for RDF files to upload

main

public static Object main(Object args)

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public Object invokeMethod(String name,
                           Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(String name,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright © 2010. All Rights Reserved.