public class Mapping
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Mapping.MappingProfile
Helper class containing enumeration of possible mapping profiles to be applied in triple generation.
|
class |
Mapping.mapProperties
Helper class containing properties of a particular mapping.
|
Modifier and Type | Field and Description |
---|---|
(package private) java.util.Map<java.lang.String,Mapping.mapProperties> |
attrMappings
Basic structure with mappings of feature attributes (key) to RDF predicates (values)
|
(package private) java.util.List<java.lang.String> |
extraGeometricAttrs
List that retains the names of the geometric attributes to be auto-generated.
|
(package private) java.util.List<java.lang.String> |
extraThematicAttrs
List that retains the names of the thematic attributes to be auto-generated.
|
(package private) java.util.List<java.lang.String> |
multiFacetedAttrs
Internal structure that keeps the names of all multi-faceted attributes (e.g., names in various languages)
|
Constructor and Description |
---|
Mapping()
Constructor of the Mapping class.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String key,
java.lang.String[] mappings)
Create a new mapping for a specific attribute in the input dataset.
|
void |
createFromFile(java.lang.String fileName)
Creates a new mapping specification from a YML file.
|
Mapping.mapProperties |
find(java.lang.String key)
Retrieve the properties associated with a given attribute.
|
java.util.List<java.lang.String> |
findExtraGeometricAttr(java.lang.String f)
Identifies the name(s) of any auto-generated attribute(s) based on geometric properties (e.g., area, length, perimeter).
|
java.lang.String |
findMultiFaceted(java.lang.String key)
Identifies whether a multi-faceted attribute is included in the mapping specifications.
|
java.util.List<java.lang.String> |
getExtraGeometricAttributes()
Provides a list with the names of all geometric attributes that will be generated on-the-fly during transformation.
|
java.util.List<java.lang.String> |
getExtraThematicAttributes()
Provides a list with the names of all thematic attributes that will be generated on-the-fly during transformation.
|
java.util.Set<java.lang.String> |
getKeys()
Provides all attribute names listed in the user-specified mapping.
|
boolean |
remove(java.lang.String key)
Removes the mapping specification for a given attribute (used as key in the mapping).
|
java.util.Map<java.lang.String,Mapping.mapProperties> attrMappings
java.util.List<java.lang.String> multiFacetedAttrs
java.util.List<java.lang.String> extraThematicAttrs
java.util.List<java.lang.String> extraGeometricAttrs
public void add(java.lang.String key, java.lang.String[] mappings)
key
- The name of the attribute in the input dataset.mappings
- The mapping properties as specified in a YML file for this attribute.public java.util.Set<java.lang.String> getKeys()
public void createFromFile(java.lang.String fileName)
fileName
- Path to the YML file.public boolean remove(java.lang.String key)
key
- The name of the attribute to be removed.public Mapping.mapProperties find(java.lang.String key)
key
- the name of the attribute.public java.lang.String findMultiFaceted(java.lang.String key)
key
- The name of the attribute as used in the dataset.public java.util.List<java.lang.String> findExtraGeometricAttr(java.lang.String f)
f
- The name of the built-in function that will be used to generate values for any such attribute.public java.util.List<java.lang.String> getExtraThematicAttributes()
public java.util.List<java.lang.String> getExtraGeometricAttributes()