]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/Database.java
4 Database represents an exceplicity name list of database file.
6 Copyright (c) 2006, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 package org
.tianocore
.framework
.tasks
;
19 import java
.util
.ArrayList
;
20 import java
.util
.List
;
21 import java
.util
.StringTokenizer
;
26 Database represents an exceplicity name list of database file.
29 public class Database
implements NestElement
{
31 /// name of database file
33 private String name
= "";
35 /// name of file including database files
39 /// the database file name list
41 private List
<String
> nameList
= new ArrayList
<String
>();
46 This function is to get class member "name".
48 @return class member "name".
50 public String
getName() {
56 This function is to set class member "name".
58 @param name : name of database file.
60 public void setName(String name
) {
61 this.name
= " -db " + name
;
67 This function is to call getName() function.
68 @return class member "name".
70 public String
toString() {
77 This function is to get file which include the database file list.
79 @return class member "file"
82 public File
getFile() {
88 This function is to set class member "file".
90 @param file The file which include the database file list.
92 public void setFile(File file
) {
97 public void setList(String fileNameList
) {
98 if (fileNameList
!= null && fileNameList
.length() > 0) {
99 StringTokenizer tokens
= new StringTokenizer(fileNameList
, " \t,;", false);
100 while (tokens
.hasMoreTokens()) {
101 String fileName
= tokens
.nextToken().trim();
102 if (fileName
.length() > 0) {
103 this.nameList
.add(fileName
);
109 public List
<String
> getList() {