Package org.gvsig.fmap.mapcontext.layers
Class AbstractLinkProperties
java.lang.Object
org.gvsig.fmap.mapcontext.layers.AbstractLinkProperties
- All Implemented Interfaces:
org.gvsig.tools.persistence.Persistent
- Direct Known Subclasses:
FLyrVectLinkProperties
public abstract class AbstractLinkProperties
extends Object
implements org.gvsig.tools.persistence.Persistent
This is an abstract class to keep the properties of the HyperLink. One layer may have
one or zero LinkProperties. The properties of a Link are:
- fieldName, the field´s name of the selected column of the table associated to the
layer
- extName, the name of the extension that the usser indicates
- typeLink, the type of the Link
The class implements 'IPersistance' interface to provide persistance to the properties
of HyperLink
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetExt()Gets the extension of the files that the user has indicated like properties of the HyperLink, this extension is added to the content of the field selected in the tablegetField()Gets the field´s name of the table that the user has selectedabstract URI[]Provides an array with URIs.intgetType()Gets the type of the HyperLinkvoidloadFromState(org.gvsig.tools.persistence.PersistentState state) Set the state of the object from the state passed as parameter.voidsaveToState(org.gvsig.tools.persistence.PersistentState state) Saves the internal state of the object on the provided PersistentState object.voidSets the extensionvoidSets the field´s namevoidsetType(int tipo) Sets the type of the HyperLink
-
Constructor Details
-
AbstractLinkProperties
public AbstractLinkProperties()Default constructor
-
-
Method Details
-
getLink
public abstract URI[] getLink(FLayer layer, Point2D point, double tolerance) throws org.gvsig.fmap.dal.exception.ReadException Provides an array with URIs. Returns one URI by geometry that includes the point in its own geometry limits with a allowed tolerance.- Parameters:
layer- , the layerpoint- , the point to check that is contained or not in the geometries in the layertolerance- , the tolerance allowed. Allowed margin of error to detect if the point is contained in some geometries of the layer- Returns:
-
getField
Gets the field´s name of the table that the user has selected- Returns:
- this name of the field
-
setField
Sets the field´s name- Parameters:
campo- , the field´s name
-
getType
public int getType()Gets the type of the HyperLink- Returns:
- the type
-
setType
public void setType(int tipo) Sets the type of the HyperLink- Parameters:
tipo-
-
getExt
Gets the extension of the files that the user has indicated like properties of the HyperLink, this extension is added to the content of the field selected in the table- Returns:
- the extension
-
setExt
Sets the extension- Parameters:
extension- , the extension of the files
-
saveToState
public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException Saves the internal state of the object on the provided PersistentState object.- Specified by:
saveToStatein interfaceorg.gvsig.tools.persistence.Persistent- Parameters:
state-- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
loadFromState
public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException Set the state of the object from the state passed as parameter.- Specified by:
loadFromStatein interfaceorg.gvsig.tools.persistence.Persistent- Parameters:
state-- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-