use of com.runwaysdk.system.metadata.MdVertex in project geoprism-registry by terraframe.
the class BusinessType method getAttributeMap.
public Map<String, AttributeType> getAttributeMap() {
AttributeTypeConverter converter = new AttributeTypeConverter();
MdVertexDAOIF mdVertex = this.getMdVertexDAO();
return mdVertex.definesAttributes().stream().filter(attr -> {
return !attr.isSystem() && !attr.definesAttribute().equals(BusinessType.SEQ) && !attr.definesAttribute().equals(BusinessType.GEO_OBJECT);
}).map(attr -> converter.build(attr)).collect(Collectors.toMap(AttributeType::getName, attr -> attr));
}
use of com.runwaysdk.system.metadata.MdVertex in project geoprism-registry by terraframe.
the class BusinessType method delete.
@Override
@Transaction
public void delete() {
MdVertex mdVertex = this.getMdVertex();
super.delete();
mdVertex.delete();
}
use of com.runwaysdk.system.metadata.MdVertex in project geoprism-registry by terraframe.
the class VertexServerGeoObject method findTypeOfGeoObjectCode.
/**
* Finds the ServerGeoObjectType associated with the particular Geo-Object
* code.
*
* @return
*/
public static ServerGeoObjectType findTypeOfGeoObjectCode(String code) {
StringBuilder statement = new StringBuilder();
statement.append("SELECT @class FROM geo_vertex WHERE code=:code");
GraphQuery<String> query = new GraphQuery<String>(statement.toString());
query.setParameter("code", code);
String className = query.getSingleResult();
MdVertexQuery mvq = new MdVertexQuery(new QueryFactory());
mvq.WHERE(mvq.getDbClassName().EQ(className));
MdVertex mdVertex = mvq.getIterator().getAll().get(0);
ServerGeoObjectType foundType = ServerGeoObjectType.get(MdGeoVertexDAO.get(mdVertex.getOid()));
return foundType;
}
Aggregations