1 /* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.xsdc.tag; 18 19 import javax.xml.namespace.QName; 20 21 public abstract class XsdTag { 22 final private String name; 23 final private QName ref; 24 private boolean deprecated; 25 private boolean finalValue; 26 private Nullability nullability; 27 XsdTag(String name, QName ref)28 XsdTag(String name, QName ref) { 29 this.name = name; 30 this.ref = ref; 31 this.deprecated = false; 32 this.finalValue = false; 33 this.nullability = Nullability.UNKNOWN; 34 } 35 getName()36 public String getName() { 37 return name; 38 } 39 getRef()40 public QName getRef() { 41 return ref; 42 } 43 isFinalValue()44 public boolean isFinalValue() { 45 return finalValue; 46 } 47 setFinalValue(boolean finalValue)48 public void setFinalValue(boolean finalValue) { 49 this.finalValue = finalValue; 50 } 51 isDeprecated()52 public boolean isDeprecated() { 53 return deprecated; 54 } 55 setDeprecated(boolean deprecated)56 public void setDeprecated(boolean deprecated) { 57 this.deprecated = deprecated; 58 } 59 getNullability()60 public Nullability getNullability() { 61 return nullability; 62 } 63 setNullability(Nullability nullability)64 public void setNullability(Nullability nullability) { 65 this.nullability = nullability; 66 } 67 } 68