Debian Codegraph @

scripting/java/com/sun/star/script/framework/container/ScriptEntry.java

raw
1 /*
2 * This file is part of the LibreOffice project.
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 *
8 * This file incorporates work covered by the following license notice:
9 *
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
17 */
18
19 package com.sun.star.script.framework.container;
20
21 import java.util.HashMap;
22 import java.util.Map;
23
24 public class ScriptEntry {
25
26 private final String language;
27 private final String languagename;
28 private final String logicalname;
29 private final String description;
30
31 private final Map<String, String> languagedepprops;
32
33 protected ScriptEntry(ScriptEntry entry) {
34 this.language = entry.language;
35 this.languagename = entry.languagename;
36 this.logicalname = entry.languagename;
37 this.languagedepprops = entry.languagedepprops;
38 this.description = entry.description;
39 }
40
41 public ScriptEntry(String language, String languagename) {
42 this(language, languagename, new HashMap<String, String>(), "");
43 }
44
45 public ScriptEntry(String language, String languagename,
46 Map<String, String> languagedepprops,
47 String description) {
48 this.language = language;
49 this.languagename = languagename;
50 // logical name/ function name concept
51 // needs to be reworked, in meantime
52 // function name ( from xml ) will be used
53 // as logical name also
54 this.logicalname = languagename;
55 this.languagedepprops = languagedepprops;
56 this.description = description;
57 }
58
59 public Map<String, String> getLanguageProperties() {
60 return languagedepprops;
61 }
62
63 public String getLanguageName() {
64 return languagename;
65 }
66
67 public String getLogicalName() {
68 return logicalname;
69 }
70
71 public String getLanguage() {
72 return language;
73 }
74
75 public String getDescription() {
76 return description;
77 }
78
79 @Override
80 public String toString() {
81 return "\nLogicalName = " + logicalname +
82 "\nLanguageName = " + languagename +
83 "\nLanguaguageProperties = " + languagedepprops;
84 }
85 }