|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaito.integration.IntegratorHelper
public class IntegratorHelper
Constructor Summary | |
---|---|
IntegratorHelper(java.util.Properties docs,
java.util.Properties actors,
java.util.Properties quickName)
|
Method Summary | |
---|---|
static java.lang.String |
createDocID(Record rec)
Creates an ID for a document-type resource. |
void |
createRelation(java.sql.Connection con,
java.lang.String subject,
java.lang.String object,
java.lang.String roleType,
boolean reversed)
Creates a relation between two resources, and saves it in the DB's ResourceRelation table, unless one already exists. |
static java.lang.String |
getFirstVal(java.util.Vector v)
Returns the first String of a Vector, or null if not possible |
Resource |
getResource(java.sql.Connection con,
java.lang.String resourceType,
java.lang.String subType,
java.lang.String newResID,
java.lang.String canoName)
Retrieves a Resource (by types and canoName) from the DB, or creates a new Resource if none exist. |
void |
integrateDocument(java.sql.Connection con,
java.lang.String sourceID,
Record rec)
|
void |
integrateNameQuickFormat(java.sql.Connection con,
java.lang.String sourceID,
Record rec)
|
void |
resolveDocumentReferences(java.sql.Connection con,
Record rec,
java.lang.String sourceID)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntegratorHelper(java.util.Properties docs, java.util.Properties actors, java.util.Properties quickName)
Method Detail |
---|
public void integrateDocument(java.sql.Connection con, java.lang.String sourceID, Record rec) throws IntegrationException
sourceID
- ID of the source of the parameter recordrec
- the Record to be integrated
IntegrationException
public void integrateNameQuickFormat(java.sql.Connection con, java.lang.String sourceID, Record rec) throws IntegrationException
sourceID
- ID of the source of the parameter recordrec
- the Record representing a single record in the
quickformat sourcefile
IntegrationException
public void resolveDocumentReferences(java.sql.Connection con, Record rec, java.lang.String sourceID) throws IntegrationException
sourceID
- ID of the source of the parameter recordrecords
- a Vector filled with Records to be processed
IntegrationException
public Resource getResource(java.sql.Connection con, java.lang.String resourceType, java.lang.String subType, java.lang.String newResID, java.lang.String canoName) throws IntegrationException
con
- Connection to the DB. Make sure it's not null!resourceType
- Actor, Channel, Document or RolesubType
- detailed type of the resource. Make sure it
corresponds to the DB table column specifications!newResID
- ID of the resource if a new one is created.
Note: if the ID is already in use, a number will be
automatically appended to create a unique IDcanoName
- Canonized name
IntegrationException
public void createRelation(java.sql.Connection con, java.lang.String subject, java.lang.String object, java.lang.String roleType, boolean reversed) throws IntegrationException
con
- Connection to the DB. Make sure it's not null!subject
- ID of the resource that pointsobject
- ID of the resource that is being pointedroleType
- type of the relation, must be one of the
enumerated values for DB's Role.type columnreversed
- set true to reverse the direction of the
relation (subject becomes object and vice versa)
IntegrationException
public static java.lang.String createDocID(Record rec)
public static java.lang.String getFirstVal(java.util.Vector v)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |