Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.geometry.service.impl
Class AbstractGeometrySchemaService

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.geometry.service.impl.AbstractGeometrySchemaService
All Implemented Interfaces:
GeometrySchemaService
Direct Known Subclasses:
ProjectGeometrySchemaService

public abstract class AbstractGeometrySchemaService
extends Object
implements GeometrySchemaService

Abstract geometry schema service implementation.

Author:
Simon Templer

Constructor Summary
AbstractGeometrySchemaService()
           
 
Method Summary
 void addListener(GeometrySchemaServiceListener listener)
          Adds a listener for service events.
protected  List<QName> determineDefaultGeometry(TypeDefinition type)
          Determine the path to a geometry property to be used as default geometry for the given type.
 List<QName> getDefaultGeometry(TypeDefinition type)
          Get the property path to the default geometry of the given type.

Note that the path does not necessarily have to point to a property with GeometryProperty binding, but can also lead to a property containing nested geometry properties (e.g.
protected abstract  List<QName> loadDefaultGeometry(TypeDefinition type)
          Load the path of the default geometry for the given type.
protected  void notifyDefaultGeometryChanged(TypeDefinition type)
          Notifies the listeners that the default geometry for the given type has changed.
 void removeListener(GeometrySchemaServiceListener listener)
          Removes a listener for service events.
protected abstract  void saveDefaultGeometry(TypeDefinition type, List<QName> path)
          Save the association of the given property path as the default geometry of the given type.
 void setDefaultGeometry(TypeDefinition type, List<QName> path)
          Set the property path of the default geometry for the given type.

Note that the path does not necessarily have to point to a property with GeometryProperty binding, but can also lead to a property containing nested geometry properties (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGeometrySchemaService

public AbstractGeometrySchemaService()
Method Detail

getDefaultGeometry

public List<QName> getDefaultGeometry(TypeDefinition type)
Description copied from interface: GeometrySchemaService
Get the property path to the default geometry of the given type.

Note that the path does not necessarily have to point to a property with GeometryProperty binding, but can also lead to a property containing nested geometry properties (e.g. in a choice).

Specified by:
getDefaultGeometry in interface GeometrySchemaService
Parameters:
type - the type definition
Returns:
the property path to the default geometry property, or null if there is none
See Also:
GeometrySchemaService.getDefaultGeometry(TypeDefinition)

setDefaultGeometry

public void setDefaultGeometry(TypeDefinition type,
                               List<QName> path)
Description copied from interface: GeometrySchemaService
Set the property path of the default geometry for the given type.

Note that the path does not necessarily have to point to a property with GeometryProperty binding, but can also lead to a property containing nested geometry properties (e.g. in a choice).

Specified by:
setDefaultGeometry in interface GeometrySchemaService
Parameters:
type - the type definition
path - the property path
See Also:
GeometrySchemaService.setDefaultGeometry(TypeDefinition, List)

determineDefaultGeometry

protected List<QName> determineDefaultGeometry(TypeDefinition type)
Determine the path to a geometry property to be used as default geometry for the given type. By default the first geometry property found with a breadth first search is used.

Parameters:
type - the type definition
Returns:
the path to the default geometry property or null if unknown

loadDefaultGeometry

protected abstract List<QName> loadDefaultGeometry(TypeDefinition type)
Load the path of the default geometry for the given type.

Parameters:
type - the type definition
Returns:
the path to the default geometry property or null if unknown

saveDefaultGeometry

protected abstract void saveDefaultGeometry(TypeDefinition type,
                                            List<QName> path)
Save the association of the given property path as the default geometry of the given type.

Parameters:
type - the type definition
path - the property path

notifyDefaultGeometryChanged

protected void notifyDefaultGeometryChanged(TypeDefinition type)
Notifies the listeners that the default geometry for the given type has changed.

Parameters:
type - the type definition

addListener

public void addListener(GeometrySchemaServiceListener listener)
Description copied from interface: GeometrySchemaService
Adds a listener for service events.

Specified by:
addListener in interface GeometrySchemaService
Parameters:
listener - the listener to add
See Also:
GeometrySchemaService.addListener(GeometrySchemaServiceListener)

removeListener

public void removeListener(GeometrySchemaServiceListener listener)
Description copied from interface: GeometrySchemaService
Removes a listener for service events.

Specified by:
removeListener in interface GeometrySchemaService
Parameters:
listener - the listener to remove
See Also:
GeometrySchemaService.removeListener(GeometrySchemaServiceListener)

Humboldt Alignment Editor 2.5.0

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