jena-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Budinsky <fra...@ca.ibm.com>
Subject vocabulary class pattern
Date Sun, 06 Feb 2011 15:42:52 GMT

Hi,

I noticed that there are two different patterns being used for classes in
the jena.vocabulary package.

Class RDF, for example, creates the Property and Resource objects using
ResourceFactory static methods:

    ResourceFactory.createResource( uri + local );
    ResourceFactory.createProperty( uri, local );

Class DCTerms, on the other hand, creates a default model and uses it to
create them. For example:

    m_model.createProperty( "http://purl.org/dc/terms/accrualMethod" );

Is there a reason why these classes do it differently, and if so, is one
pattern better than the other if I want to create a similar class for my
own model?

Thanks,
Frank.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message