TNS Internal:NDR/CodeLocations

From NSDLWiki

Jump to: navigation, search

NDR Code Locations

Create Date: 02-16-2010
Modify Date: 02-16-2010


This page was created to help with understanding the basic code structure for the NDR. The code structure changes from time to time and there is no guarentee that this page is in sync with the actual code base. It is a fairly accurate representation of the code at the time this document was written.


Contents

[hide]


Primary Code Location

Primary Location: https://svn.nsdl.org/NCore

Subdirectory Purpose
/extensions Extensions of the basic NDR. Currently used to support other applications interactions with the NDR.
/extensions/expertvoices NDR plugins for wordpress
/extensions/mediawiki NDR plugins for mediawiki
/repository Interactions with Fedora repository, NDR Rest API struts application, OAI generation, NDR model and enforcement. See details below.
/services
/services/inference Mr. Heirarchy -- 60% done
/services/oaiprovider Addon to build a jar that can be included in an OAI classpath that can restrict criteria for including in OAI. This is used to implement the limitation by OAIvisibility property.
/toolkits Wrappers for the NDR Rest API
/toolkits/java Code implementing wrapper for NDR Rest API in Java. (production)
/toolkits/javascript Code implementing wrapper for NDR Rest API in JavaScript (stubs only) Would have been cool, but only a skeleton at best.
/toolkit/php Code implementing wrapper for NDR Rest API in PHP (stubs only) Skeleton here with no implementation... some php guts are in expert voices.
/website ncore.nsdl.org php webapp


Repository Code Location

This section looks specifically at the code released in version 1.4 of the repository code. All code is under the /src directory. The code that interacts with Fedora is under the /src/java subdirectory. This location has a large number of subdirectories and is described separately.


Big Bang and Struts Application for NDR Rest API

The following table describes only those directories immediately off the /src directory. The primary usage of these directories is support of the structs application that interacts with the NDR Rest API and files related to the Big Bang which is used to create the minimally required objects for a useful instantiation of the NDR.


Location: https://svn.nsdl.org/NCore/repository/tags/1.4/src

Subdirectory Purpose
/css CSS for the struts based application for interacting with the NDR Rest API.
/html Describes the objects created by the Big Bang process, which is used to create the minimally required objects for a useful instantiation of the NDR.
/java details
/jsp Struts based JSP files for interacting with the NDR Rest API.
/tld Struts tld files.
/xml
/xml/bigBangFoxml Foxml for creating two NDR objects: Agent ndr:root and Aggregator ndr:trusted
/xml/model_foxml Foxml for creating the content models for NDR objects (Agent, Aggregator, etc.). Foxml for creating sdefs for Metadata objects.
/xml/nsdl_foxml Foxml for additional objects created by the Big Bang in support of establishing NSDL within an NDR instantiation.
/xml/schema Schemas used for NDR Rest API request and response.
/xsl abouts.xsl


NDR-Fedora Java Code

The bulk of the repository code is java code. The following provides a list of the java code for the repository.


Location: https://svn.nsdl.org/NCore/repository/tags/1.4/src/java/org/nsdl

Subdirectory Purpose
/repository/access code for NDR access interfaces and filters (get(), add(), remove(), getFinder())
/repository/access/filters filters applied to objects (usage configured)ac
/repository/api struts forms for interacting with the NDR Rest API. api/auth & api/request provide functionality that all supports the web API, and api/action contains the actual struts stuff representing each 'method' in the api.
/repository/api/FedoraPlugin.java FedoraPlugIn which implements Struts PlugIn class. The Bootstrap internal class has the code that creates the Big Bang objects if they don't already exist.
/repository/api/action struts action classes for each API call
/repository/api/auth code enforcing NDR Rest API limitations to registered agents
/repository/api/request parsing and decomposition of the API request
/repository/handle handle generation code (e.g. connection to handle server, maintaining handle sessions, etc)
/repository/impl/fedora classes for interacting with fedora. (There is very little fedora-specific code outside this package.)
/repository/model This contains the NDR model itself - interfaces and implementation. The fedora content models are analogs to what is in here. The plan (referred to as "phase 3") was to eventually express the methods on Agents, Aggregators, etc as fedora disseminators. In that case, the classes here would be used to implement that part. Alas, we did not get to that stage as priorities changed. As a result, these classes just provide functionality to the toolkit and NDR implementation.
/repository/model/content classes that enforce the content models of our objects including datastreams and relationships
/repository/model/impl helper classes for content models
/repository/oai this code produces oai from NDR objects. It's what is used to feed the oaiprovider service when it queries objects for their OAI info.
/repository/tools tools that can be executed external to NDR
/repository/util non-Fedora specific helper classes
/util more non-Fedora specific helper classes -- more low level than the /repository/util classes
Personal tools