Create Folder with a category definition?

Hi,
Is there any way to attach a CATEGORY_DEFINITION to a folder in a worskpace?. I have only seen CATEGORY_CONFIGURATION attached. What I am trying to say, is there is any way to assign category attribute information to subfolder in a worksapce. Thanks in advance,
Igor.
Mensaje editado por:
user511556

I also need to accomplish the task of setting metadata attributes at the folder level. I do not believe that it is impossible. The Collaboration Suite web interface appears to do this very thing. It may be impossible using the oracle.ifs.fdk API, but that's just a weakness in the high-level API in my opinion. The data is being stored somewhere, that much is for sure.
If the oracle.ifs.fdk API is insufficient to handle this task, Oracle ought to support an alternate means to get the job done. This is a fundamental part of any useful document management system.
When examining the CONTENT schema in the database, it is obvious that both documents and folders support category instances in one form or another. It is also obvious that these two types of PUBLICOBJECTs are dealt with very differently in the database.
At the end of this post are given two PLSQL procedures and one function that will populate a document with a given ID with metadata for my own custom category called "File Metadata". The second procedure and the function are just helpers called by the first. You'll need to grant the CONTENT user select privileges on SYS.DBA_TAB_COLUMNS. This is how the procedure gets the names of the metadata attribute columns, which will be different for every custom category. Naturally, you will have to modify the parameters and procedure body to make it work for your own custom category, using the name of your category and your own metadata attribute names as well. If you run the SELECTs in a sql editor, you will see how the data is laid out in the CONTENT schema. Though the procedure does not indicate this, everything starts with the ODMV_PUBLICOBJECT view.
This procedure will not work for folders because the database layout for folder category attributes is different. I have yet to fully map it out, though I am deep into it. I will post a solution here when I find it.
If anybody already knows the solution, please don't hesitate to post it. This is a cry for help. The category structure for folders is very difficult to trace. The actual metadata values are very elusive. Here's what I have found thus far:
Let's say I have a folder whose ID is 958609. Here's the folder object itself, and all its child objects:
select *
from odmv_publicobject
where id = 958609
or securingpublicobject = 958609;
Some of these children are category override instances. In my system, category overrides are the rows with a CLASSID of 2646. If you look up this ID in ODMV_CLASSOBJECT, you will see that it is ADHOCCONFIGURATION. This is different from a document's category instance, which has a custom CLASSID which points to a custom category in the ODMV_METADATASCHEMACATEGORY view. We see a divergence between document and folder category implementation already at this point. This query gives me the "ad hoc" category instance for my folder:
select *
from odmv_publicobject
where securingpublicobject = 958609
and classid in (
select id
from odmv_classobject
where name = 'ADHOCCONFIGURATION'
Among the child objects of my folder lie some more interesting things. It appears that the metadata attributes themselves are to be found here. The following query finds them all. Note the similarity to the preceding query. The only thing that changed was the type of CLASSOBJECT we are looking for.
select *
from odmv_publicobject
where securingpublicobject = 958609
and classid in (
select id
from odmv_classobject
where name = 'METADATACATEGORYATTRIBUTEOVERRIDE'
order by id asc;
Now that I have these objects, it would seem like an easy task to look them up in whatever table they are stored in, and change the attribute values. But I cannot find this table (yet). This is where I am stuck. Any suggestions, please?
Another odd fact: if you change folder metadata, all subfolders will reflect the change. Documents, however, do not change. Folders appear to inherit parent folder category metadata unless it is explicitly changed. I think this behavior extends all the way up to the domain object itself. Perhaps the domain object holds a bit of the secret. The domain object is a PUBLICOBJECT just like folders, documents, users, etc.
Anyway, once this metadata attribute override table is found, it will be an easy matter to write PLSQL that can read and write folder metadata attribute values. Forget about oracle.ifs.fdk; it will not serve us here. As you can see, the official word is that it cannot be done, even though we can all see it works in Collaboration Suite, and we can see some of the implementation in the database.
The document metadata writing procedure:
PROCEDURE update_file_metadata (
p_docid IN NUMBER,
p_folderid IN NUMBER,
p_create_date IN NUMBER,
p_footer_number IN VARCHAR2,
p_to IN VARCHAR2,
p_from IN VARCHAR2,
p_entered_by IN VARCHAR2,
p_hardcopy_available IN VARCHAR2,
p_subject IN VARCHAR2,
p_revision_number IN VARCHAR2,
p_document_vendor IN VARCHAR2,
p_drawing_number IN VARCHAR2,
p_title IN VARCHAR2,
p_drawing_revision IN VARCHAR2,
p_drawing_sheet_number IN VARCHAR2,
p_drawing_vendor IN VARCHAR2
IS
l_metadata_id NUMBER(20);
l_category_id NUMBER(20);
l_displayname VARCHAR2(500);
l_query VARCHAR2(2000);
BEGIN
-- Get the category id for the named category
SELECT associatedschemaobject
INTO l_category_id
FROM odm_schemacategory
WHERE id IN (
SELECT id
FROM odm_metadataschemacategory
WHERE displayname LIKE 'File Metadata'
-- Find the metadata id.
find_metadata_id('File Metadata', p_docid, l_metadata_id);
-- Get the column names for the category metadata table.
-- The column names are the key to the ODMV_MDATAATTRSCHEMACATEGORY view.
l_query := '';
FOR rec IN (
SELECT column_name
FROM sys.dba_tab_columns
WHERE table_name = 'ODM_ECM_' || l_category_id
AND column_name not like 'ID'
) LOOP
-- Get the human-readable name of the attribute.
SELECT displayname
INTO l_displayname
FROM ODMV_MDATAATTRSCHEMACATEGORY
WHERE name = rec.column_name;
IF(l_displayname = 'Created/Received Date' AND p_create_date IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_create_date) || ''',';
END IF;
IF(l_displayname = 'Footer Number' AND p_footer_number IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_footer_number) || ''',';
END IF;
IF(l_displayname = 'To' AND p_to IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_to) || ''',';
END IF;
IF(l_displayname = 'From' AND p_from IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_from) || ''',';
END IF;
IF(l_displayname = 'Entered By' AND p_entered_by IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_entered_by) || ''',';
END IF;
IF(l_displayname = 'Sealed Stamped Documents/Drawings Available' AND p_hardcopy_available IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_hardcopy_available) || ''',';
END IF;
IF(l_displayname = 'Subject' AND p_subject IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_subject) || ''',';
END IF;
IF(l_displayname = 'Revision Number' AND p_revision_number IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_revision_number) || ''',';
END IF;
IF(l_displayname = 'Document Vendor' AND p_document_vendor IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_document_vendor) || ''',';
END IF;
IF(l_displayname = 'Drawing Number' AND p_drawing_number IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_drawing_number) || ''',';
END IF;
IF(l_displayname = 'Title' AND p_title IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_title) || ''',';
END IF;
IF(l_displayname = 'Drawing Revision' AND p_drawing_revision IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_drawing_revision) || ''',';
END IF;
IF(l_displayname = 'Drawing Sheet Number' AND p_drawing_sheet_number IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_drawing_sheet_number) || ''',';
END IF;
IF(l_displayname = 'Drawing Vendor' AND p_drawing_vendor IS NOT NULL) THEN
l_query := l_query || rec.column_name || ' = ''' || escape_naughties(p_drawing_vendor) || ''',';
END IF;
END LOOP;
IF(l_query IS NOT NULL) THEN
l_query := 'UPDATE ODM_ECM_' || l_category_id || ' SET ' || l_query;
l_query := RTRIM(l_query, ',');
l_query := l_query || ' WHERE ID = ''' || l_metadata_id || '''';
-- DEBUG: Uncomment to see the query we have written.
--RAISE_APPLICATION_ERROR(-20102, l_query);
EXECUTE IMMEDIATE l_query;
END IF;
END;
PROCEDURE find_metadata_id (
p_category IN VARCHAR2,
p_docid IN NUMBER,
o_metadata_id OUT NUMBER
IS
BEGIN
SELECT id
INTO o_metadata_id
FROM odm_publicobject
WHERE securingpublicobject = p_docid
AND classid IN (
SELECT associatedschemaobject
FROM odm_schemacategory
WHERE id IN (
SELECT id
FROM odm_metadataschemacategory
WHERE displayname LIKE p_category
END;
-- Basically analogous to a perl untaint.
FUNCTION escape_naughties(
p_badstring IN VARCHAR2
) RETURN VARCHAR2
IS
BEGIN
RETURN REPLACE(p_badstring, '''', '''''');
END;

Similar Messages

  • How to create folder with sub folder ?

    How to create folder with sub folder ?

    Hi,
    Questions. 17 / 17 unresolved -> very bad reputation
    but ok - let's help anyway ...
    1. create everything in Screen Painter
    2. set FromPane and ToPane property correct.
    example:
    Items in MainFolder: FromPane & ToPane: 1 to 3
    Items in SubFolderA (From 2 To 2) - SubFolderB (From 3 To 3)
    shouldn't be that difficult
    in your Code set oForm.PaneLevel when the user clicks on the Folder
    lg David

  • Create Folder with the name of expense report number in SHAREPOINT ?

    Hi All,
    iExpence - In expense report confirmation page. There is custom link.
    Requirement
    When user click on link, system should create folder with the name of expense report number in SHAREPOINT and copy copies of expense receipts in the created folder in SHAREPOINT.
    Please suggest.
    Thanks,

    OAF no api as such for this kind of customization. Rather try developing some web service or something similar which can be invoked from the custom link to do the job.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                   

  • Create BOM with item category L

    Hi,
    I am facing an issue while going to create BOM with item category L.
    System shows material type can not be used with item category L for that particular plant.
    Please help...
    Thanks,
    Rampreet Jaiswal
    Edited by: Csaba Szommer on Jan 11, 2012 12:21 PM

    Hi,
    Its also maintained * for header material.
    Guys we have already checked OS14 and OS24 at first. but it is allowed for header and item.
    regards,
    Solomon

  • Create folder with name Client150412n

    Hi,
    I'm new to ApplesScripting. I've found this script that I'd like to change:
    --This script will make a new folder on the desktop with current date and dialog box
    --format the date to 2010-11-19
    tell (current date) to get day & (it's month as integer) & (it's year as integer)
    set TheDateFormat to the result as text
    -- asks for folder name with date as default answer
    set TheFolderName to text returned of (display dialog "Name the folder" default answer TheDateFormat)
    --make folder with date & user entered text
    tell application "Finder"
      make new folder with properties {name:TheFolderName}
    end tell
    The desired changes:
    - Date format should be: 150412 + a letter (a, b, c) if the folder to be created already exists.
    - Place the cursor at the start of name dialog, no selection active.
    - The new folders should be created in /Users/Hans/Dropbox/Jobs/
    Thanks,
    Hans
    Another question is related to execution of the script:
    - How can I start the script easily with a shortcut key or a Dock icon?
    - Is it possible to select client name from a plain text file containing client names in separate lines?
    - Is it possible to have zip files automatically unzipped to subfolder names with the zip package name?
    - Regarding the Dock icon I could even imagine that I drag a zip or other file from an email or the Desktop to the icon and that I only have to type the clients name to have the file moved to a new folder.

    save script as an application bundle.  Drag app to dock.
    Set short-cut key to app.
    AppleScript   Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Third Edition the book
    AppleScript Language Guide pdf download the pdf file

  • Create folder with multiple files (was: folders)

    Can you create a folder with multiple files and direct the page to go to the folder and then the reader can select the file they wish to choose?  Example  Council Mintes Folder with a file for each set of minutes.  The hyperlink would open the folder and then the reader would select whch set of minutes they'd like to see.

    You may not have access to it depending on your hosting company and  plan, but if you did have the ability to change it you'd normally do it in the admin area of your hosting account which would update the proper files on your server.
    You may also be able to do it manually, but the "how to" depends on the server type you are running.
    EDIT: I'd still suggest using a server script (like the PHP I linked to) because the look of a directory with browsing turned on is pretty ugly and can't be changes since it's not a page on your site. With the PHP I linked to, you could have an actual page for your links, complete with your site's design, that simply lists the files from the specified directory. It's very simple to set up if you have PHP on your server.

  • Automator: Create folder with name and subfolders in it.

    Hello everyone, my question is related to Automator. I work in a company where we have a huge server. Every time a new job comes in it gets a six digits number and a folder with 5/6 subfolder needs to be created. The main folder will be xxxxxx_nameofbrand and will contain 5 subfolder each one of them starting with the six digit number assigned initially followed by 5 tags (always the same ones).
    Everytime it's a long thing to create it manually and copy and paste every number and name, so I thought I could use automator to do it easilly but I always get stucked at the part where I want the 5 subfolder to go in the main one. This is what I had done, but I'm pretty sure there is a faster/easier way to do it.. I'm really new to automator, I know it's potential but don't know how to use it very well..
    I thank you all for the help.

    For this kind of exception, you can just add a Run AppleScript action at the end of the workflow - for example, the following will rename all folders ending with the specified name that are at the specified depth in the structure:
    on run {input, parameters} # remove prefix from folder name
      set sourceFolder to quoted form of POSIX path of (input as text)
      set exceptionName to "Links" # will find a name ending with this (case sensitive match)
      set exceptionDepth to 2 # at a folder depth of this
      set theFolders to (do shell script "find " & sourceFolder & " -name " & quoted form of ("*" & exceptionName) & " -depth " & exceptionDepth)
      repeat with anItem in paragraphs of theFolders # rename without prefix
        tell application "System Events" to set name of folder anItem to exceptionName
      end repeat
      return input
    end run

  • Creating folder with permission in network

    help me!!
    I have problem..
    how can I create a folder in the network with permission that only the
    admin and the users can only view?

    the main suggestion is this: don't use dots in folder names. there are plenty of other characters to use. this just confuses the system into thinking its a file extension. in the short term reset your launch services database. delete the file home directory/library/preferences/com.apple.launchservices.plist and run the following terminal command
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    see if that helps.

  • When importing, creates folder with wrong date

    I found a curious bug in Lightroom 4.2.
    If I have pictures taken after 23:00, Lightroom creates an import folder in the next day, but the dates in the files are correct.
    Example:
    The file's date is: 29/11/2012 23:19.
    However if I hover my mouse over the image in the import dialog:
    The date that appears is 30/11/2012 00:19. Here's the detail:
    After you import, you get the image in the wrong import folder, but the meta on the image is correct:
    I've started to notice this before, but always thought of a wrong date on my camera. Just noticed that this happens with my camera, iPhone, and any other photo that has a time after 23:00.
    Do you know if there is a solution for this?
    Thank you in advance,
    Manuel Azevedo

    Does your computer time match with your camera time? Summer-/winter-time apart?
    The reason, why I am asking this: the map module auto-assumes that these times match (rather than asking you in which UTC-time zone your image time stamps should be interpreted when tagging from a gpx-track).
    Could be that something similar is happening in import module if you let LR auto-create destination folders based on date-time.
    I have no experience with this as I prefer to explicitely give the names of the new destination folders myself.
    Cornelia

  • Creating Folder with "numbers" at end makes Kind=Numbers

    After the last Apple security update, any time a folder is created that has the same last segment as a document suffix, that folder is automatically changed from folder to the kind of document that has that suffix.
    i.e if I have and existing folder named my.documents and I change the name to my.pages, that folder changes to kind=pages, and pages will launch if I double click on the name. If I use "Show Package Contents", the contents of the folder are listed as it should.
    If I rename the my.pages back to my.documents, then kind reverts back to folder.
    I have tried this with several suffixes and it is 100% consistent; if I change the folder name so that the last segment matches a file type suffix, the folder kind is automatically changed to the associated document type.
    How do I keep the OS from changing the kind attribute? Why did this start happening in the first place?
    As I said, this has just started happening, and to folders that have existed for years.
    Any help or suggestions would be greatly appreciated.
    TIA

    the main suggestion is this: don't use dots in folder names. there are plenty of other characters to use. this just confuses the system into thinking its a file extension. in the short term reset your launch services database. delete the file home directory/library/preferences/com.apple.launchservices.plist and run the following terminal command
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    see if that helps.

  • Create Folder with DDX in PDF Portfolio or add files to Folder

    can I create folders in a PDF file same as we do with the Adobe Acrobat Portfolio using only DDX? I tried using PackageFiles, but had no results.

    The Assembler service in LiveCycle ES (8.2) does not provide a way to specify folders within a PDF portfolio.
    For more information about PDF portfolio capabilities in LiveCycle 8.2, see Using Assembler to Create PDF Portfolios.

  • LV 7.1 - How can I use installer to create folder with its files included w/o adding each file?

    I have several files to place in folders created by the installer. Can't seem to see how I can avoid adding each file individually at build time. Is there an easier way to do this? Simply "adding" a folder would be a solution.
    Thanks
    Fran

    Fran,
    I believe this question is directly addressed in this online Knowledgebase.
    Kind Regards,
    E. Sulzer
    Applications Engineer
    National Instruments

  • Create Folder with custom FolderClass (string)

    Hi, 
    When creating a new folder, how does one set the FolderClass (IPF.XXXXX) string inside Outlook?
    Similar to following using EWS
    var f = new Folder(_svc);
    f.FolderClass = "IPF.Note.ITQ.Custom";
    The closest to FolderClass string I could find is, DefaultMessageClass property, but its read-only.

    Try to set the PR_CONTAINER_CLASS property (DASL name http://schemas.microsoft.com/mapi/proptag/0x3613001F) using MAPIFolder.PropertyAccessor.SetProperty.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

  • Newbie needs help creating folder with different date buckets

    A simplification my scenario, I have a table, Invoice, which contains invoice amounts and invoice dates. I want to break up the invoices amounts into date buckets, such that my target report should look something like this:
    Invoices<30 Invoices<60 Invoices<90 Invoices>90
    $100 $250 $500 $1000
    I have created a folder from the Invoice table, and would like to know if it is possible to create new items within this folder to allow me to sum invoice amounts over the 0-30, 30-60, 60-90, 90+ invoice date ranges. In other words, can I create new items that each have their own condition?
    I have seen other solutions that use a custom folder backed by a SQL query using case statements to break a table down into its date range buckets. Is this considered the "right" approach to the problem?
    A simpler solution I've thought of is creating a folder for each date range (Invoices30, Invoices60, etc), and setting the condition of the folder to do the date filtering. The item "Invoice Amount" in each folder ends up being the bucket I want, and I would put them together in a complex folder, and build the report off the complex folder. Although inelegant and a bit redundant, would this solution work?
    Thanks everybody!

    Hi Newbie
    You can do this right inside Discoverer using a couple of calculations.
    Calc 1:
    =====
    Calculate the invoice date variance, let's say you will use TRUNC(SYSDATE) - TRUNC(INVOICE DATE). This gives you a number and let's call this new calculation VARIANCE.
    Calc 2:
    =====
    This second calculation created the buckets themself. Let's do it using a CASE statement and we'll call the calculation TIME BUCKET.
    CASE
    WHEN VARIANCE <= 30 THEN "0 to 30"
    WHEN VARIANCE <= 60 THEN "30 to 60"
    WHEN VARIANCE <= 90 THEN "60 to 90"
    ELSE "More than 90"
    END
    You now display only TIME BUCKET in your workbook. The other calculation, VARIANCE, will be used but not displayed on screen in the final answer.
    If you don't like CASE, here's the same answer using DECODE:
    DECODE(VARIANCE,
    LEAST(VARIANCE,30), "0 to 30",
    LEAST(VARIANCE,60), "30 to 60",
    LEAST(VARIANCE,90), "60 to 90","More than 90")
    By the way, when you do this you will find that Discoverer runs your report very fast. This is because it can handle these types of queries exceptionally well.
    I hope this helps
    Regards
    Michael

  • Create Folder with DDX in PDF Package and add files in an specific Folder

    Hi everyone, I can create a package or portfolio that contains a directory structure and add pdf documents at different times to a specific directory and expand its content similar to a digital file which incrementally add documents?
    If you know of any example would help me a lot.
    Thanks.

    The Assembler service in LiveCycle ES (8.2) does not provide a way to specify folders within a PDF portfolio.
    For more information about PDF portfolio capabilities in LiveCycle 8.2, see Using Assembler to Create PDF Portfolios.

Maybe you are looking for

  • How to render animation to a MP4 format or something else?

    Hello. I usually render my animation to uncompressed AVI because after it I have to render it again with different software for video motage. So there wasn't any problem. But today I have to render my animation directly from After Effects. So I can't

  • After Effects 7 keeps prompting me for serial # and won't let me in.

    I can't get After Effects 7 to work in  my CS2 bundle.  It prompts me for a serial #.  I enter it and it says it is not the correct serial number.  So I uninstalled the entire bundle.  Problem is, After Effects 7 won't uninstall either.  Any ideas?  

  • N85 bottom speaker problem

    Hi everybody, Just bought N85 (made in china) with latest firmware 11.047 with bottom speaker not working at all. Does anybody else encounter such problem? Is it a hardware failure or firmware? Thanks in advance. Regards,

  • How to import matching RAWs for a large library?

    I've been using iPhoto for many years to manage JPEGs while just keeping RAWs on the side on a large disk. Since Aperture allows me to reference those RAWs without storing them locally, I'd like to do so. The only problem is, it doesn't seem to be po

  • 24-Bit, 96kHz Microsoft PCM WAVs result in no audio in any media player

    Hi guys, I have some downmixes saved by other progarms as 24-Bit 96kHz Stereo WAV files that play fine in all media players. However, when I save these or any other upconverted 16-bit files in Audition 3.0 as "Microsoft PCM WAV" (24-Bit, 96kHz, Stere