Class TurtleLoader
- java.lang.Object
-
- io.openmanufacturing.sds.aspectmodel.resolver.services.TurtleLoader
-
public final class TurtleLoader extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.vavr.control.Try<org.apache.jena.rdf.model.Model>loadTurtle(InputStream inputStream)Loads a Turtle model from an input streamstatic InputStreamopenUrl(URL url)Opens an URL and returns its InputStream, but does not throw a checked exception.
-
-
-
Method Detail
-
loadTurtle
public static io.vavr.control.Try<org.apache.jena.rdf.model.Model> loadTurtle(@Nullable InputStream inputStream)Loads a Turtle model from an input stream- Parameters:
inputStream- The input stream- Returns:
- The model on success, a corresponding exception otherwise
-
openUrl
public static InputStream openUrl(URL url)
Opens an URL and returns its InputStream, but does not throw a checked exception.- Parameters:
url- The URL to open- Returns:
- The InputStream on success
- Throws:
IllegalArgumentException- if anIOExceptionoccurs
-
-