|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--domparser.ProfileComparison
Main XML profile comparison class.
The comparison of two XML Profiles occurs here. The corresponding DocumentObject trees are traversed, and each node is compared according to the node type's pre-defined set of rules.
| Constructor Summary | |
ProfileComparison(DocumentObject profileA,
DocumentObject profileB)
Constructor |
|
| Method Summary | |
boolean |
canBeOptional(DocumentObject profile)
Returns a boolean indicating whether the DocumentObject provided possesses the Optionality attribute. |
boolean |
canCheckElement(DocumentObject profile)
Returns a boolean indicating whether we can do the conformance check on the provided element. |
boolean |
compareProfiles(DocumentObject profileA,
DocumentObject profileB)
Applies the rules to the two DocumentObject objects, returning the boolean result of the rules. |
java.lang.Class[] |
getComponentRules()
Returns the active rules from the Component Ruleset as an array of Class objects. |
java.lang.Class[] |
getConformanceRules()
Returns the active rules from the Conformance Ruleset as an array of Class objects. |
java.lang.Class[] |
getDataValuesRules()
Returns the active rules from the DataValues Ruleset as an array of Class objects. |
java.lang.Class[] |
getDerivativeRules()
Returns the active rules from the Derivative Ruleset as an array of Class objects. |
java.lang.Class[] |
getDescriptionRules()
Returns the active rules from the Description Ruleset as an array of Class objects. |
java.lang.Class[] |
getEncodingRules()
Returns the active rules from the Encoding Ruleset as an array of Class objects. |
java.lang.Class[] |
getEncodingsRules()
Returns the active rules from the Encodings Ruleset as an array of Class objects. |
java.lang.Class[] |
getEventFlowRules()
Returns the active rules from the EventFlow Ruleset as an array of Class objects. |
java.lang.Class[] |
getFieldRules()
Returns the active rules from the Field Ruleset as an array of Class objects. |
java.lang.Class[] |
getGenericRules()
Returns the active rules from the Generic Ruleset as an array of Class objects. |
java.lang.Class[] |
getImpNoteRules()
Returns the active rules from the ImpNote Ruleset as an array of Class objects. |
java.lang.Class[] |
getMessageRules()
Returns the active rules from the Message Ruleset as an array of Class objects. |
java.lang.Class[] |
getParagraphRules()
Returns the active rules from the Paragraph Ruleset as an array of Class objects. |
java.lang.Class[] |
getPostConditionRules()
Returns the active rules from the PostCondition Ruleset as an array of Class objects. |
java.lang.Class[] |
getPreConditionRules()
Returns the active rules from the PreCondition Ruleset as an array of Class objects. |
java.lang.Class[] |
getPredicateRules()
Returns the active rules from the Predicate Ruleset as an array of Class objects. |
java.lang.Class[] |
getReferenceRules()
Returns the active rules from the Reference Ruleset as an array of Class objects. |
java.lang.Class[] |
getSegmentGroupRules()
Returns the active rules from the SegmentGroup Ruleset as an array of Class objects. |
java.lang.Class[] |
getSegmentRules()
Returns the active rules from the Segment Ruleset as an array of Class objects. |
java.lang.Class[] |
getSpecificationRules()
Returns the active rules from the Specification Ruleset as an array of Class objects. |
java.lang.Class[] |
getSTRules()
Returns the active rules from the ST Ruleset as an array of Class objects. |
java.lang.Class[] |
getSubcomponentRules()
Returns the active rules from the SubComponent Ruleset as an array of Class objects. |
java.lang.Class[] |
getUseCaseRules()
Returns the active rules from the UseCase Ruleset as an array of Class objects. |
void |
traverse()
Calls the traverseTrees method, and simply indicates whether Profile A and Profile B conform according to the rules that were applied. |
boolean |
traverseTrees(DocumentObject profileA,
DocumentObject profileB)
Traverses the two DocumentObject trees recursively, while applying conformance rules. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public ProfileComparison(DocumentObject profileA,
DocumentObject profileB)
throws HL7Exception
Constructor
Initializes all the Ruleset objects and stores the two DocumentObject trees.
profileA - Message profile tree to compare against.profileB - Message profile tree that constrains profileAHL7Exception - | Method Detail |
public java.lang.Class[] getDescriptionRules()
throws HL7Exception
Returns the active rules from the Description Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getGenericRules()
throws HL7Exception
Returns the active rules from the Generic Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getSpecificationRules()
throws HL7Exception
Returns the active rules from the Specification Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getConformanceRules()
throws HL7Exception
Returns the active rules from the Conformance Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getSegmentRules()
throws HL7Exception
Returns the active rules from the Segment Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getSegmentGroupRules()
throws HL7Exception
Returns the active rules from the SegmentGroup Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getFieldRules()
throws HL7Exception
Returns the active rules from the Field Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getComponentRules()
throws HL7Exception
Returns the active rules from the Component Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getSubcomponentRules()
throws HL7Exception
Returns the active rules from the SubComponent Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getSTRules()
throws HL7Exception
Returns the active rules from the ST Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getImpNoteRules()
throws HL7Exception
Returns the active rules from the ImpNote Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getParagraphRules()
throws HL7Exception
Returns the active rules from the Paragraph Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getPredicateRules()
throws HL7Exception
Returns the active rules from the Predicate Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getReferenceRules()
throws HL7Exception
Returns the active rules from the Reference Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getDataValuesRules()
throws HL7Exception
Returns the active rules from the DataValues Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getMessageRules()
throws HL7Exception
Returns the active rules from the Message Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getPreConditionRules()
throws HL7Exception
Returns the active rules from the PreCondition Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getPostConditionRules()
throws HL7Exception
Returns the active rules from the PostCondition Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getUseCaseRules()
throws HL7Exception
Returns the active rules from the UseCase Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getEventFlowRules()
throws HL7Exception
Returns the active rules from the EventFlow Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getDerivativeRules()
throws HL7Exception
Returns the active rules from the Derivative Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getEncodingsRules()
throws HL7Exception
Returns the active rules from the Encodings Ruleset as an array of Class objects.
HL7Exception -
public java.lang.Class[] getEncodingRules()
throws HL7Exception
Returns the active rules from the Encoding Ruleset as an array of Class objects.
HL7Exception -
public boolean canBeOptional(DocumentObject profile)
throws HL7Exception
Returns a boolean indicating whether the DocumentObject provided possesses the Optionality attribute.
This is a custom method, which could ultimately be generated automatically (e.g., whenever a node has the Optionality attribute, the logic to include that node could be appended.).
profile - The DocumentObject that is tested to see if it's an "optional" element.HL7Exception -
public boolean canCheckElement(DocumentObject profile)
throws HL7Exception
Returns a boolean indicating whether we can do the conformance check on the provided element.
This is just to limit the demo application to "important" nodes.
profile - The DocumentObject that is tested to see if it should be checked for conformance.HL7Exception -
public boolean compareProfiles(DocumentObject profileA,
DocumentObject profileB)
throws HL7Exception
Applies the rules to the two DocumentObject objects, returning the boolean result of the rules.
A value of "true" indicates that Profile A and Profile B conform, according to the rules that were applied.
profileA - Node from message profile AprofileB - Node from message profile BHL7Exception -
public void traverse()
throws HL7Exception
Calls the traverseTrees method, and simply indicates whether Profile A and Profile B conform according to the rules that were applied.
HL7Exception -
public boolean traverseTrees(DocumentObject profileA,
DocumentObject profileB)
throws HL7Exception
Traverses the two DocumentObject trees recursively, while applying conformance rules.
Returns a boolean "true" if the profiles successfully validate against the rules. Returns a boolean "false" if the profiles do not, or an error occurs during traversal.
profileA - Node from message profile AprofileB - Node from message profile BHL7Exception -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||