use of com.runwaysdk.system.metadata.MdAttributeConcrete in project geoprism-registry by terraframe.
the class RegistryService method refreshAttributeTermTypeInCache.
/**
* Returns the {@link AttributeTermType}s that use the given term.
*
* @param term
* @return
*/
private void refreshAttributeTermTypeInCache(List<MdAttributeConcrete> mdAttrList) {
for (MdAttributeConcrete mdAttribute : mdAttrList) {
String geoObjectTypeCode = mdAttribute.getDefiningMdClass().getTypeName();
Optional<ServerGeoObjectType> optional = ServiceFactory.getMetadataCache().getGeoObjectType(geoObjectTypeCode);
if (optional.isPresent()) {
ServerGeoObjectType geoObjectType = optional.get();
AttributeType attributeType = new AttributeTypeConverter().build((MdAttributeConcreteDAOIF) BusinessFacade.getEntityDAO(mdAttribute));
geoObjectType.getType().addAttribute(attributeType);
ServiceFactory.getMetadataCache().addGeoObjectType(geoObjectType);
}
}
}
Aggregations