classifierLibrary
Class Language

java.lang.Object
  extended byclassifierLibrary.SymbolSet
      extended byclassifierLibrary.Language
All Implemented Interfaces:
java.lang.Cloneable

public class Language
extends SymbolSet
implements java.lang.Cloneable

Library classifierLibrary, Class Language

Copyright by Klaus Hufschlag 2004,2005,2006

This file is part of the Generic Classifier Library. The Generic Classifier Library 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. The Generic Classifier Library 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 the Generic Classifier Library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Version:
1.4
Author:
Klaus Hufschlag

Field Summary
 Relation hierarchy
           
 
Constructor Summary
Language(java.lang.String name)
          Constructor
Language(java.lang.String name, java.lang.String[] symbolNames)
          Constructor, creates an instance containing elements following a list of names.
 
Method Summary
 void add(Symbol s, Symbol parent)
          Adds a Symbol to a set, as a subordinate to a parent.
 void addMultiSymbols(java.lang.String[] names, Symbol parent)
          Adds Symbols following a list of names to the instance.
 boolean checkRel(Symbol parent, Symbol child)
          Checks wether the an element given as parent is really Funktion prüft, ob das als superordinate to the symbol given as child.
 java.lang.Object clone()
           
 void debug_out()
          Method for debugging-purposes.
 java.util.ArrayList getChildren(Symbol s)
          Returns all child elements of a given Symbol as defined in this Language.
 boolean hasWildcards()
          Checks wheter the language contains symbols that are superordinates to other symbols also contained in the language
 void remove()
          Removes all Symbols from the instance.
 void remove(Symbol s)
          Removes a Symbol from the set.
 
Methods inherited from class classifierLibrary.SymbolSet
add, add, addMultiSymbols, asCollection, contains, contains, contains, getDefault, getName, getSize, iterator, powerSet, randomSymbol, remove, setDefault, setDefault, setName, symbolByName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hierarchy

public Relation hierarchy
Constructor Detail

Language

public Language(java.lang.String name)
Constructor

Parameters:
name - Name of Language to be created.

Language

public Language(java.lang.String name,
                java.lang.String[] symbolNames)
Constructor, creates an instance containing elements following a list of names.

Parameters:
name - Name of Language to be created
symbolNames - List of names of Symbols to be included
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class SymbolSet

add

public void add(Symbol s,
                Symbol parent)
Adds a Symbol to a set, as a subordinate to a parent. If the parent is not part of the set, it will also be added to the set.

Parameters:
s - Element to be added
parent - Parent element.

addMultiSymbols

public void addMultiSymbols(java.lang.String[] names,
                            Symbol parent)
Adds Symbols following a list of names to the instance. If a Symbol is not yet existing, it is created. Makes the Symbols subordinate to a given parent.

Parameters:
names -
parent -

remove

public void remove(Symbol s)
Description copied from class: SymbolSet
Removes a Symbol from the set.

Overrides:
remove in class SymbolSet
Parameters:
s - Symbol to be removed

remove

public void remove()
Description copied from class: SymbolSet
Removes all Symbols from the instance.

Overrides:
remove in class SymbolSet

checkRel

public boolean checkRel(Symbol parent,
                        Symbol child)
Checks wether the an element given as parent is really Funktion prüft, ob das als superordinate to the symbol given as child.

Parameters:
parent -
child -
Returns:
true, if parent is superordinate to child

debug_out

public void debug_out()
Description copied from class: SymbolSet
Method for debugging-purposes.

Overrides:
debug_out in class SymbolSet

hasWildcards

public boolean hasWildcards()
Checks wheter the language contains symbols that are superordinates to other symbols also contained in the language

Returns:
true, if wildcard symbols are contained

getChildren

public java.util.ArrayList getChildren(Symbol s)
Returns all child elements of a given Symbol as defined in this Language.

Parameters:
s - Symbol serving as parent
Returns:
Array List of subordinate symbols