* 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;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
-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 {@link YinTextSchemaSource} backed by a file.
- *
- * @author Robert Varga
+ * A {@link YinTextSource} backed by a file.
*/
-final class YinTextFileSchemaSource extends YinTextSchemaSource implements Delegator<Path> {
+final class YinTextFileSource extends YinTextSource implements Delegator<Path> {
private final @NonNull Path path;
- YinTextFileSchemaSource(final @NonNull SourceIdentifier identifier, final @NonNull Path path) {
- super(identifier);
+ YinTextFileSource(final @NonNull SourceIdentifier sourceId, final @NonNull Path path) {
+ super(sourceId);
this.path = requireNonNull(path);
}
}
@Override
- public Optional<String> getSymbolicName() {
- return Optional.of(path.toString());
+ public String symbolicName() {
+ return path.toString();
}
}