Commit graph

433 commits

Author SHA1 Message Date
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
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
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
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
Dan Stillman
6ab7fd1e18 Closes #119, When Item.isNote(), Item.getField('title') should return first line of note
Returns the first 80 characters of the note content as the title

Also changed setField() to use the loadIn parameter for primary fields so it can be used instead of this._data without affected _changedItems
2006-07-30 21:01:23 +00:00
David Norton
331a608a1e Closes #139, Ability to link to files, webpages
Buttons under Files tab are icons, so that they can fit horizontally.
2006-07-28 19:56:49 +00:00
David Norton
29fcb08083 The fullscreen button is now an image. It looks different depending on whether the pane is on top or bottom, and changes background when activated. 2006-07-28 16:49:19 +00:00
Dan Stillman
82106afc95 JavaScript, how I love thee.
Fixes URL not being stored with saved web pages.
2006-07-28 16:20:48 +00:00
David Norton
1ff56d8650 Add File (from current page) uses the correct document now. (thanks Dan) 2006-07-28 16:11:44 +00:00
David Norton
81a980e4db Fixes Select All on Windows. But more importantly, uses the correct command structure for Select All, Delete, and provides the structure for future commands. 2006-07-28 13:28:50 +00:00
Simon Kornblith
a663966c4f closes #2, clipboard export
for the moment, this feature is disabled on the mac, since firefox can't handle HTML on the clipboard (and thus we can't copy the fully formatted bibliography). i can re-enable it if it would be useful regardless.
2006-07-28 04:09:40 +00:00
Simon Kornblith
6305e4cada closes #55, export bibliography to printable version
closes #4, Make printable version

- moves functions for creating and deleting hidden browser objects to scholar.js (from ingester.js), since these are necessary for printing as well
- allows saving bibliography in HTML or printing bibliography. style support is not yet complete (pending finalization of 0.9 version of CSL specification).
2006-07-27 23:01:55 +00:00
David Norton
1d03bf6b71 Fixes #16, select all does not work in items list 2006-07-27 21:18:42 +00:00
David Norton
49d1eec9e8 Closes #127, Display files under files tab
Closes #128, Display files as children of item in items list

Fixes #132, On Full-screen mode, browser content disappears but Scholar content does not stretch.
Fixes #133, When Scholar on top, pane automatically resizes depending on item info height.
2006-07-27 18:08:09 +00:00
Dan Stillman
441696767a Don't return non-independent file items in Scholar.getItems() (thanks David) 2006-07-27 15:55:03 +00:00
Dan Stillman
c093e7b62b Item.isRegularItem() = !(Item.isNote() || Item.isFile()) 2006-07-27 15:04:22 +00:00
Dan Stillman
c50dedc90a Addresses #17, add filesystem/ability to store files
Not finished, but enough to give David something to work with

No BLOBs -- just linking/importing of files and loaded documents


New Scholar.Item methods:

incrementFileCount() (used internally)
decrementFileCount() (used internally)
isFile()
numFiles()
getFile() -- returns nsILocalFile or false if associated file doesn't exist (note: always returns false for items with LINK_MODE_LINKED_URL, since they have no files -- use getFileURL() instead)
getFileURL() -- returns URL string
getFileLinkMode() -- compare to Scholar.Files.LINK_MODE_* constants: LINKED_FILE, IMPORTED_FILE, LINKED_URL, IMPORTED_URL
getFileMimeType() -- mime type of file (e.g. text/plain)
getFileCharset() -- charsetID of file
getFiles() -- array of file itemIDs this file is a source for

New Scholar.Files methods:

importFromFile(nsIFile file [, int sourceItemID])
linkFromFile(nsIFile file [, int sourceItemID])
importFromDocument(nsIDOMDocument document [, int sourceItemID])
linkFromDocument(nsIDOMDocument document [, int sourceItemID])

New class Scholar.FileTypes -- partially implemented, not yet used

