Search in sources :

Example 1 with MdAttributeDAO

use of com.runwaysdk.dataaccess.metadata.MdAttributeDAO in project geoprism-registry by terraframe.

the class PatchExistsAndInvalid method enforceInvalidRequired.

private void enforceInvalidRequired() {
    List<Universal> unis = PatchExistsAndInvalid.getUniversals();
    for (Universal uni : unis) {
        ServerGeoObjectType type = new ServerGeoObjectTypeConverter().build(uni);
        MdGraphClassDAOIF mdClass = type.getMdVertex();
        logger.info("Setting invalid mdAttr to required for class [" + mdClass.getKey() + "].");
        MdAttributeDAO invalidMdAttr = (MdAttributeDAO) mdClass.definesAttribute(DefaultAttribute.INVALID.getName());
        invalidMdAttr.setValue(MdAttributeConcreteInfo.REQUIRED, MdAttributeBooleanInfo.TRUE);
        invalidMdAttr.apply();
    }
}
Also used : Universal(com.runwaysdk.system.gis.geo.Universal) ServerGeoObjectTypeConverter(net.geoprism.registry.conversion.ServerGeoObjectTypeConverter) ServerGeoObjectType(net.geoprism.registry.model.ServerGeoObjectType) MdGraphClassDAOIF(com.runwaysdk.dataaccess.MdGraphClassDAOIF) MdAttributeDAO(com.runwaysdk.dataaccess.metadata.MdAttributeDAO)

Aggregations

MdGraphClassDAOIF (com.runwaysdk.dataaccess.MdGraphClassDAOIF)1 MdAttributeDAO (com.runwaysdk.dataaccess.metadata.MdAttributeDAO)1 Universal (com.runwaysdk.system.gis.geo.Universal)1 ServerGeoObjectTypeConverter (net.geoprism.registry.conversion.ServerGeoObjectTypeConverter)1 ServerGeoObjectType (net.geoprism.registry.model.ServerGeoObjectType)1