How to search to files based on the metadata of the category in CS

Hi,
Can any one tell me how to search the files in the content services based on the metadata of the Category,I know how to search based on the Category using
public static void attributSearch(String searchString)
throws FdkException, RemoteException, Exception
// get the Manager instances
SearchManager sem = s_WsCon.getSearchManager();
CategoryManager cat = s_WsCon.getCategoryManager();
CommonManager cm = s_WsCon.getCommonManager();
FileManager fm = s_WsCon.getFileManager();
Item folder = fm.resolvePath("/idc/workspaces/BoardMembersProject", null);
AttributeRequest[] catAttr =
WsUtility.newAttributeRequestArray("ProjectCategory");
// create AttributeRequest to retrieve CATEGORIES attribute
AttributeRequest[] catClassAttr = WsUtility.newAttributeRequestArray(
Attributes.CATEGORIES, catAttr);
// define search options
NamedValue[] nv = WsUtility.newNamedValueArray(new Object[][] {            
{ Options.SEARCH_VERSION_HISTORY, Boolean.TRUE },
{ Options.RETURN_COUNT, new Integer(100)
// get search expresiion
SearchExpression seExp = new SearchExpression();
// searchString ="ProjectCategory";
Item[] item = cat.getRequiredCategories(folder.getId(),catClassAttr);
seExp = new SearchExpression();
NamedValue[] attributes = item[0].getRequestedAttributes();
seExp.setOperator(FdkConstants.OPERATOR_HAS_CATEGORY);
seExp.setRightOperand("["+item[0].getName()+"]");
// search documents
NamedValue[] result = sem.search(seExp, nv, null);
// search result display
for (int i = 0; i < result.length; i++)
if (result.getName().equals(Options.SEARCH_RESULTS))
Item[] resulItem = (Item[]) result[i].getValue();
WsUtility.log("Kveni",resulItem);
if (resulItem != null)
for (int j = 0; j < resulItem.length; j++)
WsUtility.log("File " +resulItem[j].getName());
But how do one search Based on the attributes of the category??
thanks
kveni

Download the PM accelerator kit appropriate to your environment, and check out the TestSearch2.java example.
http://www.oracle.com/technology/products/cs/developer/contentservicesdev/contenservicesdevkit.html
Essentially you need to lookup the internal names of your category attributes, as well as have the internal name of your category class.
categoryClassName = ...; // e.g. AHC_XXX
attribute1name = ....; // e.g. CUSTOM_MYBOOLATTR
you then create a normal search expression such as
String attribute1Operand = "[" + categoryClassName + FdkConstants.SEPARATOR + attribute1name + "]";
SearchExpression expr1 = new SearchExpression();
expr1.setOperator(FdkConstants.OPERATOR_EQUAL);
expr1.setLeftOperand(attribute1Operand);
expr1.setRightOperand(Boolean.TRUE);
Matt.

Similar Messages

  • How to search xml file data based on the given keyword from html form

    hi,
    i'm new to XML. I have this problem regarding searching within a XML file.
    the
    idea is that my search will be based on the keyword entered
    in
    by the user from a HTML form. the keyword is then used to search all
    the
    question nodes and the choice nodes within a XML file. once the match
    is
    found, i will have to display the results.
    But i don't know how to do so - especially the part of searching xml file.
    Can
    anyone help me in this? Your help is much appreciated.
    Edited by: Moti_Lal.D on Apr 4, 2008 7:28 AM

    yeah.. what i was trying to do is
    i have one xml fine. then i have to read all the tag values say
    <book>
    <title>Java</title>
    <author>agarwal</author>
    <price>200</price>
    </book>
    <book>
    <title>Xml</title>
    <author>saxmann</author>
    <price>300</price>
    </book>
    i can read the tag values like this
    File file = new File("dom.xml");
    try {
    DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document doc = builder.parse(file);
    NodeList nodes = doc.getElementsByTagName"book");
    for (int i = 0; i < nodes.getLength(); i++) {
    Element element = (Element) nodes.item(i);
    NodeList title = element.getElementsByTagName("title");
    Element line = (Element) title.item(0);
    what i want is i may give any xml file
    like File file = new File("xxx.xml");
    (it may be one level/two level/3level tagged one)
    then the i should read all the tag values and store them in some array. Then when i enter some character from keyboard (say "a") then it has to show all the tag values starts with "a" and display them.
    i guess u understand my problem.

  • How to create a record based on the name of a file in the file-system?

    Hi,
    With a lot of pictures I want to have a database to gather some information about these pictures.
    First question is how to generate a record based on a file in the file system?
    e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
    now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
    any suggestions?
    any reaction will be appreciated.
    Leo

    Link to Create directory
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    You can create a list of files in the directory and read the list files from that directory.
    [UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
    [Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
    SS

  • How do I automatically position my files based on the Media Start time?

    In the project media window, it shows the Media Start, End, Duration of my MOV files based on the timestamp in the file.
    I'm talking about the time at which the video was shot (according to the camera), not any marks I have added.  Note the distinction: all searches for this treat "Media Start" as the mark-in, mark-out points and have nothing to do with what I'm asking.
    There are gaps between the files so I don't want to add them contiguously.  I will be lining this up with other sources, and using the absolute time is the easiest way to "just do it", within a fraction of a second.
    (I have not used Premiere since version 1.5 Pro)

    I'll try that Sync command on the next one; thanks.
    At least I should be able to get this out faster than last year's New Year videos: the lighting was so bad that I had to learn color correction and the Resolve tool to accomplish it.
    I've used (if memory serves)
    Ulead Mediastudio Pro
    Premere Pro 1.5 circa 2005 
    hiatus early 2008 (last use of DV camcorder) — Feb 2013 (dSLR video)
    Avidemux (just trimming and concatenating)
    Sony Movie Studio Platnum 12, 13 (when I needed real NLE again)
    DaVinci Resolve (color correction, but hey includes basic NLE and free!)
    Adobe CC 2014 includes Premiere, so jump to that!
    I learned concepts like importing asset files to a media pool and then taking clips from that, multi-track timeline editing with razor, single and all-track ripple, rolling edit, crossfades, J and L cutting, and all that, from Ulead in 2002 and later Premere.
    Other NLEs I've used since, sometimes one-off, I had no trouble doing basic things.  It's like driving a car: basic essential functions are known but need to hunt around for the interval wipers.
    This one, though, took much longer to get moving with.  They purposefully changed some control concepts presumably for the better (where is the toggle to slide all clips beyond this one when I move it, and another toggle for keeping all tracks in sync or just editing one?   I clicked somewhere to expand the track vertically but I can't quite figure out where to do it reliably.
    But also made things unnecessarily difficult: it says drop stuff here to to start, but why not allow right-click to work and show useful things in this situation, or at least have a "new" button!  There's no speed slider or reverse buttons in the player interfaces, and in general there are commands I can't find on any menu but apparently exist.
    The scrollbar/zoom will take getting used to, but why can't the arrow buttons still be there too?  Especially at high zoom the slider is much too touchy, and clicking to move a little bit would be helpful.  Ctrl-Wheel doesn't work in the waveform source editor but does on the timeline.

  • How to search .java files by Search tool in NWDS or any other tool?

    Hi All,
    I can easily search .JSP files by NWDS's Search tool, but I have a hard time to search Java files by this tool.  Can anyone guide me how to search Java files which contain a specified string by using Search tool in NWDS? or any other tool?
    Thanls. Jin

    Hi Jin,
    You can search Custom Java files with NWDS Search tool for specified string. But not standard Java files.
    Suppose you have extend z_userR3 base on UserR3 and contains string some help then you can click on search in NWDS
    Then click on File it will open Search box with 4 tag
    1. File Search
    2. Help Search
    3. Java Search
    4. Plug-in Search
    Click on File Search tab and provide the text in Containing text input box and give java file name with wild characters like  *.java
    Select Workspace under Scope and hit search button. It will search string in your custom Java file. This method will not search string in Standard Java classes of SAP.
    If you want to search in standard SAP  java classes then you should know about what you are searching i.e. whether it is field, Method, Package, Constructor and Type  select proper radio button under Search For box then tryo to select proper radio button under Limit To if you want to search everywhere then select All Occurrences. You should select Workspace under Scope.
    Suppose nothing comes after selected Type then go for other option one by one Method, Field etc...
    Expert people will give you more information.
    I hope this will help you.
    Regards.
    eCommerce Developer

  • Validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result

    HI All,
    I have a situation.
    I need to validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result.
    A predefined success schema in case of  validation success and negative schema structure for validation failure.
    any advice ?

    Hi Rachit,I following the blog
    http://dietergobeyn.be/validating-biztalk-messages-orchestration/ and stuck in few things
    I created a helper class with the name Validation and following code
    [Serializable]
        public class Validation
            private bool _isValid = true;
            public bool Validate(XmlDocument document, Type schema)
                XmlSchemaSet set = new XmlSchemaSet();
                if (typeof(SchemaBase).IsAssignableFrom(schema) && !schema.IsNested)
                    set.Add((Activator.CreateInstance(schema) as SchemaBase).Schema);
                ValidationEventHandler eventHandler = new ValidationEventHandler(HandleValidationError);
                document.Schemas = set;
                document.Validate(eventHandler);
                return _isValid;
            private void HandleValidationError(object sender, ValidationEventArgs ve)
                _isValid = false;
    public static bool ValidateMessage(XLANGMessage msg)
    XmlDocument xDoc = new XmlDocument();
    xDoc = (System.Xml.XmlDocument)msg[0].RetrieveAs(xDoc.GetType());
    Type t = typeof(Schemas.External.Invoice_v3_1);
    Validation validation = new Validation();
    return validation.Validate(xDoc, t);
    First thing, Do i need to write the ValidateMessage method inside the helper class or not ??
    If inside, how to add the reference of schema files in the statement (Type t = typeof(Schemas.External.Invoice_v3_1);)
     I tried adding the reference of my schema project but it is showing error.
    And what is to be written in the ValidateMessage expression shape in Orchestration ?
    Really appreciate your help.

  • How to generate XML file based on XSD in SSIS

    please provide step by step process to create xml based on XSD in SSIS  

    Hi hemasankar,
    In SQL Server Integrated Services, we can generate XML Schema (XSD) file based on a XML file with XML Source Editor. If we want to generate XML file based on a XSD file, we can use Generate Sample XML feature in Visual Studio. For more details, please refer
    to the following steps:
    Click on "XML Schema Explorer" or 'Use the XML Schema Explorer...' to open XML Schema Explorer in Visual Studio. 
    If your Schema file is valid and you are having elements, right-click on element and click on "Generate Sample XML", this functionality generates XML file in temp folder and open ups in the XML Editor.
    The following two document about how to generate XML file based on a XSD file are for your reference:
    http://msdn.microsoft.com/en-us/library/dd489258.aspx
    http://www.codeproject.com/Articles/400016/Generate-Sample-XML-from-XSD
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How do I share files uploaded into the Creative Cloud with other creative cloud members?

    How do I share files uploaded into the Creative Cloud with other creative cloud members?

    Should be easy.  Try this...
    In Thumbnails view, click the little triangle (pointing downward) in the lower-right corner of the asset you want to share.
    In the blue icon bar that appears, click the Share icon (the third icon from the left, just right of the trash icon). The Share dialog should pop up.
    In the Share dialog, enter the email address of the person with whom you want to share the asset, then click the Send Email button - they'll receive an email with a link to your asset. OR
    You can also copy a link to the asset and then paste that into your own email client if you prefer.  To do that, click the Link icon (looks like a "chain", and is to the right of the email "envelope" icon) - then click the Copy Link button.
    Note that the Share options won't be available if your asset is set to "Private" - you can control whether an asset can be viewed (or downloaded) by others by clicking the Public/Private control (green or red "lock" icon).
    You can also access the same Share controls if you click on the file to see it one-up (you can do this from either Thumbnails view or List view); click the Share icon near the upper right corner of the browser window (to the right of the asset name).
    Hope that helps.

  • How to open a file created at the server through form/report at client end

    How to open a file created at the server through form/report at client end
    Dear Sir/Madame,
    I am creating a exception report at the server-end using utl file utility. I want to display this report at the client end. A user doesn't have any access to server. Will u please write me the solution and oblige me.
    Thanks
    Rajesh Jain

    One way of doing this is to write a PL/SQL procedure that uses UTL_FILE to read the file and DBMS_OUTPUT to display the contents to the users.
    Cheers, APC

  • How to invalidate a session based on the session id

    How to invalidate a session based on the session id

    You have to write your own support for this.
    It used to be in the API, but was deprecated as a security hole.
    The best way to do it is implement a session listener (javax.servlet.http.HttpSessionListener) which notifies you when sessions are created/destroyed.
    You can then keep a map of sessions in your own code, indexed by session Id, and access any/all of them to invalidate as you choose.

  • Splitting a file based on the payload field - multimapping

    HI Everyone,
    I have a requirement of splitting a file based on the field .
    e.g When I am a file as :
    row1  David    US
    row2  Cindra   US
    row3   Peeru   CA
    row4   Jay       CA
    Then, I have to split the file into two files, one file with the US rows and  another file with the CA rows.
    There can be many countries in the input file, so number of target files need to be generated is not fixed.
    I have gone through the below links :
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible   ( in the blog we know that there are two receivers but in my case I dont know that )
    https://bond.newellco.com/irj/scn/,DanaInfo=www.sdn.sap.com,SSL+thread?messageID=6449801#6449801
    ( Everyone is providing JAVA mapping as a solution....)
    Is Java mapping the only option to resolve the problem case I have ?
    Thx
    PEERU IN

    Hi Peeru,
    I don't have access to the any FTP or file server of XI to check the file adapter as i am travelling right now(I am 100% sure that the file adapter splitting will work as i have done this for one of my requirement).
    Coming to your requirement:
    I wrote an java map which will read the XML file and create the multiple recordset based on number of different country exists in the file, then i am printing the final structure in an multi mapping layout (please see the attached input file Country.xml and out put file which the java map generated Final.XML) if we do this i think the file adapter will create the different files based on the number of recordset we have as you can see the output file is generated with the 3 recordset (<Country>) tag each country tag has its own records, now if i give the filename in variable substuition pointing to region then i think i should get 3 files with names
    us.xml
    us01.xml
    us02.xml
    i think by using the multi mapping i can generate 3 files and by using the variable substution i can give the 3 different names from the payload of each file and also can add the timestamp for each of the file, again i didn't have access to the file adapter in the project i am working on so i couldn't verify in XI server, but if you still looking for solution then let me know i will give the map details.
    Input File: Country.xml
    <?xml version="1.0"?>
    <check>
         <order>
              <name>Nisar1</name>
              <region>US</region>
         </order>
         <order>
              <name>Nisar2</name>
              <region>US</region>
         </order>
         <order>
              <name>Nisar3</name>
              <region>US</region>
         </order>
         <order>
              <name>Nisar4</name>
              <region>US01</region>
         </order>
         <order>
              <name>Nisar5</name>
              <region>US01</region>
         </order>
         <order>
              <name>Nisar6</name>
              <region>US01</region>
         </order>
         <order>
              <name>Nisar7</name>
              <region>US</region>
         </order>
           <order>
              <name>Nisar8</name>
              <region>US</region>
         </order>
           <order>
              <name>Nisar8</name>
              <region>US02</region>
         </order>
    </check>
    Output File : Final.XML
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
         <ns0:Message1>
              <country>
                   <Order>
                        <name>Nisar1</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar2</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar3</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar7</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar8</name>
                        <region>US</region>
                   </Order>
              </country>
              <country>
                   <Order>
                        <name>Nisar4</name>
                        <region>US01</region>
                   </Order>
                   <Order>
                        <name>Nisar5</name>
                        <region>US01</region>
                   </Order>
                   <Order>
                        <name>Nisar6</name>
                        <region>US01</region>
                   </Order>
              </country>
              <country>
                   <Order>
                        <name>Nisar8</name>
                        <region>US02</region>
                   </Order>
              </country>
         </ns0:Message1>
    </ns0:Messages>
    regards
    Nisar Khan

  • How to change datasource name based on the partition in configplan

    Hi
    Can any one please give me some solutions regarding how to change datasource name based on the partition in
    configplan.
    can't we do this in configuration plan?

    If you want to change template based on parameter. you have to use below syntax
    v_layout boolean
    V_LAYOUT:= FND_SUBMIT.add_layout(template_appl_name => 'SQLAP' -- application short name
    ,template_code => 'HUBAPAPN' -- template name
    ,template_language => 'en'
    ,template_territory => '00'
    ,output_format => 'PDF');
    Above can be used in plsql stored procedure before submitting Concurrent Program (Bi Publisher report) or may be you can try to add this code in Oracle reports after report or before report trigger
    Thanks
    Kamalakar

  • PLSQL sample for searching a file name in the server

    Hello All,
    what plsql package i need to use or any plsql sample code available for searching a file name in the server.
    For example If I provide any text "XX%", the plsql code should provide me the list of file names in a specific folder in server.
    If any one worked on this kind of requirement, please provide me the sample code.
    Thanks & Regards
    Aboothahir

    Hello,
    https://sourceforge.net/projects/oracle-jutils/
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584#1565062600346635117
    {message:id=4070746}
    Regards
    Marcus

  • Need to launch specific document and wave file based on the inbound Route Point

    I am having issues using CDA in terms of creating the appropriate WF to launch both a wave file and specific Word document based on the inbound DNIS.  I have UCCX 8.0(2) SU3 enhanced so I can't use HTTP.  I really need a solution today.  Thanks.

    I did script to play the file to the agent as a whisper then hang up and ring the line again to connect the caller to the agent but the customer didn't like that at all so i just created the WF to launch from the same filepath on all machines to point the the appropriate wave files based on the DNIS.  Because the customer has enhanced I'm not launching the Word docs as PDFs in a integrated browser like I'd prefer but as an external application.  Again, based on the DNIS. 

  • My mac book startup disk is full and when I start it, it give me a blank blue screen. I have tried the shift and I started in safe mode, and it gave me the stars screen. How can I delete files to fix the problem

    My mac book startup disk is full and when I start it, it give me a blank blue screen. I have tried the shift upon start
    and I started in safe mode, and it gave me the stars screen. How can I delete files to fix the problem

    1. Start up in Safe Mode.
        http://support.apple.com/kb/PH11212
    2. Empty Trash.
        http://support.apple.com/kb/PH10677
    3. Delete "Recovered Messages", if any.
        Hold the option key down and click "Go" menu in the Finder menu bar.
        Select "Library" from the dropdown.
        Library > Mail > V2 > Mailboxes
        Delete "Recovered Messages", if any.
        Empty Trash. Restart.
    4. Delete old iOS Devices Backup.
        iTunes > Preferences > Devices
        Highlight the old Backups , press “Delete Backup” and then “OK”.
        http://support.apple.com/kb/HT4946?viewlocale=en_US&locale=en_US
    5. Re-index Macintosh HD
       System Preferences > Spotlight > Privacy
       http://support.apple.com/kb/ht2409

Maybe you are looking for

  • Time Machine Restore; QuickTime no longer works.

    The HDD on my mid-2011 27" iMac was on its last leg (unfortunately not part of the HDD replacement) so I took it in to Apple to have it replaced.  They noted that I would need to do a restore from Time Machine to get my machine back to spec, which I

  • 'alter database open resetlogs' didn't reset one of the datafiles

    I've spent the last three and a half weeks recovering an oracle database (11g 64-bit linux) because of a corrupt block in an online redo log (which I thought was being written to multiple locations). I restored the files, moving some of them around i

  • TS1402 Locked folder

    Hello. I'm using Mac OS X 10.6. After copying some folders from external hard drive to PC these folders are now locked on Mac. There is no pencil in the Finder's lower left corner and there are no messages appear. I just simply can't open these folde

  • Mismatch between Blackberry ID and BBM

    Hello again ! I have two phones, a 9360 and an older Blackberry. Due to a reset I'm now in a situation: where on the 9360 I have the correct Blackberry ID but I very unfortuntaley associated the BBM with the Blackberry ID of the other phone, making t

  • Will print in black only

    Status check confirms that the ink level is all good but when I try to print it says the printer is out of color ink and must print is black only. It was fine yesterday so I tried to restore but that didn't help. Rebooted computer and printer but tha