Skip to content

Commit

Permalink
Deprecate EMLParser, use EMLValidator instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbjones committed Feb 3, 2019
1 parent 4dbbb15 commit 200ec42
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Binary file modified lib/eml.jar
Binary file not shown.
18 changes: 16 additions & 2 deletions src/main/java/org/ecoinformatics/eml/EMLParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,16 @@


/**
* This is a SAX parser to validate EML packages. This parser will validate
* an EML package with references based on the following rules:
* This is a parser to validate EML packages. It iss deprecated as of EML
* 2.2.0, for which users hsould use EMLValidator.validate() instead.
* This parser will validate all EML 2.2.0 and later documents by delegating
* to EMLValidator.validate(). For earlier EML versions, it uses the older
* validation logic in EMLParser, which does not fully implement all of the
* EML validation rules. This old behavior was kept in the interest of
* backwardsss compatibility, and any new documents should be validated using
* EMLValidator.validate().
* This EMLParser implementation tries to validate an EML package with references
* based on the following rules (but has bugs, see above):
* <ul>
* <li>
* If a user wants to reuse content to indicate the repetition of an object,
Expand Down Expand Up @@ -104,7 +112,9 @@ public class EMLParser {
/**
* parses an eml file
* @param xml the eml file to parse
* @deprecated use EMLValidator.validate() instead
*/
@Deprecated
public EMLParser(File xml) {
this(xml, null);
}
Expand All @@ -113,7 +123,9 @@ public EMLParser(File xml) {
* parses an eml file with an alternate configuration
* @param xml the eml file to parse
* @param configFile the alternate config file to use
* @deprecated use EMLValidator.validate() instead
*/
@Deprecated
public EMLParser(File xml, File configFile) throws EMLParserException {
this.xml = xml;
try {
Expand Down Expand Up @@ -150,7 +162,9 @@ public EMLParser(File xml, File configFile) throws EMLParserException {
/**
* parses an eml document as a String
* @param xmlString the xml to parse
* @deprecated use EMLValidator.validate() instead
*/
@Deprecated
public EMLParser(String xmlString) throws EMLParserException, IOException {
if (xmlString == null || xmlString.equals("")) {
throw new EMLParserException("The EML string to be parsed is null or empty.");
Expand Down

0 comments on commit 200ec42

Please sign in to comment.