コード例 #1
0
 public void testHeritageMultiple() {
   Cache cache = initWorkingSpace();
   Type vehicle = cache.addType("Vehicle");
   Type human = cache.addType("Human");
   vehicle.addSubType("Transformer", new Generic[] {human});
   closingWorkingSpace(cache);
 }
コード例 #2
0
 public void testCustomTypeAndItsInstance() {
   Cache cache = initWorkingSpace();
   Type vehicle = cache.addType("Vehicle");
   Attribute equipment = vehicle.setAttribute("Equipment");
   Generic myVehicle = vehicle.addInstance("myVehicle");
   myVehicle.setValue(equipment, "ABS");
   closingWorkingSpace(cache);
 }
コード例 #3
0
 public void testLink() {
   Cache cache = initWorkingSpace();
   Type vehicle = cache.addType("Vehicle");
   Type color = cache.addType("Color");
   Relation vehicleColor = vehicle.setRelation("VehicleColor", color);
   Generic myVehicle = vehicle.addInstance("myVehicle");
   Generic red = color.addInstance("red");
   myVehicle.setLink(vehicleColor, "myVehicleRed", red);
   closingWorkingSpace(cache);
 }
コード例 #4
0
 public void testAddAndRemove() {
   Cache cache = initWorkingSpace();
   Type vehicle = cache.addType("Vehicle");
   Type car = vehicle.addSubType("Car");
   Type truck = vehicle.addSubType("Truck");
   truck.addSubType("Van");
   car.remove();
   closingWorkingSpace(cache);
 }
コード例 #5
0
 public void testHeritage() {
   Cache cache = initWorkingSpace();
   Type vehicle = cache.addType("Vehicle");
   vehicle.addSubType("Car");
   closingWorkingSpace(cache);
 }