@Capability public class AbstractBeliefsSubcapability { //-------- beliefs -------- @Belief public native String getString(); @Belief public native void setString(String s); }
for(Mapping mapping : acap.beliefmapping())
for(Mapping mapping : acap.beliefmapping())
@Capability public class TranslationCapability
@Capability public class TestCapability
@Capability public class TranslationCapability
/** * The translation agent e1. * * Using a capability. */ @Agent public class TranslationBDI { /** The agent. */ @AgentFeature protected IBDIAgentFeature bdiFeature; @Capability protected TranslationCapability capability = new TranslationCapability(); /** * The agent body. */ @AgentBody public void body() { String eword = "dog"; String gword = (String)bdiFeature.dispatchTopLevelGoal(capability.new Translate(eword)).get(); System.out.println("Translated: "+eword+" "+gword); } }
/** * Customer capability. */ @Agent public class CustomerBDI { //-------- attributes -------- /** The customer capability. */ @Capability(beliefmapping=@Mapping("money")) protected CustomerCapability cap = new CustomerCapability(); /** The money. */ @Belief protected double money = 100; }
@Capability protected MovementCapability movecapa = new MovementCapability();
@Capability public class AbstractBeliefsCapability @Capability(beliefmapping=@Mapping(value="string2", target="string")) protected AbstractBeliefsSubcapability capa = new AbstractBeliefsSubcapability();
@Capability(beliefmapping=@Mapping("money")) protected CustomerCapability customercap = new CustomerCapability(); @Capability(beliefmapping=@Mapping(value="money", target="money")) protected ShopCapa shopcap = new ShopCapa((String)agent.getComponentFeature(IArgumentsResultsFeature.class).getArguments().get("shopname"), (List<ItemInfo>)agent.getComponentFeature(IArgumentsResultsFeature.class).getArguments().get("catalog"));
protected IInternalAccess agent; @Capability protected TestCapability testcap = new TestCapability();
protected IBDIAgentFeature bdiFeature; @Capability(beliefmapping=@Mapping(value="wordtable")) protected TranslationCapability capa = new TranslationCapability();
@Capability(beliefmapping=@Mapping("money")) protected ShopCapa shopcap = new ShopCapa((String)agent.getComponentFeature(IArgumentsResultsFeature.class).getArguments().get("shopname"), (List<ItemInfo>)agent.getComponentFeature(IArgumentsResultsFeature.class).getArguments().get("catalog"));
@Capability @ProvidedServices(@ProvidedService(type=IShopService.class, // implementation=@Implementation(value=ShopService.class))) implementation=@Implementation(expression="new ShopService($pojocapa.getShopname())")))
@Capability @Plans(@Plan(trigger=@Trigger(goals={MovementCapa.Move.class}), body=@Body(MoveToLocationPlan.class))) @RequiredServices(@RequiredService(name="clockser", type=IClockService.class, binding=@Binding(scope=RequiredServiceInfo.SCOPE_PLATFORM)))
@Capability @Properties(@NameValue(name="componentviewer.viewerclass", value="\"jadex.bdi.examples.shop.CustomerViewerPanel\"")) @RequiredServices({
@Capability @Plans({ @Plan(trigger=@Trigger(goals={MovementCapability.Move.class, MovementCapability.Missionend.class}), body=@Body(MoveToLocationPlan.class)),
@Capability protected MovementCapa movecapa = new MovementCapa();
@Capability(beliefmapping={@Mapping(value="byteb", target="byte"), @Mapping(value="shortb", target="short"), @Mapping(value="intb", target="int"), @Mapping(value="longb", target="long"), @Mapping(value="floatb", target="float"), @Mapping(value="doubleb", target="double"),