//------------------------------------------------------------------------------- // This package was automatically generated from EXPRESS (ISO STEP 10303 part11) // by a java generator build with the meta CASE tool Platypus // (alain.plantec@univ-brest.fr) // // Please, be aware that any hand-made updating of this file can be lost!!. //------------------------------------------------------------------------------- package CheddarBridge; import java.util.*; import java.io.*; import step.core.*; class Generic_MessageStepRW extends Generic_ObjectStepRW { public step.core.StepCoreObject coreObject() { return new Generic_Message(); } public String entityName() { return Generic_Message.EntityName(); } public Messages_Type getMessageType(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 2); return Messages_Type.fromString((String) convertedStepValue(repo, stepVal)); } public Integer getX(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 3); return (Integer) convertedStepValue(repo, stepVal); } public Integer getY(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 4); return (Integer) convertedStepValue(repo, stepVal); } public ArrayList getParam(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 5); return (ArrayList) convertedStepValue(repo, stepVal); } public Integer getDeadline(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 6); return (Integer) convertedStepValue(repo, stepVal); } public Integer getSize(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 7); return (Integer) convertedStepValue(repo, stepVal); } public Integer getResponseTime(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 8); return (Integer) convertedStepValue(repo, stepVal); } public Integer getCommunicationTime(StepCoreRepository repo, StepInternalRepresentation si) throws Exception { ArrayList values = si.getValues(); StepValue stepVal = values.get( 9); return (Integer) convertedStepValue(repo, stepVal); } public void initializeCoreObject(StepCoreRepository repo, step.core.StepCoreObject coreObj, StepGenericInstance si) throws Exception { super.initializeCoreObject(repo, coreObj, si); Generic_Message obj = (Generic_Message) coreObj; obj.setMessageType(getMessageType(repo, (StepInternalRepresentation) si)); obj.setX(getX(repo, (StepInternalRepresentation) si)); obj.setY(getY(repo, (StepInternalRepresentation) si)); obj.setParam(getParam(repo, (StepInternalRepresentation) si)); obj.setDeadline(getDeadline(repo, (StepInternalRepresentation) si)); obj.setSize(getSize(repo, (StepInternalRepresentation) si)); obj.setResponseTime(getResponseTime(repo, (StepInternalRepresentation) si)); obj.setCommunicationTime(getCommunicationTime(repo, (StepInternalRepresentation) si)); } public StepGenericInstance genericInstance(StepCoreRepository crepo, step.core.StepCoreObject coreObj) throws Exception { StepInternalRepresentation si = (StepInternalRepresentation) super.genericInstance(crepo, coreObj); Generic_Message obj = (Generic_Message) coreObj; si.add(stepValueOf(crepo, obj.getMessageType())); si.add(stepValueOf(crepo, obj.getX())); si.add(stepValueOf(crepo, obj.getY())); si.add(stepValueOf(crepo, obj.getParam())); si.add(stepValueOf(crepo, obj.getDeadline())); si.add(stepValueOf(crepo, obj.getSize())); si.add(stepValueOf(crepo, obj.getResponseTime())); si.add(stepValueOf(crepo, obj.getCommunicationTime())); return si; } }