v8.0.0
RDF module renamed (#616)
ActiveFedora::Rdf
has been renamed to ActiveFedora::RDF
. Deprecated submodules of ActiveFedora::Rdf
have been removed (see below). For the most part, this is a transparent change, since classes like ActiveFedora::RDFDatastream
do not use the ActiveFedora::RDF
namespace.
Fcrepo3 and ProjectHydra RDF vocabularies added (#616)
ActiveFedora::RDF::Fcrepo
module contains RDF vocabulary class for Fedora 3. Cf. https://github.com/fcrepo3/fcrepo/blob/master/fcrepo-server/src/main/resources/rdfs/fedora_relsext_ontology.rdfs.ActiveFedora::RDF::ProjectHydra
is an RDF vocabulary for custom ActiveFedora/Hydra relations predicates (e.g.,http://projecthydra.org/ns/relations#isGovernedBy
)
Change to RDFDatastream resource class implementation (#500)
ActiveFedora::Rdf::ObjectResource
was removed in favor of permitting an RDFDatastream to use any ActiveTriples::Resource
subclass as its resource class, provided that it includes ActiveFedora::RDF::Persistence
.
If you have overridden #resource_class
in your RDF datastream subclass, you should change your resource class from:
class MyDatastreamResource < ActiveFedora::Rdf::Resource
# stuff
end
to:
class MyDatastreamResource < ActiveTriples::Resource
include ActiveFedora::RDF::Persistence
# stuff
end
AND, in your datastream, change:
class MyRDFDatastream < NtriplesRDFDatastream # or, < RdfxmlRDFDatastream
def resource_class
MyDatastreamResource
end
end
to:
class MyRDFDatastream < NtriplesRDFDatastream # or, < RdfxmlRDFDatastream
resource_class MyDatastreamResource
end
Change NtriplesRDFDatastream.config to NtriplesRDFDatastream.properties
Change to default datastream "prefix" (prepended to solr field names):
ActiveFedora::Datastream#prefix
returns"#{dsid.underscore}__"
by default (was empty string) -- e.g."desc_metadata__"
for dsid"descMetadata"
. In AF 7.x a deprecation warning prompted overriding of#prefix
to maintain the 7.x behavior (no prefix) in version 8. If you chose to override#prefix
to implement the version 8 behavior, you should be able to remove the override.
Change to attribute setters
The previous (deprecated) behavior permitted attribute setters to receive arrays or scalar regardless of their definitions as "multiple" or "unique" (multiple: false
). The new behavior required the sent value to conform to the attribute definition:
- The setter for an attribute defined with
multiple: true
raisesArgumentError
when given a scalar value:
has_attributes :title, datastream: "descMetadata", multiple: true
obj.title = "Test" # => ArgumentError
obj.title = ["Test"] # OK
- The setter for an attribute defined with
multiple: false
(a.k.a. "unique") raisesArgumentError
when given an enumerable value (Array):
has_attributes :description, datastream: "descMetadata", multiple: false
obj.description = ["Testing ActiveFedora 8.0.0"] # => ArgumentError
obj.description = "Testing ActiveFedora 8.0.0." # OK
- The
#attributes=
method behaves consistently with the attribute setters -- i.e., raisingArgumentError
when setting an attribute value inappropriately as outlined above.
Change to attributes reader
The #attributes
reader method behaves consistently with the attribute readers -- i.e., returning scalar values for multiple: false
and arrays for multiple: true
attributes.
Optional fedora.yml configuration options added as comments to generator template (#618)
# timeout: 60
# open_timeout: nil
# ssl_client_cert: <ssl certificate>
# ssl_client_key: <ssl key>
# validateChecksum: false
Removed deprecated methods
ActiveFedora::SolrService.escape_uri_for_query
(useRsolr.escape
)ActiveFedora::SemanticNode.pids_from_uris
ActiveFedora::RDF::Indexing#prefix
(use#apply_prefix
)ActiveFedora::RDF::Indexing.prefix
ActiveFedora::SolrDigitalObject#new?
(use#new_record?
)ActiveFedora::Querying#quote_for_solr
(useRSolr.escape
)ActiveFedora::Persistence#new?
and#new_object?
(use#new_record?
)
Removed deprecated RDF modules
ActiveFedora::Rdf::Resource
(useActiveTriples::Resource
)ActiveFedora::Rdf::Term
(useActiveTriples::Term
)ActiveFedora::Rdf::List
(useActiveTriples::List
)ActiveFedora::Rdf::Configurable
(useActiveTriples::Configurable
)ActiveFedora::Rdf::Properties
(useActiveTriples::Properties
)ActiveFedora::Rdf::Repositories
(useActiveTriples::Repositories
)ActiveFedora::Rdf::NodeConfig
(useActiveTriples::NodeConfig
)ActiveFedora::Rdf::NestedAttributes
(useActiveTriples::NestedAttributes
)