Hi,
ModelCom has the following createResource methods:
Resource createResource()
Create a new anonymous resource whose model is this model.
Resource createResource(AnonId id)
Create a blank node resource with a specified identifier.
Resource createResource(Resource type)
Create a new anonymous resource with a given type.
Resource createResource(String uri)
Create a new resource associated with this model.
Resource createResource(String uri, Resource type)
Create a new resource with a given type.
I incorrectly used createResource(Resource) to create a resource in my
model. No big deal this, but may I suggest to rename
Resource createResource(Resource type)
Resource createResource(String uri, Resource type)
to createTypedResource to avoid confusion?
The reason I use createResource(Resource) to create the Resource "in my"
model is that I need to as(Property.class) cast it, which this gives me
a UnsupportedPolymorphismException if the resource exists without a
model. Now I use createResource(Resource.toURI())
Martin