Kostenloser Download der gesamten Diplomarbeit - dotSource
Kostenloser Download der gesamten Diplomarbeit - dotSource
Kostenloser Download der gesamten Diplomarbeit - dotSource
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
ANHANG A. IMPLEMENTIERUNG 73<br />
Listing A.2: BlogIndexConfigurationBase.java<br />
1 . . .<br />
2 public interface BlogIndexConfiguration<br />
3 {<br />
4 public void setFeatureID(String featureID) ;<br />
5<br />
6 public String getFeatureID () ;<br />
7<br />
8 public void setIndexID (String indexID) ;<br />
9<br />
10 public String getIndexID() ;<br />
11<br />
12 public void setBlogID (String blogID) ;<br />
13<br />
14 public String getBlogID () ;<br />
15<br />
16 public abstract boolean save () ;<br />
17 }<br />
Listing A.3: BlogIndexConfiguration.java<br />
1 . . .<br />
2 public class BlogIndexConfigurationImpl implements BlogIndexConfiguration<br />
3 {<br />
4<br />
5 private static String CONFIG FILE NAME = ”Blog−Config .xml”;<br />
6 protected String indexID;<br />
7 protected Domain domain;<br />
8 File configurationFile ;<br />
9 BlogIndexConfigurationBase configuration ;<br />
10 private SearchIndexMgr searchMgr = null ;<br />
11<br />
12 public BlogIndexConfigurationImpl(Domain domain, String indexID)<br />
13 {<br />
14 this . indexID = indexID;<br />
15 this .domain = domain;<br />
16<br />
17 searchMgr =<br />
18 NamingMgr. getInstance () . lookupManager(SearchIndexMgr .REGISTRYNAME) ;<br />
19<br />
20 this . configurationFile =<br />
21 new File (searchMgr. getIndexDirectory(domain, indexID) ,<br />
CONFIG FILE NAME) ;<br />
22<br />
23 readConfigurationBase () ;<br />
24 }<br />
25<br />
26 private void readConfigurationBase ()<br />
27 {<br />
28 if ( configurationFile . exists() )<br />
29 {<br />
30 try<br />
31 {<br />
32 JAXBContext jc =<br />
33 JAXBContext. newInstance(BlogIndexConfigurationBase . class ) ;<br />
34 Unmarshaller unMarshaller = jc . createUnmarshaller () ;