001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */package org.apache.openejb.jee;
017:
018: import javax.xml.bind.annotation.XmlAccessType;
019: import javax.xml.bind.annotation.XmlAccessorType;
020: import javax.xml.bind.annotation.XmlAttribute;
021: import javax.xml.bind.annotation.XmlElement;
022: import javax.xml.bind.annotation.XmlID;
023: import javax.xml.bind.annotation.XmlType;
024: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
025: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
026:
027: /**
028: * The variable-mapping element defines the correlation between a
029: * Java class data member or JavaBeans property to an XML element
030: * or attribute name of an XML root type. If the data-member
031: * element is present, the Java variable name is a public data
032: * member. If data-member is not present, the Java variable name
033: * is a JavaBeans property.
034: * <p/>
035: * Used in: java-xml-type-mapping
036: */
037: @XmlAccessorType(XmlAccessType.FIELD)
038: @XmlType(name="variable-mappingType",propOrder={"javaVariableName","dataMember","xmlAttributeName","xmlElementName","xmlWildcard"})
039: public class VariableMapping {
040: @XmlElement(name="java-variable-name",required=true)
041: protected String javaVariableName;
042: @XmlElement(name="data-member")
043: protected Object dataMember;
044: @XmlElement(name="xml-attribute-name")
045: protected String xmlAttributeName;
046: @XmlElement(name="xml-element-name")
047: protected String xmlElementName;
048: @XmlElement(name="xml-wildcard")
049: protected Object xmlWildcard;
050: @XmlAttribute
051: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
052: @XmlID
053: protected String id;
054:
055: public String getJavaVariableName() {
056: return javaVariableName;
057: }
058:
059: public void setJavaVariableName(String value) {
060: this .javaVariableName = value;
061: }
062:
063: public Object getDataMember() {
064: return dataMember;
065: }
066:
067: public void setDataMember(Object value) {
068: this .dataMember = value;
069: }
070:
071: public String getXmlAttributeName() {
072: return xmlAttributeName;
073: }
074:
075: public void setXmlAttributeName(String value) {
076: this .xmlAttributeName = value;
077: }
078:
079: public String getXmlElementName() {
080: return xmlElementName;
081: }
082:
083: public void setXmlElementName(String value) {
084: this .xmlElementName = value;
085: }
086:
087: public Object getXmlWildcard() {
088: return xmlWildcard;
089: }
090:
091: public void setXmlWildcard(Object value) {
092: this .xmlWildcard = value;
093: }
094:
095: public String getId() {
096: return id;
097: }
098:
099: public void setId(String value) {
100: this.id = value;
101: }
102: }
|