Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.codelist.service.internal
Class CodeListServiceImpl

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.codelist.service.internal.CodeListServiceImpl
All Implemented Interfaces:
CodeListService

public class CodeListServiceImpl
extends Object
implements CodeListService

Code list service.

Author:
Kai Schwierczek, Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Field Summary
protected  de.fhg.igd.osgi.util.configuration.IConfigurationService configurationService
          The configuration service to use for storing/loading assignments.
protected  ProjectService projectService
          The associated project service.
 
Constructor Summary
CodeListServiceImpl(ProjectService projectService)
          Constructs this code list service with the given project service.
 
Method Summary
 void addCodeList(CodeList code)
          Add a code list to the service.
 void assignAttributeCodeList(String attributeIdentifier, CodeList code)
          Assign a code list for an attribute.
 CodeList findCodeListByAttribute(String attributeIdentifier)
          Tries to find a code list associated to the attribute referenced by the given identifier.
 CodeList findCodeListByIdentifier(String namespace, String identifier)
          Tries to find the code list with the given namespace and identifier.
 List<CodeList> getCodeLists()
          Get the code lists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

projectService

protected final ProjectService projectService
The associated project service.


configurationService

protected final de.fhg.igd.osgi.util.configuration.IConfigurationService configurationService
The configuration service to use for storing/loading assignments.

Constructor Detail

CodeListServiceImpl

public CodeListServiceImpl(ProjectService projectService)
Constructs this code list service with the given project service. It will listen to cleans on the project service to clear all code lists. Also it will get/set code list assignments of the current project.

Parameters:
projectService - the project service
Method Detail

findCodeListByIdentifier

public CodeList findCodeListByIdentifier(String namespace,
                                         String identifier)
Description copied from interface: CodeListService
Tries to find the code list with the given namespace and identifier.

Specified by:
findCodeListByIdentifier in interface CodeListService
Parameters:
namespace - the namespace
identifier - the identifier
Returns:
the code list or null
See Also:
CodeListService.findCodeListByIdentifier(String, String)

getCodeLists

public List<CodeList> getCodeLists()
Description copied from interface: CodeListService
Get the code lists.

Specified by:
getCodeLists in interface CodeListService
Returns:
the code lists
See Also:
CodeListService.getCodeLists()

assignAttributeCodeList

public void assignAttributeCodeList(String attributeIdentifier,
                                    CodeList code)
Description copied from interface: CodeListService
Assign a code list for an attribute.

Specified by:
assignAttributeCodeList in interface CodeListService
Parameters:
attributeIdentifier - the attribute identifier
code - the code list to assign or null if the assignment shall be deleted
See Also:
CodeListService.assignAttributeCodeList(String, CodeList)

findCodeListByAttribute

public CodeList findCodeListByAttribute(String attributeIdentifier)
Description copied from interface: CodeListService
Tries to find a code list associated to the attribute referenced by the given identifier.

Specified by:
findCodeListByAttribute in interface CodeListService
Parameters:
attributeIdentifier - the attribute identifier
Returns:
the code list or null
See Also:
CodeListService.findCodeListByAttribute(String)

addCodeList

public void addCodeList(CodeList code)
Description copied from interface: CodeListService
Add a code list to the service.

Specified by:
addCodeList in interface CodeListService
Parameters:
code - the code list to add
See Also:
CodeListService.addCodeList(CodeList)

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d