Promote SchemaSourceRepresentation
[yangtools.git] / model / yang-model-spi / src / main / java / org / opendaylight / yangtools / yang / model / spi / source / ResourceYangTextSource.java
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.yangtools.yang.model.repo.api;
+package org.opendaylight.yangtools.yang.model.spi.source;
 
 import static java.util.Objects.requireNonNull;
 
@@ -15,19 +15,19 @@ import java.io.InputStreamReader;
 import java.io.Reader;
 import java.net.URL;
 import java.nio.charset.Charset;
-import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.concepts.Delegator;
+import org.opendaylight.yangtools.yang.model.api.source.SourceIdentifier;
 
 /**
- * A resource-backed {@link YinTextSchemaSource}.
+ * A resource-backed {@link YangTextSource}.
  */
-final class ResourceYangTextSchemaSource extends YangTextSchemaSource implements Delegator<URL> {
+final class ResourceYangTextSource extends YangTextSource implements Delegator<URL> {
     private final @NonNull URL url;
     private final @NonNull Charset charset;
 
-    ResourceYangTextSchemaSource(final SourceIdentifier identifier, final URL url, final Charset charset) {
-        super(identifier);
+    ResourceYangTextSource(final SourceIdentifier sourceId, final URL url, final Charset charset) {
+        super(sourceId);
         this.url = requireNonNull(url);
         this.charset = requireNonNull(charset);
     }
@@ -48,7 +48,7 @@ final class ResourceYangTextSchemaSource extends YangTextSchemaSource implements
     }
 
     @Override
-    public Optional<String> getSymbolicName() {
-        return Optional.of(url.toString());
+    public String symbolicName() {
+        return url.toString();
     }
 }