it.geosolutions.geoserver.rest.encoder.metadatalink
Class GSMetadataLinkInfoEncoder

java.lang.Object
  extended by it.geosolutions.geoserver.rest.encoder.utils.XmlElement
      extended by it.geosolutions.geoserver.rest.encoder.metadatalink.GSMetadataLinkInfoEncoder

public class GSMetadataLinkInfoEncoder
extends XmlElement

GSMetadataLinkEncoder - encodes a metadataLink for a given GeoServer Resource (feature type /coverage), as follows:

 final GSMetadataLinkInfoEncoder mde = new GSMetadataLinkInfoEncoder();
 mde.setType("text/xml");
 mde.setMetadataType("ISO19115:2003");
 mde.setContent("http://www.organization.org/metadata");
 
 
For this example, the XML output is:
 <metadataLink>
 	<type>text/xml</type>
 	<metadataType>ISO19115:2003</metadataType>
 	<content>http://www.organization.org/metadata</content>
 </metadataLink>
 
 

Author:
Emmanuel Blondel - emmanuel.blondel1@gmail.com | emmanuel.blondel@fao.org

Constructor Summary
GSMetadataLinkInfoEncoder()
          Constructs a new GSMetadataLinkInfoEncoder
GSMetadataLinkInfoEncoder(String type, String metadataType, String content)
          Constructs quickly a MetadataLink info
 
Method Summary
 boolean delContent()
          Deletes the content
protected  boolean delMember(ResourceMetadataLinkInfo type)
          Deletes a MetadataLinkInfo member
 boolean delMetadataType()
          Deletes the metadata type
 boolean delType()
          Deletes the type
 String getContent()
          Get the content
static org.jdom.filter.Filter getFilterByContent(String content)
          Get a Filter using the MetadataLinkInfo content (metadataURL)
protected  String getMember(ResourceMetadataLinkInfo type)
          Get the value of the MetadataLinkInfo member
 String getMetadataType()
          Get the metadata type
 String getType()
          Get the mime type
 void setContent(String content)
          Set the content
protected  void setMember(ResourceMetadataLinkInfo type, String value)
          Set a MetadataLinkInfo member (type, metadataType or content)
 void setMetadataType(String metadataType)
          Set the metadata type
 void setType(String type)
          Set the mime type
protected  void setup(String type, String metadataType, String content)
          Set-up quickly a metadataLinkInfo
 
Methods inherited from class it.geosolutions.geoserver.rest.encoder.utils.XmlElement
add, add, addContent, getRoot, isEmpty, remove, set, set, setRoot, setRoot, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GSMetadataLinkInfoEncoder

public GSMetadataLinkInfoEncoder()
Constructs a new GSMetadataLinkInfoEncoder


GSMetadataLinkInfoEncoder

public GSMetadataLinkInfoEncoder(String type,
                                 String metadataType,
                                 String content)
Constructs quickly a MetadataLink info

Parameters:
type - (required)
metadataType - (required)
content - (required)
Method Detail

getFilterByContent

public static org.jdom.filter.Filter getFilterByContent(String content)
Get a Filter using the MetadataLinkInfo content (metadataURL)

Parameters:
content -
Returns:
the filter

setup

protected void setup(String type,
                     String metadataType,
                     String content)
Set-up quickly a metadataLinkInfo

Parameters:
type -
metadataType -
content -

setMember

protected void setMember(ResourceMetadataLinkInfo type,
                         String value)
Set a MetadataLinkInfo member (type, metadataType or content)

Parameters:
type -
value -

setType

public void setType(String type)
Set the mime type

Parameters:
type -

setMetadataType

public void setMetadataType(String metadataType)
Set the metadata type

Parameters:
metadataType -

setContent

public void setContent(String content)
Set the content

Parameters:
content -

delMember

protected boolean delMember(ResourceMetadataLinkInfo type)
Deletes a MetadataLinkInfo member

Parameters:
type -
Returns:
true if the metadataLinkInfo member is removed

delType

public boolean delType()
Deletes the type

Parameters:
type -
Returns:
true if removed

delMetadataType

public boolean delMetadataType()
Deletes the metadata type

Parameters:
metadata - type
Returns:
true if removed

delContent

public boolean delContent()
Deletes the content

Parameters:
content -
Returns:
true if removed

getMember

protected String getMember(ResourceMetadataLinkInfo type)
Get the value of the MetadataLinkInfo member

Parameters:
type -
Returns:
the value of the MetadataLinkInfo member

getType

public String getType()
Get the mime type

Returns:

getMetadataType

public String getMetadataType()
Get the metadata type

Returns:

getContent

public String getContent()
Get the content

Returns:


Copyright © 2007-2014 GeoSolutions. All Rights Reserved.