예제 #1
0
 public DefaultDynClass(
     DynObjectManager manager, String name, String description, DynClass[] superClases) {
   this(manager, name, description);
   for (int i = 0; i < superClases.length; i++) {
     DynClass dynClass = superClases[i];
     if (!this.classes.containsKey(dynClass.getFullName())) {
       this.classes.put(dynClass.getFullName(), dynClass);
     }
   }
 }
예제 #2
0
  protected static void registerDynClass() {
    DynObjectManager dynman = ToolsLocator.getDynObjectManager();
    DynClass dynClass;
    DynField field;
    if (DYNCLASS == null) {

      DynClass dbfDynClass = DBFStoreProvider.DYNCLASS;
      dynClass = dynman.add(DYNCLASS_NAME);

      field = dynClass.addDynField(DYNFIELD_SRSORIGINALPARAMETERS_NAME);
      field.setType(DataTypes.STRING);
      field.setDescription("SRS original parameters");

      // The SHP store parameters extend the DBF store parameters
      dynClass.extend(dbfDynClass);

      DYNCLASS = dynClass;
    }
  }
예제 #3
0
 public boolean isInstance(DynObject dynObject) {
   if (this.superClassesMap == null) {
     consolide();
   }
   DefaultDynClass objClass = (DefaultDynClass) dynObject.getDynClass();
   if (this.superClassesMap.containsKey(objClass.getFullName())) {
     return true;
   }
   if (this.getFullName().equals(objClass.getFullName())) {
     return true;
   }
   if (objClass.isAnonymous) {
     Iterator it = objClass.classes.values().iterator();
     while (it.hasNext()) {
       DynClass dc = (DynClass) it.next();
       if (this.superClassesMap.containsKey(dc.getFullName())) {
         return true;
       }
     }
   }
   return false;
 }