Hi Claude,

There is:

    ModelFactory.createDefaultModel()

which returns a Model API compatible model.

The ModelFactory gives the choice:

    ModelFactory.createModelSameTerm
    ModelFactory.createModelSameValue

createModelSameTerm is better (the rest of Jena is "same term") unless you want the java-type support of "same value".

"same value" semantics - "1"^^xsd:int equals "+01"^^xsd:int

All ModelFactory are memory models.



How old is the code?

The deprecation says "forRemoval=true" and "org.apache.jena.ontapi." - which is in the module jena-ontapi

jena-ontapi, which covers OWL2. It is a replacement for org.apache.jena.ontology (in jena-core) which is only OWL1.

    Andy

On 16/08/2026 18:21, Claude Warren wrote:
... and I found that ModelFactory.createMemModelMaker() is deprecated and
the deprecated message does not help much.

I figured out that to build an in-memory model I need to execute

new ModelMakerImpl(new SimpleGraphMaker())..createDefaultModel();

Is there an easier way to do this?  Is there a reason that there is not a

ModelFactory.createMemModel() method?

If there is no reason I am happy to put together a PR to add that.

Claude


Reply via email to