NU IT
Northwestern University Information Technology
MorphAdorner Northwestern
 
MorphAdorner Server Services: Apply changes to adorned file service

Service name: teiapplychangestoadornedfile
Service description: Apply changes from change log to an adorned file.
HTTP methods allowed: POST, OPTIONS
POST accepts as input: application/x-www-form-urlencoded
HTTP return codes: 200: service succeeded
400: service failed with an error

Query parameters

    media Result format. Only xml allowed.
    origadornedfile Original adorned TEI XML file.
    changelogfile Change log file.
    revertChanges Revert changes specified in a MorphAdorner change log file. Allowed values are true to revert changes or false to apply the changes.

Sample POST form

<form accept-charset="UTF-8" method="post"
      action="teiapplychangestoadornedfile"
      target="_blank"
      enctype="multipart/form-data" name="teiapplychanges">
<table cellpadding="0" cellspacing="5">
<tr>
<td>
<strong>Original adorned TEI XML file:</strong>
</td>
<td>
<input type="file" name="origadornedfile" size="50">
</td>
</tr>
<tr>
<td>
<strong>XML change log file:</strong>
</td>
<td>
<input type="file" name="changelogfile" size="50">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="checkbox" name="revertChanges" value="true" />
Revert changes
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="checkbox" name="resultsAsAttachedFile" value="true"
       checked="checked"/>
Send results as attached file
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="applychanges" value="Apply Changes" />
</td>
</tr>
</table>
</form>

Output

A source adorned or tokenized TEI XML file specified by origadornedfile is updated or downdated by applying changes specified in a MorphAdorner change log file specified by changelogfile. If revertChanges is false, the changes in the change log file are applied to update the source file. If revertChanges is true, the changes are reverted to downdate the source file. The resultant modified file is returned either as an attached file if resultsAsAttachedFile is true or as an XML stream if resultsAsAttachedFile is false. This service produces the same output as the UpdateAdornedFile utility. The change log format is provided in the description of the CompareAdornedFiles utility.

Home
 
Announcements and News
 
Documentation
 
Download MorphAdorner
 
Glossary
 
Helpful References
 
Licenses
 
Server
 
Talks
 
Tech Talk