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
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    Gets the field´s name of the table that the user has selected
    abstract URI[]
    getLink(FLayer layer, Point2D point, double tolerance)
    Provides an array with URIs.
    int
    Gets the type of the HyperLink
    void
    loadFromState(org.gvsig.tools.persistence.PersistentState state)
    Set the state of the object from the state passed as parameter.
    void
    saveToState(org.gvsig.tools.persistence.PersistentState state)
    Saves the internal state of the object on the provided PersistentState object.
    void
    setExt(String extension)
    Sets the extension
    void
    Sets the field´s name
    void
    setType(int tipo)
    Sets the type of the HyperLink

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 layer
      point - , the point to check that is contained or not in the geometries in the layer
      tolerance - , the tolerance allowed. Allowed margin of error to detect if the point is contained in some geometries of the layer
      Returns:
    • getField

      public String getField()
      Gets the field´s name of the table that the user has selected
      Returns:
      this name of the field
    • setField

      public void setField(String campo)
      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

      public String 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

      public void setExt(String extension)
      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:
      saveToState in interface org.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:
      loadFromState in interface org.gvsig.tools.persistence.Persistent
      Parameters:
      state -
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException