KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > model > core > ContentDocument


1 /*
2  * Copyright 2004 Blandware (http://www.blandware.com)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package com.blandware.atleap.model.core;
17
18 /**
19  * <p>Content document. This is content resource which is actually some document
20  * which has known type and can be parsed to extract (and index) its text. So,
21  * content document is indexed and its content is a subject for full-text search.
22  * </p>
23  * <p>
24  * Content Document has a {@link ContentLocale} attached to it. It's needed to
25  * specify a language of document content. Also, a charset is specified for
26  * document. This charset is one that is used to extract text from document.
27  * For some documents, charset has no sense (PDF documents, for example).
28  * Default charset is UTF-8.
29  * </p>
30  * <p><a HREF="ContentDocument.java.htm"><i>View Source</i></a>
31  * </p>
32  *
33  * @author Andrey Grebnev <a HREF="mailto:andrey.grebnev@blandware.com">&lt;andrey.grebnev@blandware.com&gt;</a>
34  * @version $Revision: 1.16 $ $Date: 2005/12/18 16:43:42 $
35  * @see ContentResource
36  * @struts.form include-all="false" extends="ContentResourceForm"
37  * @hibernate.joined-subclass table="`al_core_document`" lazy="false"
38  * @hibernate.joined-subclass-key column="`resource_id`"
39  */

40 public class ContentDocument extends ContentResource {
41
42     //~ Instance variables
43

44     /**
45      * The locale that is assigned to this document
46      */

47     protected ContentLocale contentLocale;
48     /**
49      * The charset of the document
50      */

51     protected String JavaDoc charset;
52
53     //~ Methods
54

55     /**
56      * Returns the locale
57      *
58      * @return locale of the document
59      * @hibernate.many-to-one column="`locale_identifier`" not-null="false" outer-join="false" lazy="false"
60      * @struts.form-field
61      * @struts.validator type="required"
62      * @struts.validator-args arg0resource="core.contentResource.form.language"
63      */

64     public ContentLocale getContentLocale() {
65         return contentLocale;
66     }
67
68     /**
69      * Sets the content locale of this document
70      *
71      * @param contentLocale locale of the document
72      */

73     public void setContentLocale(ContentLocale contentLocale) {
74         this.contentLocale = contentLocale;
75     }
76
77     /**
78      * Returns the charset
79      *
80      * @return charset of the document
81      * @hibernate.property
82      * @hibernate.column name="`charset`" not-null="true" unique="false" length="252"
83      * @struts.form-field
84      * @struts.validator type="required"
85      */

86     public String JavaDoc getCharset() {
87         return charset;
88     }
89
90     /**
91      * Sets the charset of the document content
92      *
93      * @param charset the charset of document
94      */

95     public void setCharset(String JavaDoc charset) {
96         this.charset = charset;
97     }
98 }
99
Popular Tags