|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graffiti.plugins.ios.gml.attributemapping.AbstractAttributeMapping
public abstract class AbstractAttributeMapping
This class provides an abstract implementation of a mapping from GML keys paths to Gravisto attribute paths and vice versa. We have to consider whole paths in order to take into account the fact that a key may appear at different places (namespaces). Two maps are provided which contain the two mappings. Therefore upon creation there is some overhead creating the second mapping from the first. However, this will only have to be done once. Getting the corresponding path then only takes O(1) in both cases.
Constructor Summary | |
---|---|
AbstractAttributeMapping()
Constructs a new AbstractAttributeMapping . |
Method Summary | |
---|---|
void |
addIgnorableGML(String gmlPath)
Adds a GML attribute path that is ignorable when writing a GML file. |
void |
addIgnorableGravisto(String gravistoPath)
Adds a Gravisto attribute path that is ignorable. |
void |
addMapping(String gmlPath,
String gravistoPath,
boolean requiresSpecialTreatment)
Adds a mapping from a GML key path to a Gravisto attribute path indicating whether a transformation requires some extra work as opposed to just changing the path. |
String |
getGMLPath(String gravistoPath)
Returns the GML key path corresponding to the given Gravisto attribute path. |
String |
getGravistoPath(String gmlPath)
Returns the Gravisto attribute path corresponding to the given GML key path. |
boolean |
isIgnorableGML(String gmlPath)
Returns true if the attribute at the specified GML attribute
path is ignorable, false otherwise. |
boolean |
isIgnorableGravisto(String gravistoPath)
Returns true if the attribute at the specified Gravisto
attribute path is ignorable, false otherwise. |
boolean |
requiresSpecialTreatment(String gmlPath)
Indicates whether some specific transformation work needs to be done when transforming from one representation to the other. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractAttributeMapping()
AbstractAttributeMapping
.
Method Detail |
---|
public String getGMLPath(String gravistoPath)
null
will be returned.
getGMLPath
in interface AttributeMapping
gravistoPath
- the Gravisto attribute path.
public String getGravistoPath(String gmlPath)
null
will be returned.
getGravistoPath
in interface AttributeMapping
gmlPath
- the GML key path.
public boolean isIgnorableGML(String gmlPath)
true
if the attribute at the specified GML attribute
path is ignorable, false
otherwise.
isIgnorableGML
in interface AttributeMapping
gmlPath
- the GML attribute path for which to check whether the
attribute is ignorable.
true
if the attribute at the specified GML attribute
path is ignorable, false
otherwise.public boolean isIgnorableGravisto(String gravistoPath)
true
if the attribute at the specified Gravisto
attribute path is ignorable, false
otherwise.
isIgnorableGravisto
in interface AttributeMapping
gravistoPath
- the Gravisto attribute path for which to check whether the
attribute is ignorable.
true
if the attribute at the specified Gravisto
attribute path is ignorable, false
otherwise.public void addIgnorableGML(String gmlPath)
addIgnorableGML
in interface AttributeMapping
gmlPath
- GML attribute path to be added.public void addIgnorableGravisto(String gravistoPath)
addIgnorableGravisto
in interface AttributeMapping
gravistoPath
- the Gravisto attribute path to be added.public void addMapping(String gmlPath, String gravistoPath, boolean requiresSpecialTreatment)
addMapping
in interface AttributeMapping
gmlPath
- the GML key path.gravistoPath
- the Gravisto attribute path.requiresSpecialTreatment
- the transformation flag.public boolean requiresSpecialTreatment(String gmlPath)
requiresSpecialTreatment
in interface AttributeMapping
gmlPath
- the GML key path for which to check the necessity of extra
work.
true
some specific transformation work needs to be
done when transforming from one representation to the other,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |