BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-api / src / main / java / org / opendaylight / yangtools / yang / model / parser / api / YangContextParser.java
index e024bee53b6d894f927dab9f136982802b932001..7c1b4dcb273c8175035c3d942feed91feecd8ee5 100644 (file)
@@ -14,9 +14,12 @@ import java.util.Collection;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 /**
- * Parse yang models and convert data to SchemaContext.
+ * Parse YANG models and convert data to SchemaContext.
  *
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.model.repo.api.SchemaContextFactory} and related classes
+ *             instead.
  */
+@Deprecated
 public interface YangContextParser extends YangModelParser {
 
     /**
@@ -30,7 +33,7 @@ public interface YangContextParser extends YangModelParser {
      *         only module parsed from yangFile and modules which yangFile needs
      *         as dependencies.
      */
-    SchemaContext parseFile(final File yangFile, final File dependenciesDirectory) throws IOException;
+    SchemaContext parseFile(final File yangFile, final File dependenciesDirectory) throws IOException, YangSyntaxErrorException;
 
     /**
      * Parse one or more Yang model files and return the definitions of Yang
@@ -57,7 +60,7 @@ public interface YangContextParser extends YangModelParser {
      *            SchemaContext containing already parsed yang models
      * @return parsed data as SchemaContext
      */
-    SchemaContext parseFiles(final Collection<File> yangFiles, final SchemaContext context) throws IOException;
+    SchemaContext parseFiles(final Collection<File> yangFiles, final SchemaContext context) throws IOException, YangSyntaxErrorException;
 
     /**
      * Parse one or more Yang model streams and return the definitions of Yang
@@ -69,7 +72,7 @@ public interface YangContextParser extends YangModelParser {
      *            yang streams to parse
      * @return parsed data as SchemaContext
      */
-    SchemaContext parseSources(final Collection<ByteSource> sources) throws IOException;
+    SchemaContext parseSources(final Collection<ByteSource> sources) throws IOException, YangSyntaxErrorException;
 
     /**
      * Parse one or more Yang model streams and return the definitions of Yang
@@ -84,6 +87,6 @@ public interface YangContextParser extends YangModelParser {
      *            SchemaContext containing already parsed yang models
      * @return parsed data as SchemaContext
      */
-    SchemaContext parseSources(final Collection<ByteSource> sources, final SchemaContext context) throws IOException;
+    SchemaContext parseSources(final Collection<ByteSource> sources, final SchemaContext context) throws IOException, YangSyntaxErrorException;
 
 }