source: trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes/DocumentFactory.java@ 5944

Last change on this file since 5944 was 5944, checked in by cs025, 20 years ago

Index document type, metadata extensions

  • Property svn:keywords set to Author Date Id Revision
File size: 378 bytes
Line 
1package org.greenstone.gsdl3.gs3build.doctypes;
2
3public class DocumentFactory
4{
5 public static AbstractDocument createDocument(String type, DocumentID id)
6 {
7 if (type.equals(HTMLDocument.HTML_DOCUMENT_TYPE))
8 { return new HTMLDocument(id);
9 }
10 else if (type.equals(TextDocument.TEXT_DOCUMENT_TYPE))
11 { return new TextDocument(id);
12 }
13 return null;
14 }
15}
Note: See TracBrowser for help on using the repository browser.