vocabulary - Some Jena vocabs use 'ResourceFactory.createProperty()' while others use 'ModelFactory.createDefaultModel().createProperty()' -
i'm new jena, when @ vocabularies defined jena source (i.e. in directory: jena-2.10.0-source\jena-core\src\main\java\com\hp\hpl\jena\vocabulary
) see of vocabularies create properties , resources using 'resourcefactory.createproperty()'
(e.g. owl2.java, rdf.java, rdfs.java), whereas others in same directory use 'modelfactory.createdefaultmodel().createproperty()'
(e.g. dc_11.java, vcard.java, dcterms.java).
i understand resourcefactory used create resources , properties without reference 'model'
, want understand why of these vocabs choose create , use 'model'
instance while others choose not to.
is personal style, or 1 approach recommended on other (maybe 1 style 'old approach', understand jena has been around long time)?
i'd use both rdfs , dc_11 vocabs code, , define own app-specific resources , properties, i'm trying understand approach should adopt own stuff.
that both styles used historical accident. think these days, i'd suggest using resourcefactory
approach, because avoids (small) overhead of allocating model, , model gives no real advantages. @ point, we'll go , refactoring use single approach in jena codebase.
Comments
Post a Comment