Java 类org.simpleframework.xml.core.Commit 实例源码

项目:healthvault-java-sdk    文件:GetAuthorizedPeopleResponseResults.java   
@Commit
private void FixupRecordPersonIds() {
    for (PersonInfo pi : getPersonInfoList()) {
        String personId = pi.getPersonId();

        for (Record r : pi.getRecords()) {
            r.setPersonId(personId);
        }
    }
}
项目:c2mon    文件:ProcessConfiguration.java   
/**
 * This function is called by SimpleXML after deserialisation in order to
 * recreate the map of equipment cofngiurations from the list.
 */
@Commit
public void build() {
  for (EquipmentConfiguration configuration : equipmentConfigurationList) {
    equipmentConfigurations.put(configuration.getId(), configuration);
  }
}
项目:Holodeck-B2B    文件:PMode.java   
/**
 * Is responsible for solving dependencies child elements/objects may have on the P-Mode id. Currently this applies
 * to the identification of the delivery specifications included in the P-Mode. Because the Holodeck B2B Core
 * requires each delivery specification to have a unique id to enable reuse each delivery specification included in
 * the P-Mode is given an id combined of the P-Mode id, current time and type of delivery, for example the default
 * delivery specification defined on the Leg will have «P-Mode id»+"-"+«hhmmss» +"-defaultDelivery" as id.
 * <p>The objects containing the {@link DeliverySpecification}s are responsible for including these in the given
 * <code>Map</code> using the type of delivery as key and the object as value.
 *
 * @param dependencies  A <code>Map</code> containing all {@link DeliverySpecification} objects that have to be
 *                      assigned an id. The key of the entry MUST be a <code>String</code> containing the type
 *                      of delivery, e.g. "defaultDelivery".
 */
@Commit
public void solveDepencies(final Map dependencies) {
    if (dependencies == null)
        return;

    for(final Object k : dependencies.keySet()) {
        final Object dep = dependencies.get(k);
        if (k instanceof String && dep != null && dep instanceof DeliverySpecification)
            ((DeliverySpecification) dep).setId(this.pmodeId.id
                                                + "-" + new SimpleDateFormat("HHmmss").format(new Date())
                                                + "-" + k);
    }
}
项目:Holodeck-B2B    文件:Leg.java   
/**
 * This method ensures that the {@link DeliverySpecification} for the default delivery method gets an unique id
 * based on the P-Mode id. Because we do not know the P-Mode id here we use the <i>commit</i> functionality of the
 * Simple framework (see <a href="http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php#state">
 * http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php#state</a>). We put the <code>
 * defaultDelivery</code> object in the deserialization session so {@link PMode#solveDepencies(java.util.Map)} can
 * set the id using the P-Mode id.
 *
 * @param dependencies The Simple session object.
 */
@Commit
public void setDepency(final Map dependencies) {
    if (defaultDelivery != null) {
        // Because multiple DefaultDelivery elements can exist in the P-Mode document when we enable Two-Way MEPs,
        // we make sure it get a unique id
        int i = 0;
        while (dependencies.containsKey("DefaultDelivery-" + i)) i++;
        dependencies.put("DefaultDelivery-"+i, defaultDelivery);
    }
}
项目:Holodeck-B2B    文件:ReceiptConfiguration.java   
/**
 * This method ensures that the {@link DeliverySpecification} for the receipt delivery method gets an unique id
 * based on the P-Mode id. Because we do not know the P-Mode id here we use the <i>commit</i> functionality of the
 * Simple framework (see <a href="http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php#state">
 * http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php#state</a>). We put the <code>
 * receiptDelivery</code> object in the deserialization session so {@link PMode#solveDepencies(java.util.Map)} can
 * set the id using the P-Mode id.
 *
 * @param dependencies The Simple session object.
 */
