Partial unmarshal question

I have used the JAXB partial-unmarshal example to create my own code base for a >2gig XML file. Things are working well but I don't understand the issue of namespaceURI. Specifically, the XML file I am parsing contains namespace tags in its primary element:
<uniprot xmlns="http://uniprot.org/uniprot"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://uniprot.org/uniprot http://www.uniprot.org/support/docs/uniprot.xsd">
(note that I am binding via my customized schema, not the one listed in the tag)
Due to the presence of these attributes, the conditional in the startElement method of my "splitter.java" file (copied directly from the partial-unmarshal example) never evaluates to true and therefore unmarshalling doesn't occur -
public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
throws SAXException {
if( namespaceURI.equals("") && localName.equals("entry") ) {
Unmarshaller unmarshaller;
try {
unmarshaller = context.createUnmarshaller();
unmarshaller.setValidating(false);
} catch( JAXBException e ) {
throw new SAXException(e);
If I remove the namespace attributes from the <uniprot> tag in the XML file data binding works perfectly. I'd rather not have to remove these attributes on every release of this file so how can I deal with it programmatically? If I simply say,
namespaceURI=""
prior to the conditional the data binding fails.
I guess the problem is that I don't fully understand the problem.
any help would be appreciated
btw - per the instructions, I have set factory.setNamespaceAware(true). Setting this to "false" doesn't fix the problem.
thanks
John

I have used the JAXB partial-unmarshal example to create my own code base for a >2gig XML file. Things are working well but I don't understand the issue of namespaceURI. Specifically, the XML file I am parsing contains namespace tags in its primary element:
<uniprot xmlns="http://uniprot.org/uniprot"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://uniprot.org/uniprot http://www.uniprot.org/support/docs/uniprot.xsd">
(note that I am binding via my customized schema, not the one listed in the tag)
Due to the presence of these attributes, the conditional in the startElement method of my "splitter.java" file (copied directly from the partial-unmarshal example) never evaluates to true and therefore unmarshalling doesn't occur -
public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
throws SAXException {
if( namespaceURI.equals("") && localName.equals("entry") ) {
Unmarshaller unmarshaller;
try {
unmarshaller = context.createUnmarshaller();
unmarshaller.setValidating(false);
} catch( JAXBException e ) {
throw new SAXException(e);
If I remove the namespace attributes from the <uniprot> tag in the XML file data binding works perfectly. I'd rather not have to remove these attributes on every release of this file so how can I deal with it programmatically? If I simply say,
namespaceURI=""
prior to the conditional the data binding fails.
I guess the problem is that I don't fully understand the problem.
any help would be appreciated
btw - per the instructions, I have set factory.setNamespaceAware(true). Setting this to "false" doesn't fix the problem.
thanks
John

Similar Messages

  • Partial backup question

    Hallo developers.
    We are testing the partial backup procedure and we have some doubts.
    We would like to know how the partial backup is made consistent; if during the operation of backup (the copy of the jdb files) the application writes to the last jdb file after a commit is there any problem of consistency?
    In the guide is written clearly that you can copy the files during database operations: when you open the environment from the backup is the new environment reconstructed from the last chekpoint?
    Kind regards
    Massimo

    Hi Massimo,
    We would like to know how the partial backup is made
    consistent; if during the operation of backup (the
    copy of the jdb files) the application writes to the
    last jdb file after a commit is there any problem of
    consistency?JE uses a log based storage system. Once a record is written to the log, it is never overwritten again -- inserts, updates, and deletes are only ever appended to the log. In addition, there are never any "holes" in the log file. Therefore, if you copy log files from the environment directory in lexicographic order (essentially numerical hex order), and you copy the sectors in those files in ascending order, you will always have a consistent backup.
    For example, if you have files 000000ab.jdb through 000000af.jdb and you copy them in order (ab, ac, ad, ae, af) you will have a consistent backup snapshot of your environment. If you want to do an incrental backup on top of that backup, then you should copy any files that have been modified since the last backup was started. In this example, if 000000af had been modified (as it probably would have been since it was the last file, but probably not completely full when the backup finished), you would copy that file and any ones after that (e.g. b0, b1, ...). When you restore, you would take the most recent (and most full) copy of af (as well as all the other files).
    When the recovered databases are opened, JE runs a recovery (as usual) and makes the transactional state consistent. So if your backup included records from a transaction had not yet committed, and the backup did not copy the commit record, that transaction would be rolled back at recovery time.
    Now what causes a problem is if the cleaner is running. I won't go into a lengthy discussion of it here, but you can read about it at
    http://www.oracle.com/technology/documentation/berkeley-db/je/index.html
    under the javadoc for com.sleepycat.je.util.DbBackup.
    The net result is that you should use the DbBackup utility class for your backups.
    In the guide is written clearly that you can copy the
    files during database operations: when you open the
    environment from the backup is the new environment
    reconstructed from the last chekpoint? Correct. Because the log file is append only, when you copy files you will see a consistent, although possibly not most-recent, state of the database. By the way, a checkpoint is really just a performance improvement -- it is possible that there are no checkpoints in the database to recover from, but JE will still be able to recover the Environment.
    I hope this is useful.
    Regards,
    Charles Lamb

  • Layer is Partially Locked question?

    I'm using Windows 7 64 bit but I use Photoshop CS5 32 bit.
    In my Layers Panel every file that I open up has that little icon (Indicates Layer is partially Locked).
      A lot of my functions are grayed out because of this condition. If I duplicate the Layer or put a selection around a layer or make a new layer (Layer 0) all previous grayed out functions now work.
    I uninstalled and reinstall PS CS 5 but still had the same problem. Is there something I can do about this condition?
                    Thank you

    I'm not sure if this is your problem, but every time an image is opened for the first time in Photoshop, there is one layer called Background.  This layer is automatically locked.  You can convert the Background layer into a normal (unlocked) layer by double-clicking on the word Background. You are prompted to give the layer another name (default is Layer 0).

  • Partial submit question, only partial refresh...

    I all,
    I use a partial submit on a page on a CommandLink.
    I have also a PartialTrigger for the part I want to refresh.
    It seems that when I click, the link, the entire page is submited and only the PartialTriggered part is refreshed.
    Is it possible to avoid the entire page to submit on have only the partialRefresh because, the only data which has changed is changed with a setActionListener enclaused in the CommandLink.
    Thanks.
    Michael

    Hi,
    no, PPR does not refresh independent of a submit
    Frank

  • Welcome to Hierarchical Design - Design Preservation and Partial Reconfiguration

    Welcome to the Xilinx Hierarchical Design Forum.  This is the forum for all of your Design Preservation and Partial Reconfiguration questions.    
    The major goal of Design Preservation is to reduce the number of synthesis and implementation iterations during the timing closure phase.  This is accomplished by using previous implementation results for unchanged portions of the design.
    The major goal of Partial Reconfiguration is to allow a portion of the design to be reconfigured while the rest of the design is still running in the FPGA.   Different configurations of the design can be swapped back and forth reducing overall design size and power.
    For more information on the Design Preservation flow please see:
    White Paper - Repeatable Results with Design Preservation
    Hierarchical Design Methodology Guide
    PlanAhead_Tutorial_Design_Preservation
    Leveraging Design Preservation for Predictable Results Video
    For more information on the Partial Reconfiguration flow please see:
    Partial Reconfiguration Website 
    Partial Reconfiguration User Guide
    Partial Reconfigurations using PlanAhead Video
    This forum is monitored by several Xilinx employees.  Please feel free to ask any questions.
     

    Hello, I am trying to modify the Hierarchical Design tutorial TCL example (design.tcl) to allow me to adapt it to a simple trial project using the HD flow. At the Viavdo 2013.4 Shell when i type in:
    vivado -mode batch -source design.tcl -notrace
    I keep seeing these ERRORS from Vivado :
    # Vivado v2013.4 (64-bit)
    # SW Build 353583 on Mon Dec  9 17:49:19 MST 2013
    # IP Build 208076 on Mon Dec  2 12:38:17 MST 2013
    # Start of session at: Thu Mar 06 09:25:31 2014
    # Process ID: 5200
    # Log file: C:/GoldenHD_Tutorial/Vivado_Tutorial_TD/vivado.log
    # Journal file: C:/GoldenHD_Tutorial/Vivado_Tutorial_TD\vivado.jou
    Attempting to get a license: Implementation
    Feature available: Implementation
    Loading parts and site information from C:/Xilinx/Vivado/2013.4/data/parts/arch.xml
    Parsing RTL primitives file [C:/Xilinx/Vivado/2013.4/data/parts/xilinx/rtl/prims/rtl_prims.xml]
    Finished parsing RTL primitives file [C:/Xilinx/Vivado/2013.4/data/parts/xilinx/rtl/prims/rtl_prims.xml]
    source design.tcl -notrace
    #HD: Setting Tcl Params:
        place.closeImportedSites == 1
        tcl.notrace == 1
        hd.visual == 0
    #HD: Running synthesis for block HD_trig_detector
        Writing results to: ./Synth/HD_trig_detector
    #HD: Writing checkpoint ./Synth/HD_trig_detector/create_project_error.dcp for debug.
    ERROR: [Common 17-53] User Exception: No open project. Please create or open a project before executing this command.
    ERROR: write_checkpoint command failed.
        write_checkpoint -force ./Synth/HD_trig_detector/create_project_error.dcp
        while executing
    "error $errMsg"
        (procedure "command" line 31)
        invoked from within
    "command "write_checkpoint -force ${logName}_error.dcp""
        (procedure "command" line 23)
        invoked from within
    "command "create_project -in_memory -part $part" "$resultDir/create_project.log""
        (procedure "synth" line 36)
        invoked from within
    "synth $module"
        ("foreach" body line 5)
        invoked from within
    "foreach module $modules {
          if {[get_module_attribute $module synth]} {
           puts $rfh "\n#HD: Running synthesis for block $module"
           comma..."
        invoked from within
    "if {[llength $modules] > 0} {
       foreach module $modules {
          if {[get_module_attribute $module synth]} {
           puts $rfh "\n#HD: Running synthesi..."
        (file "./Tcl/run.tcl" line 29)
        while executing
    "source $tclDir/run.tcl"
        (file "design.tcl" line 131)
    INFO: [Common 17-206] Exiting Vivado at Thu Mar 06 09:25:48 2014...
    This seems weird...why is Viavdo issuing errors about not having an open project when in HD mode it is running in non project mode ?
    Can anybody help me diagnoise the route cause of this problem please ?
    many thanks for any help i get,
    i have attached my design.tcl file to this query :)
    Dr Barry Henderson
     

  • Multi Choice question marking

    Hi
    I am using C5 and want to set up a quiz with multi choice questions.  What I want to know, is it possible to mark partially correct questions - i.e. if there are three possible correct options in a question and the user only gets two, I want to award them 66% of the marks for that question.  is that possible please and if so how?
    Thanks
    A

    Hi Alex,
      As per the current design, Captivate won’t support partial answering for a Question Slides, if you really think that this should be there in the future versions of captivate, please file a feature request in https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&product=5?
    -nsukumar

  • How to check if a file is being read by another program?

    Hey all,
    I just have a few question for a project I am doing:
    How do I check if a file is being read by another program?
    How do I check how many lines it read?
    How do I get Keyboard input from the user when he is using another program other than mine? Ex: Pressing Ctrl-G to take a screenshot.
    How can I halt another program from reading a file when it already opened it? Ex: The other program opened a file and began reading. Now it is at line 2 and I want to make it skip 10 lines and contontinue.
    Thanks,
    Bluelikeu

    How do I check if a file is being read by another
    program?This is about the only partially sensible question you asked. But the answer is that unless you use some native code, you can't.
    How do I check how many lines it read?It doesn't even make sense to ask this question. First of all, what's a "line" anyway? Files are just sequences of bytes. A "line" is only in the interpretation of those bytes, such as if it contains <cr><lf> sequences an application may choose to render the contents of those bytes as logical "lines" of string sequences. Second of all, why the heck would it matter to you how many bytes have already been read by some other process(es)?
    How do I get Keyboard input from the user when he is
    using another program other than mine? Ex: Pressing
    Ctrl-G to take a screenshot.You want to spy on other applications? Shame on you, Mr. Spyware creator.
    How can I halt another program from reading a file
    when it already opened it? Ex: The other program
    opened a file and began reading. Now it is at line 2
    and I want to make it skip 10 lines and contontinue.Shame on you Mr. Spyware creator.

  • Latest Linux 3.17 kernel with OpenEmbedded/Yocto

    I'm currently building my Linux system using the OpenEmbedded linux-xlnx_3.14 recipe in the meta-xilinx layer.
    I've noticed that SDK 2014.4 produces a somewhat different device tree to previous versions, which I assume has to do with the newer 2014.4 now using kernel version 3.17 instead of 3.14.
    1. What is the closest recipe that PetaLinux 2014.4 is based off?
    The figure 1 here seems to show meta-xilinx and PetaLinux draw from the same sources, but PetaLinux isn't exactly derived directly from meta-xilinx recipes: http://www.wiki.xilinx.com/Linux
    These are the current list of kernel recipes:
    http://git.yoctoproject.org/cgit/cgit.cgi/meta-xilinx/tree/recipes-kernel/linux
    2. When might there be a linux-xlnx_3.17 recipe?
    3. Is the linux-yocto_3.17 recipe good enough to try instead if I want the 3.17 kernel? What are the differences between linux-xlnx and linux-yocto practically speaking?

    For question 3, I've found this mailing list message to be useful:
    https://lists.yoctoproject.org/pipermail/meta-xilinx/2015-January/000896.html
    Basically, linux-xlnx includes some useful/necessary Zynq drivers, depending on your needs. The list of ones that are and aren't included are here:
    http://www.wiki.xilinx.com/Linux+Drivers
    Also, this message and subsequent messages are about the future intention of the kernel recipes:
    https://lists.yoctoproject.org/pipermail/meta-xilinx/2015-March/000927.html
    They are intending to have just about everything that is used by the majority in the mainline linux-yocto kernel, so that linux-xlnx is only for testing development things. Kernel 3.19 and onwards has more Zynq drivers included towards this goal. So to partially answer question 2, it seems there may not be a linux-xlnx-3.17, but either a mainline linux-yocto_3.19+ or linux-xlnx-dev kind of thing that follows the latest.

  • Muse Freezes - Program Conflicts?

    Hi,
    This is partially a question, but also a story about an issue I had and how I came across a solution in case anyone should happen to be in a similar situation:
    I'm running the latest version of Muse with the latest version of AIR on Windows 8.1, and everything had been working fine with it until this morning. I wasn't sure what might have been causing the problem, but the problem was that I was unable to place any kind of image, regardless of file type. When I clicked on the "Place" or "Place Photoshop Button" commands, Muse would just freeze and become unresponsive, yet the program window wouldn't fade (as would be typical with an unresponsive program in Windows), and I received no error message within Muse. When I click "Save As," the Save window starts to appear and then freezes halfway through loading (this fades and gives the prompt that Muse is not responding).  I tried uninstalling AIR, and installing version 3.9, but this didn't work. I tried uninstalling the Lenovo Solution Center, which also requires AIR to run (and seemingly caused no issues with Muse previously)...no luck. Uninstalling and reinstalling Muse gave me no success. It had been a few days since I had used the program last (it was working fine this past Sunday). The only other programs I had installed between then and now were the EFI Fiery tools for my laptop to be able to use one of the printers at my job, and the latest Photoshop 14.2.1 update that was available this morning.  I was able to save existing files so long as I did not press "Save As," and I could drag and drop images onto the website workspace, but this was of little help when trying to put in a PSD button. The problem came up regardless of whether I was working on an existing Muse project or starting a new file.
    When I uninstalled the EFI Fiery tools and associated programs, removed the office Fiery printer from my printer list (it's a Xerox Color 560), restarted my computer, and started Muse, everything worked properly again with no issues. There must have been some sort of conflict between Muse and the Fiery tools or the printer, but I can't fathom what that could possibly be. I can live without having the tools on my laptop, since they're also on my workstation at the office, but it was purely a matter of convenience, since there are some things I'll work on at home and then send to print from the laptop.
    Is this a known conflict, and are there any other program conflicts with Muse that we should be aware of?

    I think I've isolated the problem to text editing: Muse freezes when editing text. I can perform other functions, such as placing graphics, but when I try the use the text tool, Muse freezes.

  • Is this the help docs for Indesign, on a website?

    I remember a time when apps came with a help section that did more than link unusably to menu items. 
    Is this the help docs for Indesign?
    http://helpx.adobe.com/indesign/topics.html
    Why is there no interactive local help system?
    I went searching for a map of the keyboard shortcuts...

    THANK YOU!!!
    I thought it was me. I couldn't get that AIR app to ever finish updating.  I was hoping it would install .chm style interactive help... but now... thanks, I know not to worry.  It's a bad joke. 
    Someone should tell Adobe that just because they make AIR and Acrobat doesn't mean they're the ideal formats for help files.
    Partially related question, is there such a thing as a good AIR app?

  • Mac Mini Server use

    Can I use a Mac Mini with server software to access my accounting software (Quickbook for Mac) and other applications from an office in CA and an office in Arizona?

    I see that it has been said you can use this with any software that would run on the standard OS but I have doubts from reading other forum posts . . .
    I called in to sales to ask the following question (the sales person had not even heard of the MacMini Server):
    Is there a development fork between OSX on the MacMini and OSX Server on the MacMini Server that would put updates on the server version behind the standard OS or that could prevent any software that runs on the standard OS from running on the server version?
    She contacted someone (a software engineer?) for help in answering my question, but my confidence in the answer - you'll have no issues - is not great.
    It would be awesome to have a specific answer to my question about the development of these two products so I may confidently purchase the server version without hesitation that something won't work on it because it is the server version of the OS . . . This info would be great to have on the MacMini server page as well.
    So here are my questions now:
    Can I simply purchase a new copy of iLife (as I understand it doesn't come with it) and use it on the server; I ask this partially answered question again because the iLife sales page makes it sound like an upgrade ("Upgrade to iLife"), and if I never had it on the server then how can it run iLife?
    Secondly, is bootcamp not part of the OSX Server? I'd like to throw Windows on the other harddrive, but most solutions I've read in the forum involve using disks other than the OSX Server disk - like a client disk.
    If the Server OS truly is just the client on steroids than it sounds like an awesome deal hardware wise, I'd I'd like to toy with some of the server features as well, but I don't want to find out that Final Cut doesn't run on it or anything else I might want that is made for OSX - software or hardware . . .

  • IPad Wifi Sensitivity

    This is partially a discussion and partially a question.  I'll start with the question first:  Why is the iPad (and possibly iPhone, aswell) so sensitive to wireless access point problems?  I have found countless posts on these forums of people having Wifi connectivity problems where it turns out that after power-cycling or replacing the wireless access point (often combined with the router unit) with a more Apple-friendly counterpart, the problems are resolved.  Though this does seem to indicate that this is in fact a problem with these routers, why is it that every Windows-powered device in our office and everyone's Android-powered phones all can maintain connections with no problems, but I need to go over to the router, unplug it, and then plug it in again in order to stop my iPad from alternating between displaying "officenet" (our AP name) and "Not Connected?"
    What is there that the iPad is mindful of that causes it to connect and disconnect back and forth, but Windows and Android seem to ignore?  Is there any way to make the iPad ignore this, because there are times when I go to airports or restaurants where I do not have access to their APs, so I need to just put the iPad away and use my smaller-screened Galaxy S3.

    Hi,
    Tap Settings / General / Reset / Reset Network Settings.
    If that didn't make a difference, click here for Troubleshooting Wi-Fi networks and connections
    Carolyn

  • Multiple answer quiz

    I have a quiz that has 6  check boxes, 5 are true and 1 false. How do I display a partial correct, like if they only get 4 right and missed the 5th. i would like to display "sorry partially correct the correct answer is 12356" but still reain the standard correct and false.
    I ask this only because Captivate 5.5 only shows Correct if all 5 are selected, but if only a few are correct you get a False.
    hope this makes sense.

    Hello,
    That is the problem I explained in one of my blog posts about reporting the score of customised questions, will not repeat it here, have a look:
    Report custom questions - part 1
    I published the second part already, not yet the third part where I will try to offer a solution for partial scored questions but you'll have to be aware that in that case a lot depends on the LMS as well because you will have to choose either for a correct percentage or for a correct score (with a lot of maths to do in the actions). The reason is that every scored object will have its score added to the total score and negative scores are not possible.
    As for creating customised questions, last posts were about using widgets for that goal, here is a link to the list with all the posts:
    Widgets and custom questions - source list
    And here is a link to my list of advanced actions articles, article 4 is about customised feedback:
    Articles on Advanced actions
    Sorry about my laziness , started to write those articles and blog posts to be able to explain more in detail than in answers on this forum.
    Lilybiri

  • How can I make a fill-in-the-blank question with partial score?

    I need to make an evaluation test with some questions. Some of them is a fill-in-the-blank question and it has to have partial score.
    I have:
    4 fields (text entry boxes) with: retain text, validate user input;
    also checked include in quiz, with points, add to total and report answers;
    an action that disables the 4 fields when the student is on review mode (otherwise it would be possible to change the answer after submitting the answers);
    Problems:
    I can't give feddback to the student: if i turn on success/failure captions the student will see them while answering, if i turn them off he wont know what's the right answer. I tried to use a shape to hide captions but the captions are always in front of the shape;
    When reviewing the test something happens and the second time we see the results slide it assumes that the fields in the FIB question are empty;
    Notes: it will be used in Moodle, as a scorm package
    What can I do?

    I have a test with some questions (multiple choice, FIB, matching, etc). I have just one button to submit all the answers, and after submiting the student can see his score and review the test to know where he failed. He can't answer again. However, he can change the answer multiple times before submiting.
    "if i turn on success/failure captions the student will see them while answering" - before submitting
    "if i turn them off he wont know what's the right answer" - after submitting
    My results page is the default. I didn't use any variable. When i go to the results page after reviewing the test all the entry boxes are "wrong".

  • Can I partially spend a gift card, and other questions on gift card limitations

    I have several questions:
    1) Is it possible to only partially spend a gift card, and save the rest for another time?
    2) Within what time frame does teh card needs to be spend?
    3) Can I buy a gift card in an apple store in China, and then spend it on a UK app store account?
    4) iTunes has an app store where gift cards can be redeemed. Can gift cards be redeemed with the Mac App store as well for Mac software purchases?
    5) Can the gift card be used for Apple Store purchases?
    6) If one gift card's funds is insufficient for a purchase, can the difference be paid with a second gift card?
    7) What are the limitations to spending a gift card, is it just the funds, or also a quantity of apps?
    Honestly, I would expect Apple to have a support section that clarifies this, but I can't find it by browsing the Apple website.

    Thanks guys,
    So in addition to your information I found some more data that helps clarify why e.g. China cards cannot be spend in a UK iTunes app store. Not sure I agree, or approve, and quite sure that Apple looses money this way, but it is what it is.
    However, I wonder if this is a workaround:
    Ok, so I got a UK iTunes account. I read here that it is possible to change country/region for an account. So... if I were to change my country/region to China, and THEN buy an iTunes gift card, can I then spend that using my relocated-to-China account in the iTunes store? And then, what would happen if I then subsequently change back to the UK?

Maybe you are looking for