public class MatchXml
extends java.lang.Object
Constructor and Description |
---|
MatchXml()
Create a new instance of MatchXml
|
Modifier and Type | Method and Description |
---|---|
float |
compareMetadata(org.licas_xml.abs.Element compareWith,
org.licas_xml.abs.Element metaStructure,
java.lang.String matchType)
Compare the metadata as XML structure and return the result.
|
public float compareMetadata(org.licas_xml.abs.Element compareWith, org.licas_xml.abs.Element metaStructure, java.lang.String matchType)
MetaConst
.ANYSTRUCTURE
: always returns 1.0.MetaConst
.ALLPARTIAL
: both element name and value must be present but the exact
structure is not required. Returns 1.0 for a full match or 0.5 if values or parts
of values are missing.MetaConst
.ALLEXACT
: both element name and value must be present and the exact
structure is also required. Returns 1.0 for a full match or 0.5 if values or parts
of values are missing.MetaConst
.VALUESPARTIAL
: only the value must be present but the exact structure
is not required. Returns 1.0 for a full match or 0.5 if values or parts of values
are missing.MetaConst
.VALUESEXACT
: only the value must be present and the exact structure
is also required. Returns 1.0 for a full match or 0.5 if values or parts of values
are missing.compareWith
- the metadata of the service to compare with.metaStructure
- the metadata that defines the desired structure.matchType
- the type of matching process. If null, then MetaConst
.ALLEXACT
is used.