= API Estimates - Server, Client, Ingest = === Server === * Object operations * (2 md B ) Startup project * (1 md B ) '''newObject(template) => pid''' Given a template, create a new object, return the PID * (0.25 md C ) '''deleteObject(pid)''' Given a PID, mark the object as deleted (note: object may only be undeleted by direct access to Fedora) (uncertain how easy it will be to use lower systems for the operation) * (0.25 md C ) '''markPublishedObject(pid)''' Given a PID, mark the object as published. Will fail if object does not validate. (uncertain how easy it will be to use lower systems for the operation) * (0.25 md C ) '''markInProgressObject(pid)''' Given a PID, mark the object as in progress. (uncertain how easy it will be to use lower systems for the operation) * (0.5 md C ) '''listDatastreamsObject(pid) => listOfDatastreams''' Given a PID, list datastream names in object. (uncertain how easy it will be to use lower systems for the operation) * (0.25 md B ) '''getObjectTitle(pid) => title''' Given a PID, return the title of the object. * Datastream operations * (0.5 md B ) '''newDatastream(pid, name, content)''' Given a pid and a datastream name, add a datastream with that name, and given content. Will fail if name already exists with different content. * (0.25 md B ) '''deleteDatastream(pid, name)''' Given a pid and a datastream name, mark that datastream as deleted. * (1 md B ) '''modifyDatastream(pid, name, content)''' Given a pid and a datastream name, replace the contents of that datastream with the given content. Will fail of datastream does not exist. * (0.5 md B ) '''getDatastream(pid, name) => content''' Given a pid and a datastream, return the datastream content. Will fail of datastream does not exist. * File operations * (1 md B ) '''addFile(pid, name, content, checksum)''' Given a pid and a name, add a new file to the object with the given content. Will fail if pid does not describe a file object, if a file is already added to the object with different content, or if content does not match checksum. * (1 md B ) addAndReplaceFile(pid, name, content, checksum) * (1 md B ) '''?deleteFile(pid)''' Given a pid, delete the file in this object. This will fail if this is not a file object, if no file is present in the object, or if the object has been published so the file is undeletable. * (1 md B ) '''getFileUrl(pid) => url''' Given a pid, return an externally resolvable URL that disseminates this file. * Relation operations * (1 md B ) '''addRelation(fromPid, name, toPid)''' Add a relation between two objects. * (0.5 md B ) '''?getRelations(pid) => listOfNamesAndPids''' Given a pid, list relations out of this object * (0.5 md B ) '''?getRelations(pid, name) => listOfPids''' Given a pid, list relations out of this object of a specific type * (0.25 md B ) '''deleteRelation(pid, name, pid)''' Given a specific relation, remove it. * (1 md B ) get allowed relations from this object and targetable content models * (0.5 md B ) '''?modifyRelation(pid, oldName, oldPid, newName, newPid)''' Given an old relation, replace it with a new relation. * Search operations * (0.5 md B ) '''findObjects(queryString) => listOfPids''' Given a query string, return list of objects matching * (2 md B ) '''listObjects(modifiedSinceDate, name) => listOfPids''' Given a date, return a list of main objects on whose view of the given name some object(s) have changed since then. * (1 md B ) list objects changed last in this collection (pid) * (0.5 md B ) list objects changed from-until (date, date, view name) * (0.25 md B ) '''riQuery(queryString) => queryResult''' Given a query string for the resource index, return result. * View operations * (3 md C ) '''getView(pid, name, format) => viewBundle''' Given an entry PID and a view name, return a bundle, in a format from which Summa- and OAI-DC formats can be generated. (uncertain how much work is in this) * (2 md B ) '''getViewStructure(pid, name) => datastructureOfView''' Given an entry PID and a view name, return a spanning tree over the view graph. * (0.5 md B ) get pid of object that is main object for view of given name in which object of given name2 resides. * (0.25 md B ) list objects in given main objects view of given name * Structural operations - For creating new entry objects * (0.5 md B ) '''?listCollections() => listOfPids''' List all collection objects in DOMS. * (1 md B ) '''?getEntryTemplatesForCollection(collectionPid, viewName) => listOfPids''' Given the PID of a collection, return all templates for that collection, that are also entry objects for the given view name. * (0.5 md B ) getAllTemplatesForCollection * Structural operations - For creating new subobjects in view * (1 md B ) '''?getSubItemTemplates(pid, viewName) => listOfPids''' Given an object and a named view, return templates that could be used to generate subobjects for that pid in that view. * (2 md B ) '''?addSubItem(pid, viewName, template)''' Given an object, a named view, and a template, create a new object for that template, then add relation between old and new object in the view. Will fail if there is no allwed relation in the view between the object and the template. * Structural operations - For adding new view-external relations * (0.5 md B ) '''?getAllowedRelations(pid) => listOfNamesAndCMS''' Given a pid, return possible relations that could be added, and the content models allowed as object for those relations. * (0.25 md B ) '''?listObjectsWithContentModel(pid)''' Given a content model pid, list all objects that subscribe to that content model. * Structural operations - For content model driven behaviour * (1 md B ) '''?getContentModel(pid) => compoundContentModel''' (combined for its different content models) for this object TOTAL: 32 md === Client === For summa integration and OAI-PMH: * (2 md B ) framework code * (3 md C) makeBundleOfObjectsChangedSince - get list of PIDs from DOMS Server, then call it to get the bundle (uncertainty: get the view name how?) * (3 md C) getObjectViewForMainObject - call DOMS Server to get the bundle (uncertainty: get the view name how?) * (2 md B ) lastTimeSomethingInThisCollectionChanged - call to DOMS Server * (2 md B ) makeBundleOfObjectsChangedFromUntil - call to DOMS Server TOTAL PART 1: 12 md For DOMS-GUI (and Hotfolder Ingest) : * (2 md B ) framework code * (2 md B ) Given a query string, return a list of PIDs for objects found (search done by call to Summa integration component) * (1 md A) Return a list of all collection objects - call to DOMS Server * (2 md B ) Given a PID of an existing object in Fedora (for main objects, PID either entered by keyboard, or gained from a search), return a Java object representing it. This Java object will atleast have methods to do the following: * (0.5 md B ) Delete object - call to DOMS Server * (0.5 md B ) Publish object - call to DOMS Server * (0.5 md B ) Mark object as "in progress" - call to DOMS Server * (0.5 md B ) Return a list of the datastreams on the object - call to DOMS Server * (0.5 md B ) Return title of object - call to DOMS Server * (0.5 md B ) Given a name and content, add a datastream with that name and content to object - call to DOMS Server * (0.5 md B ) Given a name and PID, create a relation with the given name from current object to object with given PID - call to DOMS Server * (2 md B ) Given a name and a template, return a new object clone of the template and make a relation with given name from current object to new (may need to receive name of view as well, to check that relation is allowed in the view) * (2 md C) Given view name, return list of templates for objects that are allowed as targets of relations from current object in given view (uncertainty: no time to examine to what extent this can be handled by DOMS Server) * (0.5 md A) Return outgoing relations from this object - call to DOMS Server * (0.5 md A) Return allowed relations from this object, and content models allowed for targets - call to DOMS Server * (0.5 md A) Given a name, return outgoing relations of this name from current object - call to DOMS Server * (1 md B ) Return the object that is the main object for current object's view * (0.5 md B ) Return a compound content model (combined from its different content models) for this object * Template objects in addition have the following methods: * (0.5 md A) A method to return a clone object of the template in question (needed for creating the first objects in a collection) - call to DOMS Server * Main objects have the following methods: * (0.5 md A) Given a view name, returns a list of the objects in this main object's view of that name - call to DOMS Server * Content model objects have the following methods: * (0.5 md A) Return list of all objects that subscribe to this content model - call to DOMS Server * File objects in addition have the following methods: * (1 md B ) Given filename, content, and checksum, attach a file with the given name and content to the file object (even though there may be a file already) * (0.5 md A) Delete file from file object - call to DOMS Server * Collection objects have the following methods: * (0.5 md A) Return all templates for this collection (one of these may produce a main object) - call to DOMS Server * Datastream objects have methods to do the following: * (0.5 md A) Delete datastream - call to DOMS Server * (0.5 md A) Given new content, replace the existing content in the datastream with the new content - call to DOMS Server * (0.5 md A) Return datastream content - call to DOMS Server * Relation objects atleast have methods: * (1 md A) Return PID that is target of relation * (0.5 md A) Delete relation - call to DOMS Server * (1 md A) Given name, set name of relation * (0.5 md A) Given PID, set target of relation TOTAL PART 2: 26 md Probably several of the small ones can be done in one go, so development time may become shorter. On the other hand, once we start coding, me may discover that more methods are needed. (Maybe 10 to 40 percent more methods) TOTAL PART 2 WORST-CASE: 28 - 36 md (including 10 - 40 % extra) TOTAL (PARTS 1 AND 2) : 38 md (WORST CASE: 40 - 48 md) === Ingest === * (1 md A) Startup project * Hotfolder surveyor/ingester * (3 md A) Repeated checking of config file * (3 md A) Config file parser (incl. regexps) (config file in xml) * (4 md A) Repeated checking of each surveilled folder (against regexp) * (1 md A) Call of external (Java code) action (lock-stuff done in the action) * (6 md B ) Test-action * Ingest for when called by pre-ingester * (0 md A) Nothing needed (calls DOMS Client directly) TOTAL: 18 md