1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 package org.apache.openoffice.ooxml.schema.simple; 23 24 import org.apache.openoffice.ooxml.schema.misc.Log; 25 import org.apache.openoffice.ooxml.schema.model.base.QualifiedName; 26 27 public class SimpleTypeDescriptor 28 { SimpleTypeDescriptor( final QualifiedName aName)29 public SimpleTypeDescriptor ( 30 final QualifiedName aName) 31 { 32 maName = aName; 33 maSubTypes = null; 34 } 35 36 37 38 GetName()39 public QualifiedName GetName() 40 { 41 return maName; 42 } 43 44 45 46 SetSubTypes(final ISimpleTypeNode[] aSubTypes)47 public void SetSubTypes (final ISimpleTypeNode[] aSubTypes) 48 { 49 maSubTypes = aSubTypes; 50 } 51 52 53 54 GetSubType()55 public ISimpleTypeNode[] GetSubType () 56 { 57 return maSubTypes; 58 } 59 60 61 62 63 @Override toString()64 public String toString () 65 { 66 return "simple type "+maName; 67 } 68 69 70 71 Print(final Log aLog)72 public void Print (final Log aLog) 73 { 74 aLog.printf("%s\n", toString()); 75 aLog.StartBlock(); 76 for (final ISimpleTypeNode aSubType : maSubTypes) 77 aSubType.Print(aLog); 78 aLog.EndBlock(); 79 } 80 81 82 83 84 private final QualifiedName maName; 85 private ISimpleTypeNode[] maSubTypes; 86 } 87