|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.mff.ksi.jinfer.iss.utils.MappingUtils
public final class MappingUtils
Library class containing utility functions for attribute mapping. Please see the article "Finding ID Attributes in XML Documents" for reference.
Method Summary | |
---|---|
static List<AttributeMappingId> |
getCandidates(AMModel model)
Returns the list of candidate attribute mappings from the specified model. |
static boolean |
imagesIntersect(AttributeMappingId am1,
AttributeMappingId am2,
AMModel model)
Checks whether the images of the two specified attribute mappings in the specified model intersect. |
static boolean |
isCandidateMapping(AttributeMappingId targetMapping,
AMModel model)
Verifies whether the specified attribute mapping is a candidate mapping. |
static boolean |
isIDset(List<AttributeMappingId> mappings,
AMModel model)
Determines whether a list of attribute mappings constitutes an ID set. |
static boolean |
mappingsCollide(AttributeMappingId mapping1,
AttributeMappingId mapping2,
AMModel model)
Checks whether two mappings collide, i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isCandidateMapping(AttributeMappingId targetMapping, AMModel model)
An attribute mapping is a candidate mapping, iff it is an injective function: if its every value is unique.
targetMapping
- Mapping to be verified.allMappings
- All the attribute mappings of the grammar.
public static boolean isIDset(List<AttributeMappingId> mappings, AMModel model)
isCandidateMapping(cz.cuni.mff.ksi.jinfer.iss.objects.AttributeMappingId, cz.cuni.mff.ksi.jinfer.iss.objects.AMModel)
).
mappings
- List of the attribute mappings to verify.allMappings
- All the attribute mappings of the grammar.
True
if the specified list consitutes an ID set
(an empty set is ID set too), false
otherwise.public static boolean imagesIntersect(AttributeMappingId am1, AttributeMappingId am2, AMModel model)
am1
- ID of the first mapping to check.am2
- ID of the second mapping to check.model
- Attribute mapping model to check intersection in.
true
if the two attribute mapping images intersect
(have at least one common value), false
otherwise.public static boolean mappingsCollide(AttributeMappingId mapping1, AttributeMappingId mapping2, AMModel model)
imagesIntersect(AttributeMappingId, AttributeMappingId, AMModel)
).
mapping1
- ID of the first mapping to check.mapping2
- ID of the second mapping to check.model
- Attribute mapping model to check the collision in.
true
if the two attribute mapping collide
(have the same type or their images collide),
false
otherwise.public static List<AttributeMappingId> getCandidates(AMModel model)
isCandidateMapping(AttributeMappingId, AMModel)
.
Model
- to find the list of candidate AMs in.
|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |