Search Document by category and by folder restriction

HI !
I have a problem :
I'm using Search Java API to find "All Documents which have a category and I would like to restrict the search to a subfolder"
So , I found in Javadoc and in IFS Developer reference some piece of code but that doesn't return hits :
AttributeSearchSpecification asp = new AttributeSearchSpecification();
     String [] classNames = new String[] {"Category"};
     SearchClassSpecification scp = new SearchClassSpecification(classNames);
     scp.addResultClass("Category");     
     asp.setSearchClassSpecification(scp);
FolderRestrictQualification frq1 = new FolderRestrictQualification();
Folder startFolder = ifsSession.getPrimaryUserProfile().getHomeFolder();
     frq1.setStartFolder(startFolder);
frq1.setMultiLevel(true);
     asp.setSearchQualification(frq1);     
     recherche = new Search(ifsSession,asp);
Could you help me please ?
Thank you.

HI !
I have a problem :
I'm using Search Java API to find "All Documents which have a category and I would like to restrict the search to a subfolder"
So , I found in Javadoc and in IFS Developer reference some piece of code but that doesn't return hits :
AttributeSearchSpecification asp = new AttributeSearchSpecification();
     String [] classNames = new String[] {"Category"};
     SearchClassSpecification scp = new SearchClassSpecification(classNames);
     scp.addResultClass("Category");     
     asp.setSearchClassSpecification(scp);
FolderRestrictQualification frq1 = new FolderRestrictQualification();
Folder startFolder = ifsSession.getPrimaryUserProfile().getHomeFolder();
     frq1.setStartFolder(startFolder);
frq1.setMultiLevel(true);
     asp.setSearchQualification(frq1);     
     recherche = new Search(ifsSession,asp);You'll have to join the document with its category, and add this JoinQualification to the searchqualification..
example:
JoinQualification jq=new JoinQualification();
jq.setLeftAttribute(Document.CLASS_NAME,null);
jq.setRightAttribute(YOUR_CATEGORY_CLASS_NAME,Category.ASSOCIATED_PUBLICOBJECT);
//joining Document.id with its category
then AND-ing JoinQualification with FolderResrictQualification via SearchQualification
last step, inserting the SearchQualification into the AttributeSearchSpecification,
and dont forget to include Document and your_category_class_name in the SearchClassSpecification,
because you seems to forget it?
and ofcourse the resultclass is the Document, not the Category, since you're trying to get document, right?
Hope it helps

Similar Messages

  • How to classify a Document into Category and subcategories

    Hi,
    We have a fully functional basic KM system where we upload documents into folders and subfolders. Now we have a requirement to classify the documents into categories and subcategories at the time of uploading the document. This classification will be irrespective of the physical location (folder/subfolder) of the document. For example I may have two different documents in the same subfolder, one may be classified as category "General" and subcategory "News", and the other may be classified as category "Technical" and subcategory "Whitepaper".
    Also we should be able to filter our document search based on subcategories. When we search a document based on a subcategory, then the search must fetch only those documents which have been marked as belonging to that subcategory while uploading the document. In the search page, the categories must appear as dropdowns and the dropdown values must contain the respective subcategories.
    As mentioned earlier, these categories and subcategories are independent of the KM directory structure.
    Please let us know how to go about this step by step.
    regards,
    SJ.

    Hi
    I think you can solve your problem with "Custom Properties"
    Using custom properties, u will not only get "Check box", but also "Dropdown"
    In your custom property, do the following
    Multivalued : Check the check box
    Allowed Values (csv) : Give your options
    Please check this <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/de31ec90-0201-0010-be95-f501d25027a8">article</a>
    It talks about dependent properties, through which you can have , category & subcategories
    Hope this will help you
    Regards
    Aparnna

  • Mounting Documents, Music, Video and Picture folder to different location.

    I would like to mount the documents, video, picture and music folders to a different location than \users\<username\. Anyone know how I can go about doing this? My goal is to have those folders default to folders on a shared partition on the drive. I am dual booting OS X and Vista and would like to share the folders I listed above so both operating systems can read and write to them. I have my drives setup as follows:
    Partition 1 OS X
    Partition 2 Vista OS
    Partition 3 Shared
    I already have Vista defaulting to the correct folders on the shared drives but not sure how to get it done with OS X.
    Thanks in advance for the help.

    Moving the default folders may cause problems with installers and such that expect them to be where they normally are, and there may be various permissions issues. With that said, you should be able to create an alias or symbolic link to the desired folders and place them in your shared partition.

  • Search problems : Boolean expressions and spam folder

    I get about 1000 spam per day that I have to check.
    Some of them contains certain keyword that the real emails would never have.
    I would like to setup a smart folder or similar that found all emails in the spam folder that contains any of those keywords. I read some blogs etc. that said that spotlight boolean expressions could be used but they do not seem to work.
    e.g. "pill OR berry" yields no results at all but when each of the keywords are used on their own they produce 80 or so results each.
    Another problem I have is that I can do a manual search in the spam folder by typing in the search field and it yields results. But if I save that as a smart folder it yields no results at all. It seems that the rules do not work on the spam folder.
    I then tried to do all this from spotlight in the finder. I found the folder where the spam mailbox emails are stored (called "messages"). I managed to construct a nice search query and save it as a search. But if I delete one of the emails from the finder it still remains in Mail and the next time I start Mail it will be regenerated from somewhere.
    Anyone have any insights to provide here?

    I had actually missed that preference. Unfortunately it did not help.
    Even if I make a new smart mailbox with just one rule (the email must be in the spam folder) it doesnt work. It doesn't matter if I change between any/all either.
    I started experimenting with adding a rule saying that the email must not be in any of the other mailboxes but spam. That seemed to work for a bit but as I added more rules, excluding more mailboxes, it eventually broke. I will investigate it a bit more but currently don't have high hopes...

  • I have typed many documents to pages and saved as a folder i have just looked in the folder and everything has gone help

    i have typed many documents on pages and saved to a new folder i created i have just opened it half hour ago and saved some more and all ok i just reopened to save another and all the documents have gone help how do i get them back and where they go ??????

    On Lion 10.7.x you need to hold the CMD+r Keys insyead of notting from an Instsall Disc, but try that & step 3 onward...
    "Try Disk Utility
       1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
       2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
          Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
       3. Click the First Aid tab.
       4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
       5. Select your Mac OS X volume.
       6. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214

  • User cannot access redirected Documents folder, but can connect to share in Windows Explorer and access folder on server

    I am in the final stages of a cross-forest migration.  Users have Windows 7 workstations with redirected folders on a Windows Server 2012 box running in the old forest.  User accounts were not migrated.  The accounts in use have always
    been in the "new" forest.  One of our challenges was the large volume of data in redirected folders.  I made sure users in the target forest had continued to have access to their redirected folders in the old forest and robocopied
    the entire users share, copying the permissions with the files.  By doing incremental robocopies, we can get a final copy done now in about six hours.  The plan was simple: copy the files, do an incremental copy every night, on the night of the cutover
    change the folder redirection policy Documents path from
    \\oldserver\users\%USERNAME% to
    \\newserver\users\%USERNAME%. The policy is configured to NOT copy user files from the existing folder to the new redirected folder.  Everything was going well until I tested the policy change.  After the folder redirection policy is updated
    and applied, the user cannot access the private Documents folder.  For example, user Chester Tester logs on as ctester.  I open Windows Explorer and click the Documents shortcut.  I see one subfolder, which is subfolder of Public Documents. 
    So I can look at Public Documents but when I click on the Documents folder (Under the Documents library link) I get an access denied error.  Now for the kicker, if I open another Windows Explorer window and edit the address bar to
    \\newserver\users\ctester, I can navigate the Documents folder tree and see my thousands of documents. What the ....?
    I'm hoping this is something really simple to fix!
    TIA

    HI Vivian,
    Thank you for your reply.  Yes, the path in Group Policy Folder Redirection Root Path was updated to
    \\NEWSERVER\users.  I had planned to point this to the distributed file system, so the first used was actually
    \\domain\dfs\users.  To simplify things I have backed off to copying to just a normal share
    \\newserver\users. 
    We are using BASIC folder redirection and we create a folder for each user under the root path. 
    We did not want the policy to move content, as we were seeing users requiring 15-20 minute logon times  (or higher) after the policy is changed.
    Grant the User exclusive right to Documents - Disabled
    Move the contents of Documents to the new location - Disabled
    Related folder settings
    Video - Follow Documents
    Music - Follow Documents
    Pictures - Follow Documents
    Now when I change the folder redirection from old server to new server I now have TWO My Documents folders in the user's redirection folder on the server.  The redirected Documents points to an empty folder set.  The copied folders with all user
    data are there, but folder redirection refuses to recognize the original folder.
    I am looking at the full view of the folder, nothing hidden, so I'm wondering how a folder can have two subfolders with the exact same name.  For now, I just want the redirection to move from the old server to the new server properly.  I deleted
    the new My Documents folder, rebooted the user's workstation and tried again.  The behavior repeats itself, i.e., a new My Documents folder is always created when the redirection policy is changed from the old server to the new server.  The environment
    has about 1500 users with approximately 1.3TB of data in the redirected Documents folders.  OUCH!

  • PO - Document Type FO and Item Category B - Can they be transferred to SUS?

    Hi SDN
    We are using R/3 4.7 with SRM 5.0 - Classic Scenario and XI 4.0.  We are just about to launch an SUS project to put our PO's on SUS for our suppliers.  Our organization is dealing with PO's for both Goods and Services.  As we know that there are no problems about putting the GR-Type PO's (NB type) on SUS but I would like to know if it is possible to transfer PO's that would be from the Document Type FO and Item Category B (Blanket PO) to SUS and ensure that our suppliers can do the entire PO Acknowledgement, PO Change and post the Invoice via SUS.  If not, what are the options for our R/3 - SUS installation?
    Thanks!
    Eric L.
    Edited by: Eric Longpré on Apr 23, 2009 12:57 PM

    Hi,
    This has been discussed several times on this FORUM..Pls refer the foll threads for more details:
    PR document type in the back end system
    Change "Document Type in R/3 System" in SC
    Changing document type of PO backend
    Re: Change PO number/document type
    BR,
    Disha.
    Do reward points for useful answers.

  • Attempting to upgarde itunes and I get an error message looking for "an alternate path to a folder containing 'iTunes.msi' location.  I've searched my hard drive and the file doesn't exist.  What to do?

    Attempting to upgarde itunes and I get an error message looking for "an alternate path to a folder containing 'iTunes.msi' location.  I've searched my hard drive and the file doesn't exist.  What to do?

    This worked...found on a prior discussion:
    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page)...
    http://majorgeeks.com/download.php?det=4459
    From the link above (near the top of the page)....Under 'download locations'   click on 'download@majorgeeks'
    To install the utility, doubleclick the msicuu2.exe file you just downloaded and ran.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Restart your computer.
    Re-download Itunes (latest version form Itunes website) and install.  It worked!

  • Using Oracle Text to search through WORD, EXCEL and PDF documents

    Hello again,
    What I would like to know is if I have a WORD or PDF document stored in a table. Is it possible to use Oracle Text to search through the actual WORD or PDF document?
    Thanks
    Doug

    Yes you can do context sensitive searches on both PDF and Word docs. With the PDF you need to make sure they are text and not images. Some scanners will create PDFs that are nothing more than images of document.
    Below is code sample that I made some time back to demonstrate the searching capabilities of Oracle Text. Note that the example makes use of the inso_filter that is no longer shipped with Oracle begging with Patch set 10.1.0.4. See metalink note 298017.1 for the changes. See the following link for more information on developing with Oracle Text.
    http://download-west.oracle.com/docs/cd/B14117_01/text.101/b10729/toc.htm
    begin example.
    -- The following needs to be executed
    -- as sys.
    DROP DIRECTORY docs_dir;
    CREATE OR REPLACE DIRECTORY docs_dir
    AS 'C:\sql\oracle_text\documents';
    GRANT READ ON DIRECTORY docs_dir TO text;
    -- End sys ran SQL
    DROP TABLE db_docs CASCADE CONSTRAINTS PURGE;
    CREATE TABLE db_docs (
    id NUMBER,
    format VARCHAR2(10),
    location VARCHAR2(50),
    document BLOB,
    CONSTRAINT i_db_docs_p PRIMARY KEY(id)
    -- Several notes need to be made about this anonymous block.
    -- First the 'DOCS_DIR' parameter is a directory object name.
    -- This directory object name must be in upper case.
    DECLARE
    f_lob BFILE;
    b_lob BLOB;
    document_name VARCHAR2(50);
    BEGIN
    document_name := 'externaltables.doc';
    INSERT INTO db_docs
    VALUES (1, 'binary', 'C:\sql\oracle_text\documents\externaltables.doc', empty_blob())
    RETURN document INTO b_lob;
    f_lob := BFILENAME('DOCS_DIR', document_name);
    DBMS_LOB.FILEOPEN(f_lob, DBMS_LOB.FILE_READONLY);
    DBMS_LOB.LOADFROMFILE(b_lob, f_lob, DBMS_LOB.GETLENGTH(f_lob));
    DBMS_LOB.FILECLOSE(f_lob);
    COMMIT;
    END;
    -- build the index
    -- Note that this index differs than the file system stored file
    -- in that paramter datastore is ctxsys.defautl_datastore and not
    -- ctxsys.file_datastore. FILE_DATASTORE is for documents that
    -- exist on the file system. DEFAULT_DATASTORE is for documents
    -- that are stored in the column.
    create index db_docs_ctx on db_docs(document)
    indextype is ctxsys.context
    parameters (
    'datastore ctxsys.default_datastore
    filter ctxsys.inso_filter
    format column format');
    --search for something that is known to not be in the document.
    SELECT SCORE(1), id, location
    FROM db_docs
    WHERE CONTAINS(document, 'Jenkinson', 1) > 0;
    --search for something that is known to be in the document.  
    SELECT SCORE(1), id, location
    FROM db_docs
    WHERE CONTAINS(document, 'Albright', 1) > 0;

  • Search text in PDF and MS Word document

    Can any body tell me how search text in PDF and MS Word document through Java code, any body has code or any suggestion to give
    Thank You
    Adnan

    Can any body tell me how search text in PDF
    and MS Word document through Java code, any
    body has code or any suggestion to giveYes.
    First, you need to work out how to read each document type from Java.
    E.g, for MS Word you could use Apache Jakarta POI - HWPF: http://jakarta.apache.org/poi/hwpf/index.html
    Then, you use Apache Lucene to index and search.
    See http://lucene.apache.org/java/docs/index.html
    ~D

  • How to get the document type, name and revision from the search page cv04n

    Hello,
    After performing cv04n and getting a list of documents satisfying the search criteria, how can I then get the document type, name and revision of the selected document using ABAP?
    Thanks

    HI,
    IN table DRAW... u have Document type, Version and document number.
    In Table DRAT also u get Document Type, Version, Number and Description of Doucment.
    Regards
    SAB

  • I have scanned about 1600 pages of 100-year old documents and saved them as pdf files.  I would like to search them for keywords and phrases.  Can anyone recommend software that can be used as an index for these documents?

    I have scanned about 1600 pages of 100-year old documents and saved them as pdf files.  I would like to search them for keywords and phrases.  Can anyone recommend software that can be used as an index or search engine for these documents?

    If you have Adobe Acrobat (not Adobe Reader) the program can perform an OCR on the document you acquired.
    In the past I used ABBYY FineReader

  • Updating a document with category metadata using updateDocument(): error!

    I have studied the sample code and the API docs, and I feel pretty sure I am coding it according to the docs, but I cannot successfully update a document with category metadata. I always get a MetaDataSchemaInvalid exception.
    My process goes like this:
    1. Upload a new file, creating a new document publicobject.
    2. Create a CATEGORY_DEFINITION with all the metadata name/value pairs I wish to write.
    3. Call FileManager.updateDocument() with this CATEGORY_DEFINITION.
    My process differs from the docs in that I am first uploading the document, and then adding the metadata as a second step. I want to get it working this way to make my system more modular. I do not want to make my upload method dependent upon metadata attributes, and vice versa.
    Step 1 is working fine. The document is being uploaded to the right folder. Good to go.
    Step 3 is where I get the error. If the error is my fault, then it must be a result of what I do in step 2. The structure of my CATEGORY_DEFINITION must be messed up.
    Here is my code for creating the CATEGORY_DEFINITION. The Document class is my own entity that encapsulates the binary data for a document, as well as the metadata attributes that are to be assigned to the document once it is uploaded into Content Services. We don't need to worry about where the data comes from. Just assume the raw data is correct.
    public NamedValue[] newCategoryAttributeDefinition(Document document, String categoryDisplayName) throws WebserviceClientException {
    /* Get the category attribute name-value pairs as a 2-D array. */
    Map metadataMap = document.getMetadataParser().getAttributeNameMapping();
    List categoryDefinitionAttributeList = new ArrayList();
    for(Iterator i = metadataMap.entrySet().iterator(); i.hasNext();) {
    Map.Entry entry = (Map.Entry)i.next();
    String name = "CUSTOM_" + (String)entry.getKey();
    Object value = entry.getValue();
    if(value != null) {
    categoryDefinitionAttributeList.add(new Object[] { name, value });
    Object[][] categoryDefinitionAttributeArray = new Object[categoryDefinitionAttributeList.size()][];
    int index = 0;
    for(Iterator i = categoryDefinitionAttributeList.iterator(); i.hasNext();) {
    Object[] value = (Object[])i.next();
    categoryDefinitionAttributeArray[index++] = value;
    /* Create the NamedValue tree that describes this category's attribute values. */
    Long categoryId = new Long(getCategoryClassId(categoryDisplayName));
    NamedValue[] categoryAttributeDefinition = WebserviceUtils.newNamedValueArray(new Object[][] {
    { Options.CATEGORY_ID, categoryId },
    { Options.CATEGORY_DEFINITION_ATTRIBUTES, WebserviceUtils.newNamedValueArray(categoryDefinitionAttributeArray) }
    NamedValue[] categoryDefinition = WebserviceUtils.newNamedValueArray(Options.CATEGORY_DEFINITION, categoryAttributeDefinition);
    return categoryDefinition;
    And below is the resulting CATEGORY_DEFINITION, as seen in a jdb debugger.
    -- The OPT.CATEGORY_ID value is equal to the ID column in ODMV_SCHEMACATEGORY, otherwise known as the category class id.
    -- My OPT.CATEGORY_DEFINITION_ATTRIBUTES tree for this document has the 4 attributes that I want to set. The category has more than these 4 attributes; I am not populating every attribute. None of the attributes are required, and all are editable. I don't need to include every attribute in my CATEGORY_DEFINITION, even if the values are null, do I? Also, all the attribute names start with "CUSTOM_", which I believe is necessary - right?
    -- I am setting only the OPT.CATEGORY_ID and OPT.CATEGORY_DEFINITION_ATTRIBUTES. Am I missing some other required attribute?
    http-8888-Processor5[1] http-8888-Processor5[1] dump categoryDefinition
    categoryDefinition = {
    instance of oracle.ifs.fdk.NamedValue(id=2562)
    http-8888-Processor5[1] dump categoryDefinition[0]
    categoryDefinition[0] = {
    name: "OPT.CATEGORY_DEFINITION"
    value: instance of oracle.ifs.fdk.NamedValue[2] (id=2559)
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[0]
    categoryDefinition[0].value[0] = {
    name: "OPT.CATEGORY_ID"
    value: instance of java.lang.Long(id=2558)
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[0].value.toString()
    categoryDefinition[0].value[0].value.toString() = "60068"
    http-8888-Processor5[1] dump categoryDefinition[0].value[1]
    categoryDefinition[0].value[1] = {
    name: "OPT.CATEGORY_DEFINITION_ATTRIBUTES"
    value: instance of oracle.ifs.fdk.NamedValue[4] (id=2570)
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[1].value[0]
    categoryDefinition[0].value[1].value[0] = {
    name: "CUSTOM_From"
    value: "SA"
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[1].value[1]
    categoryDefinition[0].value[1].value[1] = {
    name: "CUSTOM_Footer Number"
    value: "PRM 34-318"
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[1].value[2]
    categoryDefinition[0].value[1].value[2] = {
    name: "CUSTOM_To"
    value: "PROJECT TEAM"
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    http-8888-Processor5[1] dump categoryDefinition[0].value[1].value[3]
    categoryDefinition[0].value[1].value[3] = {
    name: "CUSTOM_Subject"
    value: "Riverside Energy Resource Center Meeting Minutes-Internal"
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2564)
    class$oracle$ifs$fdk$NamedValue: instance of java.lang.Class(reflected class=oracle.ifs.fdk.NamedValue, id=1975)
    After building this CATEGORY_DEFINITION, I go on to attempt an update to the document with this information. Here is the method I call. I always fall into the catch(), and the error dump follows the code snippet. Unfortunately, the error doesn't tell me a lot about what's wrong. That's why I am asking for help in spotting any conspicuous errors in my CATEGORY_DEFINITION.
    public Item addCategoryToDocument(Item documentItem,
    NamedValue[] categoryDefinition)
    throws WebserviceClientException {
    FileManager fileManager = getWebserviceClient().getFileManager();
    Item documentItemWithCategory = null;
    try {
    documentItemWithCategory = fileManager.updateDocument(documentItem.getId(), categoryDefinition, null);
    } catch(Exception e) {
    throw new WebserviceClientException("Could not update document with category definition.", e);
    return documentItemWithCategory;
    http-8888-Processor4[1] http-8888-Processor4[1] dump e
    e = {
    detailedErrorCode: "ORACLE.FDK.AggregateError"
    errorCode: "ORACLE.FDK.AggregateError"
    exceptionEntries: instance of oracle.ifs.fdk.FdkExceptionEntry[1] (id=2691)
    info: null
    serverStackTraceId: ""
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2694)
    class$oracle$ifs$fdk$FdkException: instance of java.lang.Class(reflected class=oracle.ifs.fdk.FdkException, id=1972)
    org.apache.axis.AxisFault.log: instance of org.apache.commons.logging.impl.Log4JLogger(id=2695)
    org.apache.axis.AxisFault.faultCode: instance of javax.xml.namespace.QName(id=2696)
    org.apache.axis.AxisFault.faultSubCode: null
    org.apache.axis.AxisFault.faultString: "ORACLE.FDK.AggregateError:ORACLE.FDK.AggregateError"
    org.apache.axis.AxisFault.faultActor: null
    org.apache.axis.AxisFault.faultDetails: instance of java.util.Vector(id=2698)
    org.apache.axis.AxisFault.faultNode: null
    org.apache.axis.AxisFault.faultHeaders: null
    org.apache.axis.AxisFault.class$org$apache$axis$AxisFault: instance of java.lang.Class(reflected class=org.apache.axis.AxisFault, id=1928)
    java.rmi.RemoteException.serialVersionUID: -5148567311918794206
    java.rmi.RemoteException.detail: null
    java.lang.Exception.serialVersionUID: -3387516993124229948
    java.lang.Throwable.serialVersionUID: -3042686055658047285
    java.lang.Throwable.detailMessage: null
    java.lang.Throwable.cause: null
    java.lang.Throwable.stackTrace: instance of java.lang.StackTraceElement[76] (id=2699)
    http-8888-Processor4[1] dump e.exceptionEntries[0]
    e.exceptionEntries[0] = {
    detailedErrorCode: "ORACLE.FDK.MetadataSchemaInvalid"
    errorCode: "ORACLE.FDK.MetaDataError"
    id: 348018
    info: null
    serverStackTraceId: ""
    __equalsCalc: null
    __hashCodeCalc: false
    typeDesc: instance of org.apache.axis.description.TypeDesc(id=2705)
    class$oracle$ifs$fdk$FdkExceptionEntry: instance of java.lang.Class(reflected class=oracle.ifs.fdk.FdkExceptionEntry, id=1973)
    }

    1 – For an existing document, how do I determine what category instances have been applied to it and their attribute values
    FdkSession session = …;
    // Consider we have an existing item myDoc of type document
    Item myDoc = …;
    CommonManager cm = Managers.getCommonManager(session);
    AttributeRequest[] requestedAttributes = new AttributeRequest[]
      // The Categories associated with this Document, if any
    new AttributeRequest(Attributes.CATEGORIES,
      // sub attributerequest
      new AttributeRequest[] {
        // the actual attributes name/values for the category instance – returns a namedvalue array
        new AttributeRequest(Attributes.CUSTOM_ALL,null),
        // the actual category class for the category instance – returns an item
        new AttributeRequest(Attributes.CATEGORY_CLASS_OBJECT,null)
    myDoc = cm.getItem(myDoc.getId(), requestedAttributes);
    log(myDoc); /* output could look like:
    (Item) 14385 DOCUMENT sample3.doc
    requested attributes ...
    CATEGORIES (Item[])=
    (Item) 14387 CATEGORY
    requested attributes ...
    CUSTOM_ALL (NamedValue[])=
    CUSTOM_14352=true (Boolean)
    CUSTOM_14353=Internal Only Pending Review (String)
    CATEGORY_CLASS_OBJECT (Item)=
    (Item) 14354 CATEGORY_CLASS 5044-14351
    This means, that for document sample3.doc, we have 1 instance of a category object applied to it.
    The category object instance has id 14387. The instance is of a category class object type 14354. The instance has two attributes with internal names CUSTOM_14352, and CUSTOM_15353. The values of these attributes are of type Boolean and String respectively.
    2 - How do I update an attribute value of an existing category instance applied to an item
    FdkSession session = …;
    // Consider we have an existing item myDoc of type document
    Item myDoc = …;
    .. perform code along the lines of that shown in step1 above to determine existing category instance info on the document ..
    FileManager fm = Managers.getFileManager(session);
    NamedValue[] categoryInstanceAttributes = new NamedValue[] {
      // use the internal attribute name for all attributes
      new NamedValue("CUSTOM_14352", Boolean.FALSE),
      new NamedValue("CUSTOM_14352", "Company Confidential")
    NamedValue[] categoryDef = new NamedValue[] {
      // the category instance that we are updating
    new NamedValue(Options.UPDATE_CATEGORY_ID,new Long(14387)),
    // the updated values of the category instance
      new NamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES, categoryInstanceAttributes)
    NamedValue[] documentDef = new NamedValue[] {
    new NamedValue(Options.CATEGORY_DEFINITION, categoryDef)
    requestedAttributes = ...
    myDoc = fm.updateDocument(myDoc.getId(),documentDef,requestedAttributes) ;
    3 – For a document item X, what is the associated category configuration which could include
    a) what are the category objects I can apply on it (either explicitly restricted by way of ALLOWED_CATEGORIES on the folder configuration, or any site/domain category by way of ALLOW_ALL_CATEGORIES)
    b) is there any attribute overrides
    c) is there any enforced categories
    FdkSession session = …;
    // Consider we have an existing item myDoc of type document
    Item myDoc = …;
    CommonManager cm = Managers.getCommonManager(session);
    AttributeRequest[] categoryObjectAttributes = new AttributeRequest[]
    // What is the category object class name
    new AttributeRequest(Attributes.CLASS_NAME,null),
      // What is the category classobject display name
    new AttributeRequest(Attributes.DISPLAY_NAME,null),
    // get attributes inherited and introduced by category object
    new AttributeRequest(Attributes.METADATA_ATTRIBUTES,
      new AttributeRequest[]
        // Attribute internal name
        new AttributeRequest(Attributes.ATTRIBUTE_NAME,null),
        // Attribute display name
        new AttributeRequest(Attributes.DISPLAY_NAME,null),
        new AttributeRequest(Attributes.ATTRIBUTE_TYPE,null),
        new AttributeRequest(Attributes.ATTRIBUTE_DEFAULT,null),
        new AttributeRequest(Attributes.ATTRIBUTE_ENUMERATION,null),
        new AttributeRequest(Attributes.ATTRIBUTE_REQUIRED,null),
        new AttributeRequest(Attributes.ATTRIBUTE_SETTABLE,null),
        new AttributeRequest(Attributes.ATTRIBUTE_UPDATEABLE,null),
        new AttributeRequest(Attributes.ATTRIBUTE_HIDDEN,null),
        new AttributeRequest(Attributes.ATTRIBUTE_PROMPTED,null),
        new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDEABLE,null),
    AttributeRequest[] overrideAttributes = new AttributeRequest[]
    // id of the attribute to be overridden
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_ATTRIBUTE,null),
    // id of the category class object to which this attribute override applies
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_CATEGORY_CLASS,null),
    // new default value
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_DEFAULT,null),
    // should attribute now be prompted
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_PROMPT,null),
    // is the attribute now required
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_REQUIRED,null),
    // can instances of this attribute have there value updated
    new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDE_SETTABLE,null),
    AttributeRequest[] requestedAttributes = new AttributeRequest[]
    // what is the category configuration for the item
    new AttributeRequest(Attributes.CATEGORY_CONFIGURATION,
      new AttributeRequest[]
        // Is the category configuration enabled
         new AttributeRequest(Attributes.CONFIGURATION_ENABLED,null),
         // Can the category configuration be overridden or is it final
        new AttributeRequest(Attributes.CONFIGURATION_FINAL,null),
        // What are the required categories for the category configuration and associated attribute information
        new AttributeRequest(Attributes.REQUIRED_CATEGORIES,categoryObjectAttributes),
        // Can any categories in the site be utilized
        new AttributeRequest(Attributes.ALLOW_ALL_CATEGORIES,null),
        // or .. are we restricting the categories to only the following
        new AttributeRequest(Attributes.ALLOWED_CATEGORIES,categoryObjectAttributes),
        // are there any attribute overrides on category object attributes for this category config?
        new AttributeRequest(Attributes.ATTRIBUTE_OVERRIDES,overrideAttributes)
    log(cm.getItem(myDoc.getId(), requestedAttributes); /*
    If ALLOW_ALL_CATEGORIES is set to true, any category in the domain can be utilized that is not abstract. To determine these, the domain item has a property CATEGORY_CLASSES that returns all category objects in the domain. It also has a property ROOT_CATEGORY_CLASSES which returns just the top level categories (those that have no custom category superclass). You would create a sub AttributeRequest[] checking for CLASS_ABSTRACT when requesting the appropriate categories attribute from the domain.
    If ALLOW_ALL_CATEGORIES is set to false, the applicable categories objects that can be utilized on items contained in the folder is determined by the items contained in the ALLOWED_CATEGORIES attribute of the category configuration.
    Finally, the REQUIRED_CATEGORIES attribute list the category items that must be applied to all new items added to the folder.
    4 – How do I manually apply an instance of a category to an existing item
    FdkSession session = …;
    // Consider we have an existing item myDoc of type document
    Item myDoc = …;
    .. use techniques in step3 above to determine what category objects that you planning to apply to the document ..
    .. if the category configuration on the item has ALLOW_ALL_CATEGORIES set to true, you can use any category in the system
    .. otherwise, you must use a category defined in the allowed categories list
    .. the code here is essentially the same as step2 above
    .. you must utilize internal attribute names, and specify the id of the category class object
    FileManager fm = Managers.getFileManager(session);
    NamedValue[] categoryInstanceAttributes = new NamedValue[] {
      // use the internal attribute name for all attributes
      new NamedValue("CUSTOM_14352", Boolean.FALSE),
      new NamedValue("CUSTOM_14352", "Company Confidential")
    NamedValue[] categoryDef = new NamedValue[] {
      // the id of the category object class for which this new category will be an instance of
    new NamedValue(Options.CATEGORY_CLASS_ID,new Long(14354)),
    // the updated values of the category instance
      new NamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES, categoryInstanceAttributes)
    NamedValue[] documentDef = new NamedValue[] {
    new NamedValue(Options.CATEGORY_DEFINITION, categoryDef)
    requestedAttributes = ...
    myDoc = fm.updateDocument(myDoc.getId(),documentDef,requestedAttributes);
    // Note – it is possible for one to peform creation, updating, and deletion of various category instances for an existing item in the fileManager updateDocument call!
    // you simply supply multiple Options.CATEGORY_DEFINITIONs to the fm.updateDocument call along with any Options.REMOVE_CATEGORY_IDs 5 – How do I specify a category instance when creating a new item
    FdkSession session = …;
    .. use techniques in step3 above to determine what category objects that you planning to apply to the new document ..
    .. you get the category configuration information from the destination folder!!!
    Item destinationFolder = …;
    CommonManager cm = Managers.getCommonManager(session);
    AttributeRequest[] requestedAttributes = new AttributeRequest[]
    // what is the category configuration for the item
    new AttributeRequest(Attributes.CATEGORY_CONFIGURATION,
    destinationFolder = cm.getItem(destinationFolder.getId(),requestedAttributes);.. if the category configuration on the folder item has ALLOW_ALL_CATEGORIES set to true, you can use any category in the system
    .. otherwise, you must use a category defined in the allowed categories list
    .. the code here is essentially the same as step2 above, just we are using createDocument and document definitions now
    .. you must utilize internal attribute names, and specify the id of the category class object
    FileManager fm = Managers.getFileManager(session);
    NamedValue[] categoryInstanceAttributes = new NamedValue[] {
      // use the internal attribute name for all attributes
      new NamedValue("CUSTOM_14352", Boolean.FALSE),
      new NamedValue("CUSTOM_14352", "Company Confidential")
    NamedValue[] categoryDef = new NamedValue[] {
      // the id of the category object class for which this new category will be an instance of
    new NamedValue(Options.CATEGORY_CLASS_ID,new Long(14354)),
    // the attribute values for this new category instance
      new NamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES, categoryInstanceAttributes)
    String destinationFile = "sample.doc";
    requestedAttributes = new AttributeRequest[]
      new AttributeRequest(Attributes.URL,null)
    Item docDef = fm.createDocumentDefinition(new NamedValue[]
      new NamedValue(Attributes.NAME, destinationFile),
    },requestedAttributes);
    String defURL = ...  // get URL from document definition
    doFileUpload(...)  // upload file using http put to defURL
    NamedValue[] documentDef = new NamedValue[] {
      new NamedValue(Options.USE_SAVED_DEFINITION,new Long(docDef.getId())),
    new NamedValue(Options.DESTFOLDER, new Long(destinationFolder.getId())),
    // specify character set if appropriate
      new NamedValue(Attributes.DOCUMENT_CHARACTER_SET,"ISO-8859-1"),
      // specify language if appropriate
    new NamedValue(Attributes.DOCUMENT_LANGUAGE,"ENGLISH"),
    // apply category instance information
    new NamedValue(Options.CATEGORY_DEFINITION, categoryDef),
    requestedAttributes = ...
    Item doc = fm.createDocument(documentDef,null, requestedAttributes);
    // Note – it is possible for one to peform creation of multiple category instances on a document at the same time
    // you simply supply multiple Options.CATEGORY_DEFINITIONs to the fm.createDocument call
    // Note – that if a folder has a category configuration containing required categories, and you do not specify
    // all applicable category definitions on createDocument, you will receive an FdkException along the lines of
    // missing metadata. You can catch this exception, and retry the createDocument call supplying the valid category definition(s).

  • HT1338 I'm trying to print a document fro safari and the print command is at the bottom of the page and not visible.  I can't move it up and the print command shortcut doesn't work.  How do I print this document.

    I'm trying to print a document from safari and the print command is at the bottom of the page and I can't move it up.  The print command shortcut doesn't work and I would like to know how I can print this document.

    Why do we have to install 2 add ins for something that should be built in? Please add this to the next version or an update to this one even. We should see the full path of a bookmark when we search for it. Show Parent Folder alone isn't enough if you have sub folders, so I installed Go Parent Folder as well in case of sub folders.

  • How to search documents without tags?

    Is it possible to search documents without tags?
    Is there a search keyword or phrase, such as "not TAG", that we can use to search for the documents that are not attached with any tag?
    The OS being used is Yosemite.
    Many thanks

    You can use Smart Folders in Finder: OS X Mavericks: Create or modify a Smart Folder
    Here is a small example. I have a folder Photos with some files that already have Tags:
    And i created a New Smart Folder with rule Tags is not and i left blank field:

Maybe you are looking for

  • Is it possible to replace applet with JSP

    I m working for the extension of the a Chat Application which is Applet based... It is slow as the Applet loaded... Is it possible to replace the applet with th JSP.... what r the pro and cons of it??? Thanks in advance...

  • Can you create an image field in the form so a respondent can upload a photo to it?

    Can you create an image field in the form so a respondent can upload a photo to it?

  • What Swing UI framework is the best?

    I am looking for a Swing UI framework that will do the following: 1. Render Swing UI in the client browser ( I think this is most likely done by Applet). 2. handle all event back on the server, including validating user input, button/mouse click, etc

  • Training Videos don't play...

    Hopefully a quick question... I'm ready to start the training but none of the videos play. When I click the video on the web page I get a long vertical rectangle with an X in the upper left corner. After downloading and storing the videos, using Real

  • How to preserve my library when reinstalling iTunes?

    Hi, I'm about to reinstall iTunes, but I have a question before I do. Is it possible to keep my library exactly the way it was before the reinstall? If so, how would I do it? I'm using Windows Vista Home Basic.