KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > extractor > AbstractPropertyExtractor


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/extractor/AbstractPropertyExtractor.java,v 1.2.2.2 2004/09/29 15:11:38 unico Exp $
3  * $Revision: 1.2.2.2 $
4  * $Date: 2004/09/29 15:11:38 $
5  *
6  * ====================================================================
7  *
8  * Copyright 2004 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.extractor;
25
26 import java.util.Map JavaDoc;
27 import java.io.InputStream JavaDoc;
28
29 /**
30  * The AbstractPropertyExtractor class
31  */

32 public abstract class AbstractPropertyExtractor implements PropertyExtractor {
33
34     private String JavaDoc contentType;
35     private String JavaDoc uri;
36     private String JavaDoc namespace;
37
38     public AbstractPropertyExtractor(String JavaDoc uri, String JavaDoc contentType) {
39         this(uri, contentType, null);
40     }
41
42     public AbstractPropertyExtractor(String JavaDoc uri, String JavaDoc contentType, String JavaDoc namespace) {
43         this.contentType = contentType;
44         this.uri = uri;
45         this.namespace = namespace;
46     }
47
48     public abstract Map JavaDoc extract(InputStream JavaDoc content) throws ExtractorException;
49
50     public String JavaDoc getContentType() {
51         return contentType;
52     }
53
54     public String JavaDoc getUri() {
55         return uri;
56     }
57
58     public String JavaDoc getNamespace() {
59         return namespace;
60     }
61
62 }
63
Popular Tags