📄 mditemnode.java
字号:
/* * File: MDItemNode.java * Project: MPI Linguistic Application * Date: 02 May 2007 * * Copyright (C) 2001-2007 Max Planck Institute for Psycholinguistics * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */package mpi.eudico.server.corpora.clomimpl.abstr;import mpi.eudico.server.corpora.clom.TreeViewable;import java.util.Vector;/** * DOCUMENT ME! * $Id: MDItemNode.java,v 1.4 2006/04/20 09:37:36 klasal Exp $ * @author $Author: klasal $ * @version $Revision: 1.4 $ * @version Aug 2005 Identity removed */public class MDItemNode implements MetaDataNode, TreeViewable { private String tag; private String info; private String description; private MetaDataNode[] mdNodes; /** * Creates a new MDItemNode instance * * @param theTag DOCUMENT ME! * @param theInfo DOCUMENT ME! * @param theDescription DOCUMENT ME! */ public MDItemNode(String theTag, String theInfo, String theDescription) { tag = theTag; info = theInfo; description = theDescription; } // implementation of MetaDataNode interface public MetaDataNode[] getMetaDataNodes() { return mdNodes; } /** * DOCUMENT ME! * * @return DOCUMENT ME! */ public boolean hasMetaData() { if (mdNodes != null) { return true; } else { return false; } } /** * DOCUMENT ME! * * @return DOCUMENT ME! */ public LanguageResourceNode[] getLRNodes() { return null; } /** * DOCUMENT ME! * * @return DOCUMENT ME! */ public boolean hasLRs() { return false; } /** * DOCUMENT ME! * * @return DOCUMENT ME! */ public String getTag() { return tag; } /** * DOCUMENT ME! * * @return DOCUMENT ME! */ public String getDescription() { return description; } /** * DOCUMENT ME! * * @return DOCUMENT ME! */ public String getInfo() { return info; } /** * DOCUMENT ME! * * @return DOCUMENT ME! */ public boolean isMetaData() { return true; } // implementation of TreeViewable interface /** * Returns the name of the TreeViewable Object as it must be used in the * Tree. * * @return the name of the TreeViewable */ public String getNodeName() { return getTag(); } /** * Informs whether this TreeViewable has TreeViewable children. * * @return true if this TreeViewable has TreeViewable children, false * otherwise */ public boolean isTreeViewableLeaf() { return !hasMetaData(); } /** * Returns a Vector with the TreeViewable children of this TreeViewable. If * this TreeViewable has no children an empty Vector must be returned * instead of null. * * @return the TreeViewable children */ public Vector getChildren() { return new Vector(); } /** * DOCUMENT ME! * * @param metaDataItems DOCUMENT ME! */ public void addMetaData(MetaDataNode[] metaDataItems) { mdNodes = metaDataItems; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -