GenericURI.java
00001 package edu.virtualschool.jwaa;
00002
00003
00007 public abstract class GenericURI
00008 {
00009 String text;
00010
00011 public GenericURI(String text)
00012 {
00013 this.text = text;
00014 }
00015 public final String toString()
00016 {
00017 return text;
00018 }
00019 public final String getText()
00020 {
00021 return text;
00022 }
00023 public void setText(String text)
00024 {
00025 this.text = text;
00026 }
00027 abstract String getProtocol();
00028
00033 public static class StaticPageRef extends GenericURI
00034 {
00035 public StaticPageRef(String text)
00036 {
00037 super(text);
00038 }
00039 final String getProtocol()
00040 {
00041 return "http://";
00042 }
00047 public class Mailto extends GenericURI
00048 {
00049 public Mailto(String address)
00050 {
00051 super(address);
00052 }
00053 final String getProtocol()
00054 {
00055 return "mailto:";
00056 }
00057 }
00058 }
00064 public static class DynamicPageRef extends GenericURI
00065 {
00066
00067 public DynamicPageRef(String id)
00068 {
00069 super(id);
00070 }
00071 final String getProtocol()
00072 {
00073 return "http://";
00074 }
00075
00076 }
00077 }