Fork me on GitHub
#rdf
<
2023-01-27
>
Kelvin15:01:37

Working with Jena again…is there no way to turn an XSDDateTime (or another other XSD date/time instance) into a Java Instant?

Kelvin15:01:53

At least not directly…you can do it this roundabout way:

(.toInstant (.asCalendar date-time))

Kelvin15:01:58

But it seems like an oversight regardless

quoll16:01:14

It’s the Java way 🙂

Eric Scott18:01:59

Shouldn't there be some kind of factory class here?

Kelvin18:01:32

Eh you can assume that I defined date-time elsewhere

Eric Scott19:01:20

Sorry, should've marked that as a joke. 🙂

😁 2
quoll19:01:40

> Shouldn’t there be some kind of factory class here? You get that from the FactoryFactory class

curtosis19:01:22

You could also just reify AbstractFactoryAbstractFactory.

👍 4
Kelvin14:01:02

…and that’s how Enterprise FizzBuzz is born

quoll14:01:28

I feel like I’m being nerd sniped into an implementation that uses a FizzBuzzFactoryFactory to dispatch to either a FizzFactory, a BuzzFactory, or a FizzBuzzFactory, which then instantiates a FizzInterface, a BuzzInterface, or an extension of both that implements both interfaces, and then calls the parent AbstractFizz or AbstractBuzz…

😄 2