TNS Internal:NDR/Filtering
From NSDLWiki
NDR Access and Filtering
Default class implementing NDRAccess: BasicFedoraNDRAccess OR is it FilteredNDRAccess
Commonly used methods:
- getObject(NDRObjectInfo)
- getObject(NDRObjectInfo,Type)
- getObject(String,Type)
- getObject(PID)
- getObject(String)
- newObject(Type)
- openObject(NDRObjectInfo)
All return either...
- repository.model.types.TypeFactory factory.instantiate(getObject(NDRObjectInfo),Type<T>) which returns an object that extends repository.model.NDRObject interface
- repository.impl.
- OR repository.impl.fedora.MutableAPIFedoraObject
- deleteObject(NDRObjectInfo)
- purgeObject(NDRObjectInfo)
when you use NDRAccess object, the filters get called when you do certain things
- calls NDR access filters that check content model, assign handles, data processing and cleaning, etc. (in org.nsdl.repository.api.request.filters)
NDRAccess:
- interface
- requires methods for...
- getObject
- newObject
- deleteObject
- purgeObject
- getObjectFinder
- isReadOnly
FilteredNDRAccess
- use of this class is configured
- implements NDRAccess
- runFilters(FilterState state)
- which calls FilteredNDRAccess.FilterManager.invoke(NDRObject,FilterContext)
- which calls <NDRAccessFilter>filter.doFilter(NDRObject,FilterContext)
- initializeFilters(Configuration)
- Configuration file lists the filters to be added
- calls FilteredNDRAccess.FilterManager.addFilter(NDRAccessFilter) for each filter listed in the config file
- updateConfig(Configuration)
- calls initializeFilters(Configuration)
NOTE: Java Toolkit is configured to use InterpretedNDRAccess instead of FedoraNDRAccess.
NDRAccessFilter
- interface
- extends nothing and implements nothing
- used by FilteredNDRAccess for adding and running filters
getObject() StaticObjectInfo(handle) NDRObjectTemplate(Type) , where Type = Agent | Aggregator | Metadata, etc.