Package javax.xml.stream

Examples of javax.xml.stream.XMLStreamReader.require()


      while(xmlr13.hasNext()) {
        //Get and check each Household with the right Household ID
        xmlr13.next();
        if (xmlr13.isStartElement()) {
          if (xmlr13.getLocalName().equals("Household")) {
            xmlr13.require(XMLStreamConstants.START_ELEMENT, null, "Household");
            JAXBElement<Household> householdJAXB = unmarshaller.unmarshal(xmlr13, Household.class);
            Household household = (Household)householdJAXB.getValue();
            if (household.getHouseholdID().getIDStr() != null) {
              if (household.getHouseholdID().getIDStr().equals(householdID)) {
              //Then, use getHeadOfHouseholdSSNFromHousehold() method
View Full Code Here


      while(xmlr14.hasNext()) {
        //Get and check each Household with the right Household ID
        xmlr14.next();
        if (xmlr14.isStartElement()) {
          if (xmlr14.getLocalName().equals("Household")) {
            xmlr14.require(XMLStreamConstants.START_ELEMENT, null, "Household");
            JAXBElement<Household> householdJAXB = unmarshaller.unmarshal(xmlr14, Household.class);
            Household household = (Household)householdJAXB.getValue();
            if (household.getHouseholdID().getIDStr() != null) {
              if (household.getHouseholdID().getIDStr().equals(householdID)) {
                headOfHouseholdID = household.getHeadOfHouseholdID().getIDNum();
View Full Code Here

      while(xmlr15.hasNext()) {
        //Get each person
        xmlr15.next();
        if (xmlr15.isStartElement()) {
          if (xmlr15.getLocalName().equals("Person")) {
            xmlr15.require(XMLStreamConstants.START_ELEMENT, null, "Person");
            JAXBElement<Person> personJAXB = unmarshaller.unmarshal(xmlr15, Person.class);
            Person person = (Person)personJAXB.getValue();
            if (person.getPersonID().getIDNum().equals(headOfHouseholdID)) {
              returnPerson = person;
              break;
View Full Code Here

        //Get each household
        xmlr15.next();
        if (xmlr15.isStartElement()) {
          //log.info("name is:" + xmlr15.getLocalName());
          if (xmlr15.getLocalName().equals("Household"&& xmlr15.isStartElement()) {
            xmlr15.require(XMLStreamConstants.START_ELEMENT, null, "Household");
            JAXBElement<Household> householdJAXB = unmarshaller.unmarshal(xmlr15,Household.class);
            Household householdElement = (Household)householdJAXB.getValue();
            if (householdElement.getHouseholdID().getIDStr() != null) {
              if (householdElement.getHouseholdID().getIDStr().equals(householdID)) {
                log.info("found a matching household for household id: " + householdID);
View Full Code Here

      while(xmlr14.hasNext()) {
        //Get and check each Household with the right Household ID
        xmlr14.next();
        if (xmlr14.isStartElement()) {
          if (xmlr14.getLocalName().equals("Service")) {
            xmlr14.require(XMLStreamConstants.START_ELEMENT, null, "Service");
            JAXBElement<Service> serviceJAXB = unmarshaller.unmarshal(xmlr14, Service.class);
            Service service = (Service)serviceJAXB.getValue();
            if (service.getKey() != null) {
              if (service.getKey().equals(serviceKey)) {
                retSvc = service;
View Full Code Here

          // Get and check each SiteService for the right SiteServiceID
          xmlr0.next();
          if (xmlr0.isStartElement()) {
            // System.out.println("local name is: " + xmlr.getLocalName());
            if (xmlr0.getLocalName().equals("Household") && xmlr0.isStartElement()) {
              xmlr0.require(XMLStreamConstants.START_ELEMENT, null, "Household");
              // get the HouseholdID element following soon after this element
              while(xmlr0.hasNext()) {
                xmlr0.next();
                if (xmlr0.isStartElement()) {
                  if (xmlr0.getLocalName().equals("IDStr")) {
View Full Code Here

              // get the HouseholdID element following soon after this element
              while(xmlr0.hasNext()) {
                xmlr0.next();
                if (xmlr0.isStartElement()) {
                  if (xmlr0.getLocalName().equals("IDStr")) {
                    xmlr0.require(XMLStreamConstants.START_ELEMENT, null, "IDStr");
                    //save this index in db for later sequential processing
                    String index = xmlr0.getElementText();
                    RosieIndexes r = new RosieIndexes();
                    r.setXmlBlobId(new BigInteger(id));
                    r.setFile2index(index);
View Full Code Here

                    //log.info("file 2 being indexed");
                    ris.createRosieIndexes(r);
                    break;
                  }
                  else if (xmlr0.getLocalName().equals("IDNum")) {
                    xmlr0.require(XMLStreamConstants.START_ELEMENT, null, "IDNum");
                    //save this index in db for later sequential processing
                    String index = xmlr0.getElementText();
                    RosieIndexes r = new RosieIndexes();
                    r.setXmlBlobId(new BigInteger(id));
                    r.setFile2index(index);
View Full Code Here

        //Get each household
        xmlr0.next();
        if (xmlr0.isStartElement()) {
          //log.info("name is:" + xmlr1.getLocalName());
          if (xmlr0.getLocalName().equals("Household")) {
            xmlr0.require(XMLStreamConstants.START_ELEMENT, null, "Household");
            JAXBElement<Household> householdJAXB = unmarshaller.unmarshal(xmlr0,Household.class);
            Household householdElement = (Household)householdJAXB.getValue();
            if (householdElement.getHouseholdID().getIDStr() != null) {
              if ((householdElement.getHouseholdID().getIDStr()).equals(nextIndex)) {
                log.info("Now converting household: " + householdElement.getHouseholdID().getIDStr());
View Full Code Here

      while(xmlr5.hasNext()) {
        //Get each agency
        xmlr5.next();
        if (xmlr5.isStartElement()) {
          if (xmlr5.getLocalName().equals( "Agency")) {
            xmlr5.require(XMLStreamConstants.START_ELEMENT, null, "Agency");
            JAXBElement<Agency> agencyJAXB = unmarshaller.unmarshal(xmlr5, Agency.class);
            Agency agencyElement = (Agency)agencyJAXB.getValue();
            //iterate through all the sites in this agency
            for (TSite site : agencyElement.getSite()) {
              //Get the Site Key  from this Agency
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.