Search in sources :

Example 1 with CompiledMapping

use of org.whole.lang.xsd.codebase.MappingIndexes.CompiledMapping in project whole by wholeplatform.

the class AbstractMappingStrategy method getElementFeatureMappings.

public Collection<FeatureDescriptor> getElementFeatureMappings(EntityDescriptor<?> context, QName name) {
    Set<CompiledMapping> mappings = indexes.findMappings(ElementMapping, context, name.getLocalPart());
    if (mappings.isEmpty())
        mappings = Collections.singleton(indexes.findMapping(AnyElementMapping, context));
    Set<FeatureDescriptor> featureMappings = new HashSet<FeatureDescriptor>(mappings.size());
    for (CompiledMapping mapping : mappings) featureMappings.add(mapping.fd);
    return featureMappings;
}
Also used : CompiledMapping(org.whole.lang.xsd.codebase.MappingIndexes.CompiledMapping) FeatureDescriptor(org.whole.lang.reflect.FeatureDescriptor) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 FeatureDescriptor (org.whole.lang.reflect.FeatureDescriptor)1 CompiledMapping (org.whole.lang.xsd.codebase.MappingIndexes.CompiledMapping)1