001/**
002 * Copyright 2013 John Ericksen
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *    http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.androidtransfuse.model.manifest;
017
018import org.androidtransfuse.model.Identified;
019import org.androidtransfuse.model.Mergeable;
020import org.androidtransfuse.processor.Merge;
021
022import javax.xml.bind.annotation.XmlAttribute;
023import javax.xml.bind.annotation.XmlTransient;
024
025/**
026 * attributes:
027 * android:name="string"
028 * android:resource="resource specification"
029 * android:value="string"
030 *
031 * @author John Ericksen
032 */
033public class MetaData extends Mergeable implements Identified {
034
035    private String name;
036    private String resource;
037    private String value;
038
039    @Merge("n")
040    @XmlAttribute(name = "name", namespace = ManifestNamespaceMapper.ANDROID_URI)
041    public String getName() {
042        return name;
043    }
044
045    public void setName(String name) {
046        this.name = name;
047    }
048
049    @Merge("s")
050    @XmlAttribute(name = "resource", namespace = ManifestNamespaceMapper.ANDROID_URI)
051    public String getResource() {
052        return resource;
053    }
054
055    public void setResource(String resource) {
056        this.resource = resource;
057    }
058
059    @Merge("v")
060    @XmlAttribute(name = "value", namespace = ManifestNamespaceMapper.ANDROID_URI)
061    public String getValue() {
062        return value;
063    }
064
065    public void setValue(String value) {
066        this.value = value;
067    }
068
069    @Override
070    @XmlTransient
071    public String getIdentifier() {
072        return name;
073    }
074}