Class Merger
java.lang.Object
org.openprovenance.prov.validation.Merger
Class merging two statements of the same type. Can't this be streamlined and
can avoid code repetition?
problem is newElement needs static type of its argument!
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMerger(ProvFactory p, ProvUtilities u, Hashtable<String, List<Statement>> qualifiedNameMismatch, Indexer indexer) -
Method Summary
Modifier and TypeMethodDescription<T extends Statement>
TapplySubstitution(T from, Hashtable<VarQNameWrapper, QualifiedName> table, Hashtable<VarTime, XMLGregorianCalendar> timeTable) <T extends Statement>
TapplySubstitutionUnwrapped(T anEntry, Hashtable<VarQNameWrapper, QualifiedName> table, Hashtable<VarTime, XMLGregorianCalendar> timeTable) <T extends Statement>
booleancheckSameQualifiedName(QualifiedName fromArgument, QualifiedName toArgument, T from, T to) static intstatic int<T extends Statement>
Tmerge(T from, T to) voidsameEndTime(String activityURI, Activity activity, WasEndedBy end) voidsameStartTime(String activityURI, Activity activity, WasStartedBy start) substitute(QualifiedName id, Hashtable<VarQNameWrapper, QualifiedName> subst) booleanunify(XMLGregorianCalendar fromTime, XMLGregorianCalendar toTime) voidupdateSubstitutionTable(VarQName id1, QualifiedName id2)
-
Field Details
-
qualifiedNameMismatch
-
-
Constructor Details
-
Merger
public Merger(ProvFactory p, ProvUtilities u, Hashtable<String, List<Statement>> qualifiedNameMismatch, Indexer indexer)
-
-
Method Details
-
checkSameQualifiedName
public <T extends Statement> boolean checkSameQualifiedName(QualifiedName fromArgument, QualifiedName toArgument, T from, T to) -
merge
-
getFirstTimeIndex
-
getLastIndex
-
unify
public boolean unify(XMLGregorianCalendar fromTime, XMLGregorianCalendar toTime) throws NullPointerException - Throws:
NullPointerException
-
updateSubstitutionTable
-
sameStartTime
-
sameEndTime
-
substitute
-
substitute
public XMLGregorianCalendar substitute(XMLGregorianCalendar id, Hashtable<VarTime, XMLGregorianCalendar> subst) -
applySubstitution
public <T extends Statement> T applySubstitution(T from, Hashtable<VarQNameWrapper, QualifiedName> table, Hashtable<VarTime, XMLGregorianCalendar> timeTable) -
applySubstitutionUnwrapped
public <T extends Statement> T applySubstitutionUnwrapped(T anEntry, Hashtable<VarQNameWrapper, QualifiedName> table, Hashtable<VarTime, throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, IllegalArgumentExceptionXMLGregorianCalendar> timeTable)
-