@Commit
public void setDepency(final Map dependencies) {
    if (receiptDelivery != null) {
        // Because multiple ReceiptDelivery elements can exist in the P-Mode document when we enable Two-Way MEPs,
        // we make sure it get a unique id
        int i = 0;
        while (dependencies.containsKey("ReceiptDelivery-" + i)) i++;
        dependencies.put("ReceiptDelivery-"+i, receiptDelivery);
    }
}
项目:angerona-framework    文件:DefendingSituation.java   
@Commit
public void build() throws PersistenceException {
    for(Behavior behavior : allowedBehaviors) {
        behavior.question = questionMap.get(behavior.questionId);
    }

    for(AdditionalInformation ai : additionalInformation) {
        ai.behavior = behaviorMap.get(ai.behaviorId);
    }

    super.build();
}
项目:angerona-framework    文件:Situation.java   
@Commit
public void build() throws PersistenceException {
    try {
        if(filenameBackgroundProgram != null) {
            backgroundKnowledge = ASPParser.parseProgram(new FileReader(filenameBackgroundProgram));
        }
    } catch (FileNotFoundException | ParseException e) {
        throw new PersistenceException("Cannot parse background program in '" + filenameBackgroundProgram + "' - " + e.getMessage());
    }

}
项目:angerona-framework    文件:Action.java   
@Commit
public void onDeserialization() {
    AngeronaEnvironment sim = Angerona.getInstance().getActualSimulation();
    if(sim != null) {
        setAgent(sim.getAgentByName(sender));
    }
}
项目:angerona-framework    文件:SimulationConfiguration.java   
@Commit
public void commit() {
    for(AgentInstance ai : agents) {
        for(String viewedAgent : ai.fileViewMap.keySet()) {
            File f = ai.fileViewMap.get(viewedAgent);
            BeliefbaseConfigReal conf = SerializeHelper.get().loadXmlTry(
                    BeliefbaseConfigReal.class, f);
            ai.realViewMap.put(viewedAgent, conf);
        }
    }
}
项目:angerona-framework    文件:BeliefbaseConfigReal.java   
@Commit
protected void createOperationTypes() {
    // extract operation type from element name...
    ((OperationSetConfigReal)reasonerOperators).operationType = BaseReasoner.OPERATION_TYPE;
    ((OperationSetConfigReal)changeOperators).operationType = BaseChangeBeliefs.OPERATION_TYPE;
    ((OperationSetConfigReal)this.translators).operationType = BaseTranslator.OPERATION_TYPE;
}
项目:healthvault-java-sdk    文件:Thing2.java   
@Commit
private void fixUpInternalThingReference() {
    dataXml.getAny().setThing(this);
}
项目:simplexml    文件:ContextualCallbackTest.java   
@Commit
public void commit(Map map) {
   if(validated) {              
      committed = true;              
   }            
}
项目:simplexml    文件:InjectionTest.java   
@Commit
private void prepare() {
   if(trim) {
      text = text.trim();
   }
}
项目:simplexml    文件:TemplateTest.java   
@Commit
public void commit(Map map) {
   map.put(name, value);              
}
项目:Holodeck-B2B    文件:ReceptionAwareness.java   
/**
 * Is a helper to construct the {@link Interval} object. Uses the commit function of the Simple framework.
 */
@Commit
public void calculateInterval() {
    retryInterval = new Interval(retryIntervalDuration, TimeUnit.SECONDS);
}
项目:taskcoach-android    文件:TaskDescription.java   
@Commit
public void build() {
    MyApplication.d(LOG_TAG + "build() description [" + description + "]");
}
项目:simple-xml    文件:ContextualCallbackTest.java   
@Commit
public void commit(Map map) {
   if(validated) {              
      committed = true;              
   }            
}
项目:simple-xml    文件:InjectionTest.java   
@Commit
private void prepare() {
   if(trim) {
      text = text.trim();
   }
}
项目:simple-xml    文件:TemplateTest.java   
@Commit
public void commit(Map map) {
   map.put(name, value);              
}
项目:Holodeck-B2B    文件:ErrorHandling.java   
/**
 * This method ensures that the {@link DeliverySpecification} for the error delivery method gets an unique id
 * based on the P-Mode id. Because we do not know the P-Mode id here we use the <i>commit</i> functionality of the
 * Simple framework (see <a href="http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php#state">
 * http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php#state</a>). We put the <code>
 * errorDelivery</code> object in the deserialization session so {@link PMode#solveDepencies(java.util.Map)} can
 * set the id using the P-Mode id.
 *
 * @param dependencies The Simple session object.
 */
@Commit
public void setDepency(final Map dependencies) {
    if (errorDelivery != null) {
        // Because multiple ErrorDelivery elements can exist in the P-Mode document we make sure it get a unique id
        int i = 0;
        while (dependencies.containsKey("ErrorDelivery-" + i)) i++;
        dependencies.put("ErrorDelivery-"+i, errorDelivery);
    }
}