Commit graph

430 commits

Author SHA1 Message Date
Dan Stillman
d7990b0e03 Updated Scholar.Files.linkFromURL() to take title and mime type as parameters, to prevent loading huge external PDFs just to get the content type when the ingester already knows it (though that will hopefully be alleviated by #173 and #174 later) 2006-08-09 06:32:16 +00:00
Dan Stillman
318cf3194f Addresses #171, Add more conditions to advanced search architecture
Added conditions 'tagID', 'tag' (text), 'creator' (concats first and last before comparing), and 'note'
2006-08-08 23:08:52 +00:00
Simon Kornblith
6efd6d2cc4 closes #99, add options for export 2006-08-08 23:00:33 +00:00
Simon Kornblith
af080fe384 allow EndNote MIME handler to be unregistered without restarting Firefox 2006-08-08 21:40:33 +00:00
Simon Kornblith
3edb6e0286 closes #86, steal EndNote download links
Scholar should now attempt to process citation information from EndNote download links (MIME types application/x-endnote-refer and application/x-research-info-systems). in situations where Scholar cannot process the information, a standard helper app dialog will appear. this behavior is controlled by the preference extensions.scholar.parseEndNoteMIMETypes.
2006-08-08 21:17:07 +00:00
Dan Stillman
9f57379415 Make searchConditionIDs a little easier to work with--now accessible by with the .id property of search conditions in addition to index 2006-08-08 15:40:42 +00:00
Dan Stillman
f8739ee6c5 Closes #135, Associate MIME types with abstract file types and implement Scholar.FileTypes.getIDFromMIMEType()
MIME type prefixes are handled using wildcards (e.g. audio/foobar will return the audio file type since it matches 'audio/%')
2006-08-08 08:23:23 +00:00
Dan Stillman
1de9007608 Take two 2006-08-08 07:05:39 +00:00
Dan Stillman
b5cb0e3a92 Fixed repeat single-file loading with Files.importFromURL() and Files.linkFromURL() (have to use the "pageload" event rather than "load" -- thanks Simon) 2006-08-08 07:05:05 +00:00
Dan Stillman
425d806307 Closes #158, Add linkFromURL() and importFromURL() functions to Scholar.Files 2006-08-08 06:08:21 +00:00
Dan Stillman
d7ed7c256c Fix the startup trouble the search code was causing (moved DB call into init() function rather than constructor) -- sorry about that 2006-08-08 05:26:51 +00:00
Simon Kornblith
504ebf8996 closes #162, do sniffing for import formats
import should now work regardless of file extensions. this should make #86 (steal EndNote download links) fairly easy to implement.
2006-08-08 02:46:52 +00:00
Dan Stillman
d67d96c321 Closes #7, Add advanced search functionality to data layer
Implemented advanced/saved search architecture -- to use, you create a new search with var search = new Scholar.Search(), add conditions to it with addCondition(condition, operator, value), and run it with search(). The standard conditions with their respective operators can be retrieved with Scholar.SearchConditions.getStandardConditions(). Others are for special search flags and can be specified as follows (condition, operator, value):

'context', null, collectionIDToSearchWithin
'recursive', 'true'|'false' (as strings!--defaults to false if not specified, though, so should probably just be removed if not wanted), null
'joinMode', 'any'|'all', null

For standard conditions, currently only 'title' and the itemData fields are supported -- more coming soon.

Localized strings created for the standard search operators


API:

search.setName(name) -- must be called before save() on new searches
search.load(savedSearchID)
search.save() -- saves search to DB and returns a savedSearchID
search.addCondition(condition, operator, value)
search.updateCondition(searchConditionID, condition, operator, value)
search.removeCondition(searchConditionID)
search.getSearchCondition(searchConditionID) -- returns a specific search condition used in the search
search.getSearchConditions() -- returns search conditions used in the search
search.search() -- runs search and returns an array of item ids for results
search.getSQL() -- will be used by Dan for search-within-search

Scholar.Searches.getAll() -- returns an array of saved searches with 'id' and 'name', in alphabetical order
Scholar.Searches.erase(savedSearchID) -- deletes a given saved search from the DB

Scholar.SearchConditions.get(condition) -- get condition data (operators, etc.)
Scholar.SearchConditions.getStandardConditions() -- retrieve conditions for use in drop-down menu (as opposed to special search flags)
Scholar.SearchConditions.hasOperator() -- used by Dan for error-checking
2006-08-08 02:04:02 +00:00
Simon Kornblith
216f0c7581 closes #83, figure out how to implement OpenURL
closes #76, implement extensible search/retrieval architecture for obtaining metadata

OpenURL COinS lookup is now implemented using a real search architecture system. at the moment, it works with Open WorldCat for books, CrossRef for journal articles (provided the COinS object contains a DOI or an ISSN), and PubMed when a PMID is available.
2006-08-08 01:06:33 +00:00
David Norton
9e5c15423a Fixes #164, On item delete, if "Erase Files" is not checked, it still shows files and notes being deleted.
If you are simple removing an item from a project, it won't ask you if you want to delete files and notes.

ItemTreeView:
 - notify() now works with multiple ids for action=modify.
 - saveSelection() returns an array of selected IDs instead of saving it to a class variable
 - rememberSelection(selection) takes an array of IDs.
2006-08-07 15:25:29 +00:00
Simon Kornblith
6626eba844 addresses #83, figure out how to implement OpenURL
OpenURL lookup now works for books. this means that all that's necessary to add scrapable book metadata to a page is an ISBN, as shown below:

<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info:ofi/fmt:kev:mtx:book&amp;rft.isbn=1579550088"></span>

also, we can now scrape Open WorldCat and Wikipedia Book Sources pages with no specialized code involved.

i'm still looking for a better way of looking up journal article metadata. it's currently implemented with CrossRef, but CrossRef simply will not work without a DOI, and is also incomplete (only holds the last name of the first author).
2006-08-07 05:15:30 +00:00
Simon Kornblith
e3d062a819 fix inappropriately truncated field values in InnoPAC 2006-08-07 01:49:56 +00:00
Simon Kornblith
2b5b65f4dd addresses #83, figure out how to implement OpenURL
adds preliminary support for COinS microformat data. does not yet support COinS where there is only a DOI or ISBN.
2006-08-07 00:30:36 +00:00
Simon Kornblith
56769079b0 addresses #83, figure out how to implement OpenURL
Scholar.OpenURL.resolve(item) returns the URL that retrieves an item from the user's OpenURL resolver. this means we can implement a "find in my library" feature.
Scholar.OpenURL.discoverResolvers() returns a list of available resolvers for the user's current location (by IP address).
2006-08-06 21:59:50 +00:00
Simon Kornblith
c0bab22016 bring scrapers into sync with updated database schema 2006-08-06 17:34:41 +00:00
Dan Stillman
d4acec8a77 Addresses #111, minor modifications to field list schema, and http://chnm.grouphub.com/P2995041
Still some outstanding questions on Basecamp, though
2006-08-06 16:10:28 +00:00
Simon Kornblith
fc589a37cf closes #131, make import/export symmetrical
all 4 import/export formats currently supported (MODS, Hybrid RDF, Unqualified Dublin Core, and RIS) now work as both import and export translators
2006-08-06 09:34:51 +00:00
Simon Kornblith
9144b56772 addresses #131, make import/export symmetrical
closes #163, make translator API allow creator types besides author

import and export in the multi-ontology RDF format should now work properly. collections, notes, and see also are all preserved. more extensive testing will be necessary later.
2006-08-05 20:58:45 +00:00
Dan Stillman
1ce4de835b Fixes #167, Item note cache is not set on new note creation 2006-08-05 07:42:32 +00:00
Dan Stillman
8dd972dea1 Make Collection.getDescendents() a[n officially] public method and add second param to limit results to 'collection' or 'item' 2006-08-05 06:39:15 +00:00
Dan Stillman
701762a11f Fixes #166, Scholar.ItemTypes.getID("journalArticle") throws "Invalid item type journalarticle"
Fixed ignoreCase logic (and also set all but CharacterSets to false, since there's no reason for them to be true)

Also made CachedTypes.getID() and getName() return false and '', respectively, on unknown types rather than letting them hit the error (there's still the 'invalid * type' debug message)
2006-08-04 19:39:53 +00:00
David Norton
0b552c5fdb Closes #153, When deleting an item, don't give option to erase attached notes and files when there are none
Also, the default option (when applicable) is to delete attached notes and files.
2006-08-04 14:36:04 +00:00
David Norton
85815dad49 Closes #159, "Snapshot to Current Page" and "Link to Current Page" should save page as item
-   We might want to do this for regular files as well? I think we need a discussion on how Citation will be presented to the user, and if that will save the web page, and all that jazz.
2006-08-04 14:23:44 +00:00
Dan Stillman
9d58fac7e0 Abstracted the Scholar.*Types logic to a base function that can be extended and added singletons for the various types -- rock the JS prototype model 2006-08-04 04:34:16 +00:00
Simon Kornblith
b4c8dbe700 closes #157, add database infrastructure for different CSL styles
CSL is stored in a new "csl" table. only metadata relevant to updates and selection (ID, date updated, and title) is stored in columns.
2006-08-03 04:54:16 +00:00
Simon Kornblith
30af2c89df - closes #130, add progress bar for import/export
- eliminates "unresponsive script" message on import/export

i tried to make a progress bar that actually provides useful information, but for some reason, XUL interface updates are done asynchronously, and thus don't actually happen as long as the import/export operation continues. the code is there, but disabled, if there's some solution to this issue, but i searched and couldn't find one.
2006-08-02 21:06:58 +00:00
David Norton
6ad7acf4d8 Addressed #155, Localize strings 2006-08-02 17:57:16 +00:00
David Norton
e30a1b717a Addresses #63, Add GPL license info to source code.
License file added.
	Header added to David's interface files -- add header to your own files.
2006-08-02 16:49:19 +00:00
David Norton
04ce48ae64 Closes #156, Double-clicking a note in the item list should open it in a popup window 2006-08-02 16:08:19 +00:00
David Norton
b79420e75b Closes #154, Clicking an item in Related should display that item.
Cancel Search ('x') button now uses a custom image.
Fixes problem with items list freezing on item add
2006-08-02 15:13:31 +00:00
Simon Kornblith
f6c12d3d81 closes #112, ingested items should be automatically added to selected project 2006-08-02 14:17:16 +00:00
Dan Stillman
5c6d9de4b8 Addresses #77, maintain database backups
Temporarily added in a check of the backup file on startup, since I'm not entirely convinced that the backup mechanism on shutdown couldn't create a corrupt file under certain conditions

If you run with debug output on and notice the "Backup file was corrupt" message, let me know.
2006-08-01 23:32:18 +00:00
Dan Stillman
d3bc693dab Closes #77, maintain database backups
The Scholar database is backed up on browser close. On startup, if the main database is damaged, the extension saves a copy of the damaged file and tries to restore from the last automatic backup. If it fails, it creates a new database file.

New methods:

Scholar.getScholarDatabase(string [ext])
Scholar.backupDatabase()
Scholar.moveToUnique(file, newFile) -- find a unique filename using the leafName of newFile as the suggested name (using the built-in Mozilla functionality) and move the file there
Scholar.Date.getFileDateString(file)
Scholar.Date.getFileTimeString(file)
2006-08-01 23:10:31 +00:00
Dan Stillman
9a0457b43e Register shutdown handler to call Scholar.shutdown() on exit 2006-08-01 18:01:56 +00:00
David Norton
635d2e48b9 Closes #151, Show "X" in search box to cancel search.
- I had to make the textbox taller, but it seems to be working right.
Fixed problem with note editor in right pane not updating correctly.
2006-08-01 18:01:48 +00:00
David Norton
3414004cb0 Closes #45, reorder item fields 2006-07-31 22:35:14 +00:00
David Norton
cd4dd3bd92 Closes #148, Files should display a different icon for each type (file & snapshot, linked & unlinked)
Clicking a file or note in the rightmost pane displays it in the middle pane.
2006-07-31 20:35:22 +00:00
David Norton
0632cbf5e4 Closes #91, Add dialog to delete child notes when a source is deleted
Closes #146, ScholarPane.selectItem(id)
Closes #147, "Edit in a Separate Window" on a note should select the note's parent item.
Addresses #143, Scholar toolbar button to save current page as an independent file in the selected project.
 - Standalone Files are now added to the current Project.
Files added to an item are now actually attached to the item.
2006-07-31 19:14:06 +00:00
David Norton
426b839e5f Changed Add button to a single button, with a dropdown menu. 2006-07-31 17:05:41 +00:00
David Norton
4757d21b20 Fixes #143, Scholar toolbar button to save current page as an independent file in the selected project. 2006-07-31 16:58:14 +00:00
Dan Stillman
40ef9f669d Closes #90, Add flag to delete child notes when a source is deleted
Item.erase(true) deletes child items as well instead of just unlinking
2006-07-31 06:05:19 +00:00
Dan Stillman
9234aa8b9b Addresses #45, reorder item fields -- but this time in reality, not just in my mind
Schema version not changed -- reset manually if you upgraded in the last few minutes
2006-07-31 04:41:46 +00:00
Dan Stillman
526d368aaf Closes #117, permit dashes and commas in "pages" field
Closes #118, add "translator" creator type
Closes #122, add DOI and abbreviated journal title fields
Addresses #45, reorder item fields -- source/rights moved down to bottom; date fields not yet moved
2006-07-31 04:31:44 +00:00
Dan Stillman
9da1c210a0 Change repository check time back to once a day 2006-07-31 03:38:02 +00:00
Dan Stillman
1adeb840bf Closes #98, Cache note content to avoid repeated DB calls 2006-07-30 21:49:34 +00:00