New class  Scholar.CharacterSets -- same as other *Types classes:
getID(idOrName)
getName(idOrName)
getTypes() (aliased to getAll(), which I'll probably change the others to as well)

Charsets table with all official character sets (copied from Mozilla source)

Renamed Item.setNoteSource() to setSource() and Item.getNoteSource() to getSource() and adjusted to handle both notes and files
2006-07-27 09:16:02 +00:00
Dan Stillman
4959535aff Scholar DB now stored in scholar subfolder of profile directory
New methods for retrieving profile directory, scholar subdirectory and scholar/storage subsubdirectory
2006-07-27 08:45:48 +00:00
David Norton
46f77ec8ab Set icon for extension (visible on Add-Ons window. You'll have to reinstall Scholar to see).
NOTE: The icon is temporary, just a placeholder. We are waiting on somebody that has real design skills to create a real icon.
2006-07-26 17:48:27 +00:00
David Norton
a47bf41eb6 Created Scholar toolbar button (use Customize Toolbar... option) 2006-07-26 16:42:26 +00:00
David Norton
dc2751b85c Fixes #129, add menu/contextual menu items for export/bibliography
(currently just in contextual menu).
2006-07-26 15:28:31 +00:00
David Norton
aff9cd5708 ScholarPane.getSelectedItem() is now ScholarPane.getSelectedItems(), and returns an array of selected items. 2006-07-26 15:09:06 +00:00
David Norton
b9f577da91 Closes #125, Separate customControls.xml into multiple files 2006-07-26 14:46:27 +00:00
David Norton
dd4bc6f5e8 Fixes #113, "New Note" should put note in currently selected project 2006-07-26 14:30:38 +00:00
David Norton
a08bbe5347 Fixes #120, Scholar preference for Above Content breaks display.
Changes the edit pane to look a lot better (uses groupbox).
Individual tabs don't load their content unless selected.
2006-07-26 14:03:54 +00:00
David Norton
16a995df86 Closes #121, functions to get selected project and items in Scholar pane.
- ScholarPane.getSelectedCollection() returns collection object, or null if Library is selected.
 - ScholarPane.getSelectedItem() returns selected item/note/item-like-thing, or null if no item is selected.
2006-07-24 22:12:25 +00:00
Simon Kornblith
cbe3611182 references #110, implement CSL for citation styling
add Scholar.Cite and Scholar.CSL for parsing items into a bibliography using CSL. unfortunately, the output is not very good at the moment, and the format likely needs some changes, but I'm working with a few other people on getting it to that point.
2006-07-22 01:25:46 +00:00
David Norton
0cf2101019 SelectItemsDialog (for See Also) unregisters tree views on close.
Fixes minor display problems with Tags, See Also.
2006-07-20 23:57:53 +00:00
David Norton
7103fd4f1d Fixes #23, "see also" part of note.
Also, metadata looks better. See Also and Tags and Items.
2006-07-20 23:19:31 +00:00
David Norton
8427ebdf2a Fixes #114, Preference for Scholar location (top, bottom).
(I had to go a little roundabout way of doing it, as you can't use the overlay-related positioning attributes on-the-fly)
2006-07-19 16:14:27 +00:00
David Norton
785954f4f5 Fixes #116, Make full screen button text.
Fixes #115, Windows should open with Scholar Pane closed.
Fixes #105, search box loses focus after search starts.

Retooled the interface a bit, and removed the top toolbar. The close and fullscreen buttons are located to the right of the items toolbar. The item pane cannot be collapsed.
2006-07-17 14:09:12 +00:00
Simon Kornblith
c64e5c841f closes #78, figure out import/export architecture
closes #100, migrate ingester to Scholar.Translate
closes #88, migrate scrapers away from RDF
closes #9, pull out LC subject heading tags
references #87, add fromArray() and toArray() methods to item objects

API changes:
all translation (import/export/web) now goes through Scholar.Translate
all Scholar-specific functions in scrapers start with "Scholar." rather than the jumbled up piggy bank un-namespaced confusion
scrapers now longer specify items through RDF (the beginning of an item.fromArray()-like function exists in Scholar.Translate.prototype._itemDone())
scrapers can be any combination of import, export, and web (type is the sum of 1/2/4 respectively)
scrapers now contain functions (doImport, doExport, doWeb) rather than loose code
scrapers can call functions in other scrapers or just call the function to translate itself
export accesses items item-by-item, rather than accepting a huge array of items
MARC functions are now in the MARC import translator, and accessed by the web translators

new features:
import now works
rudimentary RDF (unqualified dublin core only), RIS, and MARC import translators are implemented (although they are a little picky with respect to file extensions at the moment)
items appear as they are scraped
MARC import translator pulls out tags, although this seems to slow things down
no icon appears next to a the URL when Scholar hasn't detected metadata, since this seemed somewhat confusing

apologizes for the size of this diff. i figured if i was going to re-write the API, i might as well do it all at once and get everything working right.
2006-07-17 04:06:58 +00:00
Simon Kornblith
d65328c830 adds Biblio/DC/FOAF/PRISM/VCard RDF export type. Bruce D'Arcus, author of CiteProc and co-lead on the OpenOffice bibliographic project, is currently using this as his ontology, and we can unambiguously encode all of our metadata with it.
caveats:
- it's not human readable. mozilla doesn't nest blank nodes, so everything's scattered throughout the file. it would be relatively easy to do post-processing with E4X or even regexps to correct this.
- there's no generic callNumber field, so all callNumbers are encoded as LCC.

adds container creation routines to dataMode rdf

changes Dublin Core export to Unqualified Dublin Core, and removes DC Terms qualifiers
2006-07-07 18:41:21 +00:00
Simon Kornblith
c02666fcd3 add an API for Mozilla's RDF data source, so that import/export translators will be able to create and parse RDF with minimal effort
convert Dublin Core export to new API
2006-07-06 21:55:46 +00:00
David Norton
ce26db3495 Closes #12, credits panel.
This custom credits panel gives us more flexibility. Also, there is an About link which is certainly easier to find than right-clicking on the extension in the Add-ons window.
2006-07-06 20:43:32 +00:00
David Norton
c078ebcef7 Fixes tags (broken in r359) 2006-07-06 16:27:34 +00:00
Dan Stillman
40b3ecc996 Addresses #87, Add fromArray() and toArray() methods to Item objects
Item.getTags() (which toArray() uses) now returns actual tags rather than ids -- separate method getTagIDs to return ids
2006-07-06 13:06:32 +00:00
Simon Kornblith
2d8ed16d88 adds export of tags to MODS.
adds export of seeAlso info and project hierarchy to RDF. for now, this is embedded in the modsCollection root element.

uses nodeIDs for Dublin Core RDF.
2006-07-06 03:39:32 +00:00
Simon Kornblith
89a770d56b include fileInterface.js in overlay.xul so that file export will work
make replace work from save dialog
2006-07-05 22:08:25 +00:00
Simon Kornblith
c0251085a9 Add export filters for RIS and Dublin Core RDF 2006-07-05 21:44:01 +00:00
David Norton
52ae9b321e Fixes problems with long tags and cropping. 2006-07-05 17:59:17 +00:00
David Norton
c478fea15f Fixes #52, button to expand to full screen mode.
Fixes #92, sometimes it starts up in full screen mode and you can't switch it back.
Fixes problem with tags summary on Notes not updating.
2006-07-05 16:19:26 +00:00
David Norton
cb4a79ef9d Fixes problem where deleting a note would accidentally hide other items in the list. 2006-07-05 15:35:15 +00:00
David Norton
daf8808615 Fixes #109, add import/export buttons to interface.
- Look under the cog menu above the Projects list.
2006-07-05 15:19:18 +00:00
David Norton
1cdd1f3de2 Fixes #24, tags for notes.
This is now a new control, <tagsbox> which is pretty darn portable.
2006-07-05 15:08:24 +00:00
David Norton
7333a1b538 Fixes #32, implement tags in tags tab 2006-07-05 13:09:58 +00:00
David Norton
07e75aa9de The default location of the bar is at the bottom of the screen. 2006-07-05 11:23:05 +00:00
Simon Kornblith
8b4a44be0f fixes a bug that made the Google Books translator not appear
adjusts the Google Books translator to work with the latest revision of the site

renames the MODS translator to just MODS, because "Metadata Object Description Schema (MODS)" was too long for the export dialog
2006-06-30 19:21:36 +00:00
Dan Stillman
6c88563ded Changed translators.type column to INT and added index
Updated scraper updated mechanism to handle new translator schema, roughly
2006-06-29 07:58:50 +00:00
Dan Stillman
35eb1292a5 Changed getRandomID() to use the full SQLite three-byte range if unable to find a two-byte id in 3 tries 2006-06-29 07:03:24 +00:00
Dan Stillman
b495bb6334 Use getRandomID() for new item ids rather than auto-increment 2006-06-29 06:28:50 +00:00
Dan Stillman
72ca609b52 Addresses #87, Add fromArray() and toArray() methods to Item objects
Changed _getDescendents to take _nested_ flag, be extensible later for smart folders and other types, and include the collection name in the dataset

Added Collection.toArray()

Sample array:

'0' ...
	'id' => "13"
	'type' => "item"
'1' ...
	'id' => "14"
	'type' => "item"
'2' ...
	'id' => "7373"
	'name' => "A Sub-project!"
	'type' => "collection"
	'children' ...
		'0' ...
			'id' => "15"
			'type' => "item"
		'1' ...
			'id' => "9233"
			'name' => "A Sub-sub-project!"
			'type' => "collection"
			'children' ...
2006-06-29 05:18:55 +00:00
Dan Stillman
9b23e1ecdc Addresses #87, Add fromArray() and toArray() methods to Item objects
toArray() improvements:

- seeAlso support (array of itemIDs)

- Added itemID to source notes

- Fixed bug in creator handling
2006-06-29 03:56:22 +00:00
Simon Kornblith
77282c3edc - fixes a bug that could result in scrapers using utilities.processDocuments malfunctioning
- fixes a bug that could result in the Scrape Progress chrome thingy sticking around forever
- makes chrome thingy disappear when URL changes or when tabs are switched
2006-06-29 03:22:10 +00:00
Dan Stillman
2d23ba97e5 See Also functionality for items and notes
Item.addSeeAlso(itemID)
Item.removeSeeAlso(itemID)
Item.getSeeAlso() -- array of linked items

Relationships are mutual

Closes #82, Notes: see also table
2006-06-29 01:37:53 +00:00
Dan Stillman
098b7b1b9e Allow single bound parameters not in arrays in DB.query() calls 2006-06-29 01:06:02 +00:00
Simon Kornblith
45b9234996 addresses #78, figure out import/export architecture
- changes scrapers table to translators table; all import/export/web translators now belong in this table
- adds Scholar.Translate to handle translation issues. eventually, Scholar.Ingester.Document will become part of this interface
- adds Scholar_File_Interface (in fileInterface.js) to handle UI for export and eventually import. (David, when you have time, please connect Scholar_File_Interface.exportFile to a button.)
- adds an export translator for MODS. all of our metadata, but not our hierarchy (projects, etc.) translates directly and unambiguously into valid MODS. eventually, we can use RDF or another format to handle hierarchy.
- adds utilities.getVersion() and utilities.inArray() for simplified scraper coding
- fixes minor interface issues with the nifty chrome scraping status window
2006-06-29 00:56:50 +00:00
Dan Stillman
e45520b871 Updated obsolete references to itemKeywords table to use itemTags (this was breaking item delete and search) 2006-06-28 19:12:35 +00:00
David Norton
3a3b6ab70d Fixes #30, clicking on note in the hierarchical view shows contents of the note in the right panel.
- Generally, restructured the way that editing notes works: there is now a <noteeditor> control.
2006-06-28 18:30:29 +00:00
Dan Stillman
20bad3609d Moving Scholar.Notes in the code -- ignore 2006-06-28 18:30:20 +00:00