|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fao.geonet.kernel.harvest.harvester.AbstractHarvester
public abstract class AbstractHarvester
TODO javadoc.
| Nested Class Summary | |
|---|---|
class |
AbstractHarvester.HarvestWithIndexProcessor
Nested class to handle harvesting with fast indexing. |
| Field Summary | |
|---|---|
protected ServiceContext |
context
|
protected DataManager |
dataMan
|
static String |
HARVESTER_GROUP_NAME
|
protected SettingManager |
settingMan
|
| Constructor Summary | |
|---|---|
AbstractHarvester()
|
|
| Method Summary | |
|---|---|
void |
add(Dbms dbms,
org.jdom.Element node)
TODO javadoc. |
protected void |
add(org.jdom.Element el,
String name,
int value)
|
void |
addHarvestInfo(org.jdom.Element info,
String id,
String uuid)
Adds harvesting information to each metadata element. |
void |
addInfo(org.jdom.Element node)
Adds harvesting result information to each harvesting entry. |
static AbstractHarvester |
create(String type,
ServiceContext context,
SettingManager sm,
DataManager dm)
TODO javadoc. |
void |
destroy(Dbms dbms)
Called when the harvesting entry is removed from the system. |
protected abstract String |
doAdd(Dbms dbms,
org.jdom.Element node)
|
protected abstract void |
doAddInfo(org.jdom.Element node)
|
protected abstract void |
doDestroy(Dbms dbms)
|
protected abstract void |
doHarvest(Logger l,
ResourceManager rm)
|
protected abstract void |
doInit(org.jdom.Element entry)
|
protected abstract void |
doUpdate(Dbms dbms,
String id,
org.jdom.Element node)
|
String |
getID()
TODO Javadoc. |
abstract AbstractParams |
getParams()
|
protected abstract org.jdom.Element |
getResult()
|
static org.quartz.Scheduler |
getScheduler()
TODO Javadoc. |
abstract String |
getType()
|
void |
init(org.jdom.Element node)
|
Common.OperResult |
invoke(ResourceManager rm)
TODO Javadoc. |
Common.OperResult |
run(Dbms dbms)
TODO Javadoc. |
protected void |
setValue(Map<String,Object> values,
String path,
org.jdom.Element el,
String name)
|
void |
shutdown()
Called when the application is shutdown. |
static void |
shutdownScheduler()
TODO Javadoc. |
Common.OperResult |
start(Dbms dbms)
TODO Javadoc. |
static void |
staticInit(ServiceContext context)
TODO Javadoc. |
Common.OperResult |
stop(Dbms dbms)
TODO Javadoc. |
protected void |
storeCategories(Dbms dbms,
AbstractParams params,
String path)
Override this method with an empty body to avoid categories storage. |
protected void |
storeNode(Dbms dbms,
AbstractParams params,
String path)
Invoked from doAdd and doUpdate in sub class implementations. |
protected void |
storeNodeExtra(Dbms dbms,
AbstractParams params,
String path,
String siteId,
String optionsId)
Override this method to store harvesting node's specific settings. |
protected void |
storePrivileges(Dbms dbms,
AbstractParams params,
String path)
Override this method with an empty body to avoid privileges storage. |
void |
update(Dbms dbms,
org.jdom.Element node)
TODO Javadoc. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String HARVESTER_GROUP_NAME
protected ServiceContext context
protected SettingManager settingMan
protected DataManager dataMan
| Constructor Detail |
|---|
public AbstractHarvester()
| Method Detail |
|---|
public static void staticInit(ServiceContext context)
throws Exception
context -
Exception
public static AbstractHarvester create(String type,
ServiceContext context,
SettingManager sm,
DataManager dm)
throws BadParameterEx,
OperationAbortedEx
type - context - sm - dm -
BadParameterEx
OperationAbortedEx
public void add(Dbms dbms,
org.jdom.Element node)
throws BadInputEx,
SQLException
dbms - node -
BadInputEx
SQLException
public void init(org.jdom.Element node)
throws BadInputEx,
org.quartz.SchedulerException
BadInputEx
org.quartz.SchedulerException
public static org.quartz.Scheduler getScheduler()
throws org.quartz.SchedulerException
org.quartz.SchedulerException
public void shutdown()
throws org.quartz.SchedulerException
org.quartz.SchedulerException
public static void shutdownScheduler()
throws org.quartz.SchedulerException
org.quartz.SchedulerException
public void destroy(Dbms dbms)
throws Exception
dbms -
Exception
public Common.OperResult start(Dbms dbms)
throws SQLException,
org.quartz.SchedulerException
dbms -
SQLException
org.quartz.SchedulerException
public Common.OperResult stop(Dbms dbms)
throws SQLException,
org.quartz.SchedulerException
dbms -
SQLException
org.quartz.SchedulerException
public Common.OperResult run(Dbms dbms)
throws SQLException,
org.quartz.SchedulerException
dbms -
SQLException
org.quartz.SchedulerExceptionpublic Common.OperResult invoke(ResourceManager rm)
rm -
public void update(Dbms dbms,
org.jdom.Element node)
throws BadInputEx,
SQLException,
org.quartz.SchedulerException
dbms - node -
BadInputEx
SQLException
org.quartz.SchedulerExceptionpublic String getID()
public void addInfo(org.jdom.Element node)
node -
public void addHarvestInfo(org.jdom.Element info,
String id,
String uuid)
info - id - uuid - public abstract String getType()
public abstract AbstractParams getParams()
protected abstract void doInit(org.jdom.Element entry)
throws BadInputEx
entry -
BadInputEx
protected abstract void doDestroy(Dbms dbms)
throws SQLException
dbms -
SQLException
protected abstract String doAdd(Dbms dbms,
org.jdom.Element node)
throws BadInputEx,
SQLException
dbms - node -
BadInputEx
SQLException
protected abstract void doUpdate(Dbms dbms,
String id,
org.jdom.Element node)
throws BadInputEx,
SQLException
dbms - id - node -
BadInputEx
SQLExceptionprotected abstract org.jdom.Element getResult()
protected abstract void doAddInfo(org.jdom.Element node)
node -
protected abstract void doHarvest(Logger l,
ResourceManager rm)
throws Exception
l - rm -
Exception
protected void storeNode(Dbms dbms,
AbstractParams params,
String path)
throws SQLException
dbms - params - path -
SQLException
protected void storePrivileges(Dbms dbms,
AbstractParams params,
String path)
throws SQLException
dbms - params - path -
SQLException
protected void storeCategories(Dbms dbms,
AbstractParams params,
String path)
throws SQLException
dbms - params - path -
SQLException
protected void storeNodeExtra(Dbms dbms,
AbstractParams params,
String path,
String siteId,
String optionsId)
throws SQLException
dbms - params - path - siteId - optionsId -
SQLException
protected void setValue(Map<String,Object> values,
String path,
org.jdom.Element el,
String name)
values - path - el - name -
protected void add(org.jdom.Element el,
String name,
int value)
el - name - value -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||