Android Open Source - visualekg X M L Message






From Project

Back to project page visualekg.

License

The source code is released under:

GNU General Public License

If you think the Android project visualekg listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package xmlMessages;
/*from  w w w.  ja va  2s. c o m*/
import java.util.ArrayList;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;

import entities.Company;
import entities.DbEntity;
import entities.Interview;
import entities.ItemDescription;
import entities.Question;
import entities.User;
import org.s

@XmlRootElement(name = "root")
public class XMLMessage {
  
  final static int STANDARD_MESSAGE = 0;
  final static int USER_SET_MESSAGE = 1;
  final static int COMPANY_SET_MESSAGE = 2;

  public int iMessageID;
  
  private ArrayList<String> alParameters;
  private ArrayList<DbEntity> alEntities;
  
  public XMLMessage(){
    iMessageID = 0;
    alParameters = new ArrayList<String>();
    alEntities = new ArrayList<DbEntity>();
  }
  
  @XmlElements({ 
      @XmlElement(name="user", type=User.class),
      @XmlElement(name="company", type=Company.class),
      @XmlElement(name="question", type=Question.class),
      @XmlElement(name="interview", type=Interview.class),
      @XmlElement(name="ItemDescription", type=ItemDescription.class)
  })
  @XmlElementWrapper
  public ArrayList<DbEntity> getEntities(){
    return alEntities;
  }
  
  @XmlElements({ 
      @XmlElement(name="parameter", type=String.class)
  })
  @XmlElementWrapper
  public ArrayList<String> getParameters(){
    return alParameters;
  }
  
  public void add(DbEntity param){
    alEntities.add(param);
  }
  
  public void add(String param){
    alParameters.add(param);
  }
  
}




Java Source Code List

o6systems.kalpdroid.BaseActivity.java
o6systems.kalpdroid.CameraActivity.java
o6systems.kalpdroid.CameraPreview.java
xmlMessages.ErrorDefinitions.java
xmlMessages.MessageFunction.java
xmlMessages.XMLMessage.java