Programmatically search for a page via a property value

Hi,
I really need help with this, using java I need to search for a page via property value.
Thanks.

I don't know if this performs well, but this snippet traverses a branch with root "node", finds jcr:content nodes, and gets a specific child node. You could use the node.getproperty() method in your case and traverse the /content branch (or wherever your pages are stored). See the javax.jcr.node (http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Node.html). Also see org.apache.sling.jcr.api.SlingRepository (http://dev.day.com/docs/en/cq/current/javadoc/index.html)
NodeIterator iter = node.getNodes();
while (iter.hasNext()) {
        Node n = iter.nextNode();
       //Look for "jcr:content" nodes
       if (n.getName().equals("jcr:content")) {
               //get the path of the model node and save it
               if(n.hasNode(MODEL_NODE)){
                     modelIds.add(n.getNode(MODEL_NODE).getPath());
       } else{
       //Scan child nodes
       getModelIds(n);
scott

Similar Messages

  • If I'm reading a book on the iPhone and I want to pick up where I left off on my iPad, do I have to search for what page I was on on the iPad or is there a way to sync it?

    If I'm reading a book on the iPhone and I want to pick up where I left off on my iPad, do I have to search for what page I was on on the iPad or is there a way to sync it? Or do I just have to search for a string of text from my iPhone on my iPad?

    On both devices go to Settings>iBooks>Sync Bookmarks>On. Then when you want to quit reading on one device, tap the bookmark in the upper right corner and it will turn red. That marks your place. Close the book on the device now by tapping on the Library button in the upper left corner of the app. That will put the closed book back on the shelf. Tap the home button.
    On the other device, when you tap on the book, it should open to that page. You have to be connected to WiFi in order for this to work. You can read this older discussion for more information. I was involved in that as well.
    https://discussions.apple.com/thread/3754714?start=0&tstart=0

  • Searching for the number in the bigint value...

    HI!
    Could anybody help me with the searching for the number in the bigint value. ex:
    9567423742840 i need to get only the 2nd and 3rd number (56) from this value...
     ^^
    and the same thing with symbols in the strings..
    is there any special function in jsp available for that?
    thanks

    try looking into the String class. There should be a substring or similar function that lets u get only a part of another string. You can convert the int into a string by doing something like new Integer(yourIntValue).toString() and then using that string for your substring function. There may be other ways to do it too, but this is the one I remember off the top of my head.
    Hope it helps
    package com.DJ_Java;

  • Programmatically search for a word in PDF file

    In the program I am developing, I am opening up a PDF file from the application. Is there any way to search for a particular word in the PDF file and move to the page containing the first occurance of that word in the PDF file programmatically? I am using VC++ to develop the application.
    Any guidance is appreciated and thanks in advance.

    Thanks for your reply Leonard.<br />I am not using any library now. Currently I am just opening up the PDF file in Adobe Acrobat Reader using ShellExecute() API passing the PDF filename. <br />Now I want to open the PDF file in Adobe Acrobat Reader, and move to the page containig a particular text automatically.<br />Is it possible through any command line arguments to AcroRd32.exe like, <br />AcroRd32.exe <filename.pdf> search:<wordtosearch><br />OR I have to use any third party library to do this.

  • Searching for a page in the site map

    Hi all! I'm using an older version of Dreamweaver... MX. I'm
    hoping there's a way to do a search for a specific page using the
    site map. I have some out-dated pages on a HUGE website I'm trying
    to clean up for a local organization. I did a search for orphans,
    and they were not listed. Therefore I know they are somehow still
    linked to other pages. So I can't just delete them. I need to
    update the links. I did this on my local drive, but I need to do it
    on the server, as I realized I can't replace all pages on the
    server (others have access to it too). Does that make sense?
    Anyway, let me know if I can search using the site map for specific
    pages. Thanks!
    Julie

    Do a sitewide find for the filenames. That'll tell you which
    other pages
    link to them.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "DigitalChick" <[email protected]> wrote in
    message
    news:fasdd7$e8l$[email protected]..
    > Hi all! I'm using an older version of Dreamweaver... MX.
    I'm hoping
    > there's a
    > way to do a search for a specific page using the site
    map. I have some
    > out-dated pages on a HUGE website I'm trying to clean up
    for a local
    > organization. I did a search for orphans, and they were
    not listed.
    > Therefore I
    > know they are somehow still linked to other pages. So I
    can't just delete
    > them.
    > I need to update the links. I did this on my local
    drive, but I need to do
    > it
    > on the server, as I realized I can't replace all pages
    on the server
    > (others
    > have access to it too). Does that make sense? Anyway,
    let me know if I can
    > search using the site map for specific pages. Thanks!
    >
    > Julie
    >

  • Binocular Search for a Page dimension

    Hi All,
    For a project dimension defined as page dimension in the webform which have 120 members, Binocular search button appearing in the next to Page dimension drop down. But where as Department dimension having 46 members binocular search button is not appearing.
    Is there any criteria or setting in order to Binocular search button should appear for the page dimension in the webform?
    Thank you so much for your kind help in advance.
    Regards,
    tvmk

    Log in Planning
    Go to File->Preferences and select Display Option tab
    Set the value of Allow seach when no. of pages exceeds to 10

  • Search for master page usage; better way to use master pages?

    Hi all,
    I am using Frame 9. I have my files set to always have an even number of pages. For chapters where the text ends on a right-hand page, I assign a custom master page to the final left-hand page -- this custom master page has our logo on it. However, because my files have a lot of conditional text (3 different versions of the publication  get generated from the same source files), the lengths of the chapters often change when switching between different conditional versions. So for example, for version 1, I assign the custom master page to the last page of the chapter, which is page 28. Then when I switch my conditional text settings to show version 2, the chapter is now 36 pages long, but my custom master page is still applied to page 28. I have to remove it from page 28 and reassign it to page 38. Here are my questions:
    1) Is there a way to search for pages that have a specific master page applied? I hoped that I could generate a list of master page usage using the Special > List Of > References option, but apparently not.
    2) Is there any way to get Frame to automatically assign my custom master page when it is appropriate, rather than doing it by hand for each conditional version of each chapter?
    Thanks!

    kelly.usa wrote:
    Hi all,
    I am using Frame 9. I have my files set to always have an even number of pages. For chapters where the text ends on a right-hand page, I assign a custom master page to the final left-hand page -- this custom master page has our logo on it. However, because my files have a lot of conditional text (3 different versions of the publication  get generated from the same source files), the lengths of the chapters often change when switching between different conditional versions. So for example, for version 1, I assign the custom master page to the last page of the chapter, which is page 28. Then when I switch my conditional text settings to show version 2, the chapter is now 36 pages long, but my custom master page is still applied to page 28. I have to remove it from page 28 and reassign it to page 38. Here are my questions:
    1) Is there a way to search for pages that have a specific master page applied? I hoped that I could generate a list of master page usage using the Special > List Of > References option, but apparently not.
    2) Is there any way to get Frame to automatically assign my custom master page when it is appropriate, rather than doing it by hand for each conditional version of each chapter?
    Thanks!
    To identify master pages that control pages in body page view, create an identifier on each master page, as you'd create a watermark with text in a background text frame. Control its visibility with either a condition, or by assigning it a color that's invisible in a color view.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Search Expired - want to search for files greater or older than value

    I'm trying to build an Auto-Archive process into Final Cut Server. For the most part it is working well.
    It is comprised of 2 responses that run on a schedule:
    1) Response searches a specific device for all assets over 100 days old. Mark these as a under 'candidate for archive'.
    2) Response searches a specific device for all "true" candidates for archive. If they have not been accessed in 30 days, then archive.
    The problem seems to be response #2. Final Cut Server only allows search expired within a timeframe, not before or after a time frame. So if I set it to 30 days, it is finding all assets accessed within 30 days, not older than 30 days.
    Any way to search for older or greater than a specific day range?

    Well I tell ya, the documentation isn't worded very well:
    "Search Expired - Searches for expired items. It creates events based on a timestamp field (such as Last Accessed) and a value defining the number of past days to look for. "
    I read this "past days to look for" as though it would search within a value. So if the value was 30 days that it would identify all assets 1-30 days old.
    Of course looking at the log in Final Cut Server it states "searching for assets older than 30 days".
    I just need to rethink this process and clean it up.

  • How can I 'search' for Line/Page Breaks in Pages 5.5.2?

    In the old version of Pages I was able to Find Line/Page Breaks by copying these symbols from the document and pasting them into the Find box. However, when I do this in Pages 5, all I see pasted is a blank space.
    How can I copy and paste symbols?

    Visit the View menu, and select Show Invisibles. The page breaks will be a blue line across the page with a document icon at the end of that line. The hard (paragraph) returns are the pilcrow ¶ character.
    Select the page or paragraph break symbol, and then press cmd+E. This is shorthand for use the selected character for the search. Next press cmd+F to open the Find panel, which will now be pre-populated with the character you want to find. In the gear icon, choose Whole Word. Then press the > key to advance to the next found character. There is no left panel display that shows the page number(s) that the found characters appear on.

  • Firefox opens but will not search for main page

    After upgrading to Fiefox 4.01, when I open firefox and I type in the search bar that appears in the middle of the page it won't search. It does nothing. I can go to the top-right bar which is currently using yahoo search engine, type and it will search.

    I have tried entering Mozilla Firefox in safe mode and attempted to load webpages but nothing happened as before. I refreshed firefox and that solved the problem and i was able to launch webpages... BUT. once i closed the browser and had to use it again the same problem came up and i was no longer able to open webpages again, thus requiring me to refresh yet again. of course this is no conducive to do each and every time as i will lose all saved information, bookmarks, etc.
    any further thoughts on what to attempt next would be greatly appreciated. I have used Firefox for more than 8 years and have never encountered this anomaly.

  • How do you allow access to Page Properties for a page via Permissions.

    I've been trying to figure out how to setup permissions for a user or group to allow them to have access to the Page Properties dialog and view it's contents.
    So far the user/group in question has read/modify/create/delete access to the entire /content/<site_name>.  These people can right click on a page in Websites and select the Page Properties option but some of the page properties, custom ones, are empty, or showing but their respective content (housed under /content/<site_name>/<page_name> is missing/empty.

    The location of the folder is important. If it is inside a subfolder of your Home folder, then nobody else will be able to see it no matter what sharing options you set.
    Put it in the /Users/Shared folder.
    As leroydouglas pointed to, go to the Sharing preferences and add that folder.
    You'll also need to give them a login to that Mac. You can create a "Sharing Only" user which is a login for file sharing users.
    In Users & Groups, Add a new User account and set it to Sharing Only.
    Give it a username and password for them all to use (which can be saved in their keychains).
    Go back to Sharing and Add that new Sharing Only user. Give them Read Only access. If they all have normal logins on that Mac, you can just add those user names and they will log in just as if they were sitting at the Mac.
    Marking of a folder as Shared will only share it with users that can log into that Mac and only if they have permission to see through all the intervening folders.
    EDIT: You could also set up Guest access and allow guests to access file sharing. You could then share the folder to everyone: read only.
    Also see here: http://support.apple.com/kb/PH14189
    You used to be able to create a Sharing Only user from that preference pane, but it appears they've modified that to allow you to create a Sharing only user from your Contacts list.

  • How to search for annotated pages in pdf? E.g in textbook pdf

    Would like to be able to track the annotated pages in my textbook pdf. Can that be done?

    Hi,
    Adobe Reader on iOS currently does not support this. We already have this feature request in our backlog item. We cannot give you a timeline, but we hope to have this feature in a future release.
    Thanks,
    -Shilpi

  • With Firefox 5.0.1, I can no longer have search terms highlighted when I search via cache. This makes searching for key concepts impossible now. Is there a plan to fix this issue?

    In the past, before Firefox 5.0.1, I would search for key terms via the cache mode; thus, the terms would be highlighted in various colors so that I could scroll down the page and find the exact terms.
    This is no longer functioning since I downloaded 5.0.1
    I use an iMac 3.06 Ghz Intel Core 2 Duo, 1o.6.8.

    The new tab page (about:newtab) wasn't introduced until a later version of Firefox (iirc, ''Firefox 10'') , which is why that pref can't be found.
    Sounds like your father picked up some Malware.
    Maybe this is what you're dealing with.
    http://www.shouldiremoveit.com/IMVU-Inc-Toolbar-34367-program.aspx
    Also, I see a number of Plugins listed to bee concerned about.
    Toolbar Plugin
    MindSpark Toolbar Platform Plugin Stub for 32-bit Windows
    WildTangent Games App V2 Presence Detector

  • Trouble searching for files in Pages

    For some reason, when I go to open a file in Pages '09, some of them will not show up if I type in the file name in the search in the upper right hand corner of the window. I know for 100% certainty I have the file name correct - to make sure it is a search problem and not my memory having issues I would search for a file and while looking at the file name, type it in... and I would get 0 search results. I clicked for it to search by file name. The files it does not seem to be able to recognize are file names with Japanese as part of the file name that were saved using my Mac (MacBook Pro - OS X 10.6.8). Files with Japanese in the file name saved on windows computers and transfered via my flashdrive have no issues being found. I can open the files, so that is not the problem. And, if I scroll through all the files I can find it. The problem is that sometimes I don't remember the full file name - especially which word I put first - so having to scroll through all my files to find the one I want is rather annoying. I would prefer to be able to search for any of my Pages files. Is there anyway to fix this? Or is the Pages search just not made to be compatible with any language other than English? (I am not sure if it is relavant, but if I search for the files via Spotlight, I can find them using the English or Japanese portion of the file name. Even though Finder does not allow me to use the Japanese portion of the file name in a search, the files do show up if I use the English portion of the file name.)
    Any help of why this problem exists and if there is any way to fix would be very much appreciated.

    Hi KJ,
    in the search in the upper right hand corner of the window.
    The Pages window? I can't see a search box.
    Do you mean Spotlight? (The magnifying glass icon?)
    System Preferences > Personal > Spotlight > Search Results.
    Make sure there is a tick next to Documents.
    Spotlight will find file names (partial or complete match) or a word or phrase within files.
    Regards,
    Ian

  • Custom search for pages

    Hi all,
    I have a couple of questions about custom search on pages:
    1) How do pages appear as links in a custom search region? We are able to search on non standard page type, but the problem is that we cannot retain a template with an non standard page type.
    2) How do we tag a page with a refrencable attribute (preferably categories and perspectives) so that we can search on in a custom search?
    Please advise.
    Thanks.

    (1) I am not entirely clear on what you are meaning. Is it the appearance of the actual page search results which is wrong or the actual search results. Can you please give more information.
    (2) You can create a page type and add the attributes you wish to use to search for the page. Then after creating a page of this new type go to its properties and click on the 'Optional' tab you can enter values for these additional attributes.

Maybe you are looking for