1 22 23 package org.xquark.mapper.mapping; 24 25 import org.xquark.schema.Declaration; 26 import org.xquark.schema.SchemaComponent; 27 import org.xquark.schema.Type; 28 29 33 public abstract class MappingImpl implements Mapping 34 { 35 private static final String RCSRevision = "$Revision: 1.1 $"; 36 private static final String RCSName = "$Name: $"; 37 38 protected SchemaComponent comp; 39 40 protected MappingImpl(SchemaComponent comp) 41 { 42 this.comp = comp; 43 } 44 45 public SchemaComponent getSchemaComponent() { return comp; } 46 50 public Type getSchemaType() 51 { 52 SchemaComponent comp = getSchemaComponent(); 53 if (comp == null) 54 return null; 55 else if (comp instanceof Type) 56 return (Type)comp; 57 else 58 return ((Declaration)comp).getType(); 59 } 60 61 } 62 | Popular Tags |