|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.dataloader.IntegrationWriterAbstractImpl
org.intermine.dataloader.IntegrationWriterDataTrackingImpl
public class IntegrationWriterDataTrackingImpl
Priority-based implementation of IntegrationWriter. Allows field values to be chosen according to the relative priorities of the data sources that originated them.
| Field Summary | |
|---|---|
protected DataTracker |
dataTracker
|
protected IntPresentSet |
duplicateObjects
This is a list of the objects in the destination database that we have written to as a non-skeleton more than once. |
protected boolean |
isDuplicates
|
protected PriorityConfig |
priorityConfig
|
protected IntPresentSet |
pureObjects
This is a list of the objects that did not merge with anything from a previous data source |
protected IntPresentSet |
skeletons
|
protected java.util.Set<java.lang.Class<?>> |
trackerMissingClasses
|
protected IntPresentSet |
writtenObjects
This is a list of the objects in the destination database that we have written to as a non-skeleton. |
| Fields inherited from class org.intermine.dataloader.IntegrationWriterAbstractImpl |
|---|
beof, dbIdsStored, eof, FROM_DB, idMap, idMapOps, ignoreDuplicates, lastSource, osw, seenBrokenOneToMany, SKELETON, SOURCE, timeSpentRecursing |
| Fields inherited from interface org.intermine.objectstore.ObjectStore |
|---|
SEQUENCE_IGNORE |
| Constructor Summary | |
|---|---|
IntegrationWriterDataTrackingImpl(ObjectStoreWriter osw,
DataTracker dataTracker)
Constructs a new instance of IntegrationWriterDataTrackingImpl. |
|
IntegrationWriterDataTrackingImpl(ObjectStoreWriter osw,
DataTracker dataTracker,
java.util.Set<java.lang.Class<?>> trackerMissingClasses)
Constructs a new instance of IntegrationWriterDataTrackingImpl. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the connection associated with this ObjectStoreWriter |
boolean |
doTrackerFor(java.lang.Class<?> c)
Returns true if the given class is NOT a subclass of any of the classes in trackerMissingClasses. |
protected DataTracker |
getDataTracker()
Returns the data tracker being used. |
static IntegrationWriterDataTrackingImpl |
getInstance(java.lang.String osAlias,
java.util.Properties props)
Creates a new instance of this class, given the properties defining it. |
protected static IntegrationWriterDataTrackingImpl |
getInstance(java.lang.String osAlias,
java.util.Properties props,
java.lang.Class<? extends IntegrationWriterDataTrackingImpl> iwClass,
java.lang.Class<? extends DataTracker> trackerClass)
Creates a new IntegrationWriter instance of the specified class and with a specified DataTracker class plus properties. |
Source |
getMainSource(java.lang.String name,
java.lang.String type)
Converts a string describing the data source into a Source object suitable for passing to the store method as the main source. |
Source |
getSkeletonSource(java.lang.String name,
java.lang.String type)
Converts a string describing the data source into a Source object suitable for passing to the store method as the skeleton source. |
void |
reset()
Resets the IntegrationWriter, clearing the id map and the hints |
protected InterMineObject |
store(FastPathObject nimo,
Source source,
Source skelSource,
int type)
Stores the given object in the objectstore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DataTracker dataTracker
protected java.util.Set<java.lang.Class<?>> trackerMissingClasses
protected IntPresentSet skeletons
protected IntPresentSet pureObjects
protected IntPresentSet writtenObjects
protected IntPresentSet duplicateObjects
protected boolean isDuplicates
protected PriorityConfig priorityConfig
| Constructor Detail |
|---|
public IntegrationWriterDataTrackingImpl(ObjectStoreWriter osw,
DataTracker dataTracker)
osw - an instance of an ObjectStoreWriter, which we can use to access the databasedataTracker - an instance of DataTracker, which we can use to store data tracking
information
public IntegrationWriterDataTrackingImpl(ObjectStoreWriter osw,
DataTracker dataTracker,
java.util.Set<java.lang.Class<?>> trackerMissingClasses)
osw - an instance of an ObjectStoreWriter, which we can use to access the databasedataTracker - an instance of DataTracker, which we can use to store data tracking
informationtrackerMissingClasses - a Set of classes for which DataTracker data is useless| Method Detail |
|---|
public static IntegrationWriterDataTrackingImpl getInstance(java.lang.String osAlias,
java.util.Properties props)
throws ObjectStoreException
osAlias - the alias of this objectstoreprops - the Properties
ObjectStoreException - sometimes
protected static IntegrationWriterDataTrackingImpl getInstance(java.lang.String osAlias,
java.util.Properties props,
java.lang.Class<? extends IntegrationWriterDataTrackingImpl> iwClass,
java.lang.Class<? extends DataTracker> trackerClass)
throws ObjectStoreException
osAlias - the alias of this objectstoreprops - the PropertiesiwClass - Class of IntegrationWriter to create - IntegrationWriterDataTrackingImpl
or a subclass.trackerClass - Class of DataTracker to use with IntegrationWriter
ObjectStoreException - sometimespublic void reset()
reset in class IntegrationWriterAbstractImpl
public Source getMainSource(java.lang.String name,
java.lang.String type)
name - the name of the data sourcetype - the source type
public Source getSkeletonSource(java.lang.String name,
java.lang.String type)
name - the name of the data sourcetype - the source type
protected DataTracker getDataTracker()
public boolean doTrackerFor(java.lang.Class<?> c)
c - a Class
protected InterMineObject store(FastPathObject nimo,
Source source,
Source skelSource,
int type)
throws ObjectStoreException
store in class IntegrationWriterAbstractImplnimo - the object to storesource - the data Source to which to attribute the dataskelSource - the data Source to which to attribute skeleton datatype - the type of action required, from SOURCE, SKELETON, or FROM_DB
ObjectStoreException - if an error occurs in the underlying objectstore
public void close()
throws ObjectStoreException
close in interface ObjectStoreWriterclose in class IntegrationWriterAbstractImplObjectStoreException - if something goes wrong
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||