package com.smtaiserver.smtaiserver.gismap;
|
|
import java.util.HashMap;
|
import java.util.Map;
|
|
import com.smtaiserver.smtaiserver.database.SMTDatabase.DBRecord;
|
|
public class SMTMapOtypeDef
|
{
|
private String _OTYPE;
|
private String _title;
|
private Map<String, SMTMapVPropDef> _mapId2VPropDef = new HashMap<>();
|
|
public SMTMapOtypeDef(DBRecord rec) throws Exception
|
{
|
_OTYPE = rec.getString("otype");
|
_title = rec.getString("title");
|
}
|
|
public String getOTYPE()
|
{
|
return _OTYPE;
|
}
|
|
public String getTitle()
|
{
|
return _title;
|
}
|
|
public void addVPropDef(DBRecord rec) throws Exception
|
{
|
SMTMapVPropDef vpropDef = new SMTMapVPropDef(this, rec);
|
_mapId2VPropDef.put(vpropDef.getVPROP(), vpropDef);
|
}
|
|
public Map<String, SMTMapVPropDef> getVPropDefMap()
|
{
|
return _mapId2VPropDef;
|
}
|
|
public SMTMapVPropDef getVPropDef(String VPROP) throws Exception
|
{
|
SMTMapVPropDef VPropDef = _mapId2VPropDef.get(VPROP);
|
if(VPropDef == null)
|
throw new Exception("can't get VPROP : " + _OTYPE + "." + VPROP);
|
return VPropDef;
|
}
|
}
|