Skip to content

Commit 64767f3

Browse files
committed
Rename YAMLLoader to ObjectLoader.
The YAMLLoader helper object is no longer limited to YAML, so we rename it to ObjectLoader to reflect that. It still remains somewhat misnamed though, since it is both a "loader" and a "dumper". Oh well, in a sense "dumping" is the same thing as "loading", merely in a different direction. :)
1 parent 23b7fb2 commit 64767f3

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ once you have generated the corresponding code, you can read an instance
5252
of `Foo` from a YAML file as follows:
5353

5454
```java
55-
YAMLLoader loader = new YAMLLoader();
55+
ObjectLoader loader = new ObjectLoader();
5656
Foo foo = loader.loadObject(new File("foo.yaml"), Foo.class);
5757
```
5858

core/src/main/java/org/incenp/linkml/core/YAMLLoader.java renamed to core/src/main/java/org/incenp/linkml/core/ObjectLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
* For now this is merely a thin wrapper around both Jackson’s ObjectMapper and
5454
* our own {@link ConverterContext}.
5555
*/
56-
public class YAMLLoader {
56+
public class ObjectLoader {
5757

5858
private ConverterContext ctx = new ConverterContext();
5959
private final ObjectMapper mapper = new ObjectMapper();

core/src/site/markdown/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Assuming you have a schema that defines a _Foo_ class, you can for
4141
example load an instance of that class from a YAML file as follows:
4242

4343
```java
44-
import org.incenp.linkml.core.YAMLLoader;
44+
import org.incenp.linkml.core.ObjectLoader;
4545
import org.incenp.linkml.core LinkMLRuntimeException;
4646

47-
YAMLLoader loader = new YAMLLoader();
47+
ObjectLoader loader = new ObjectLoader();
4848
try {
4949
Foo foo = loader.loadObject(new File("foo.yaml"), Foo.class);
5050
} catch ( IOException e ) {
@@ -80,4 +80,3 @@ In particular, the LinkML-Java runtime brings support for
8080
* dereferencing global objects;
8181
8282
* the various forms of [inlining](https://linkml.io/linkml/schemas/inlining.html).
83-

core/src/test/java/org/incenp/linkml/core/YAMLLoaderTest.java renamed to core/src/test/java/org/incenp/linkml/core/ObjectLoaderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
import org.junit.jupiter.api.Assertions;
4646
import org.junit.jupiter.api.Test;
4747

48-
public class YAMLLoaderTest {
48+
public class ObjectLoaderTest {
4949

50-
private YAMLLoader loader = new YAMLLoader();
50+
private ObjectLoader loader = new ObjectLoader();
5151

5252
@Test
5353
void testReadingSimpleClass() throws IOException, LinkMLRuntimeException {

0 commit comments

Comments
 (0)