Package org.n52.shetland.ogc.gml
Class AbstractReferenceType
- java.lang.Object
-
- org.n52.shetland.ogc.gml.AbstractReferenceType
-
- All Implemented Interfaces:
Comparable<AbstractReferenceType>
- Direct Known Subclasses:
AbstractDataComponentContainer,AbstractSmlDataComponentContainer,ProcessMethod,ReferenceType,SmlComponent,SmlContact,SmlIo,SmlParameter
public class AbstractReferenceType extends Object implements Comparable<AbstractReferenceType>
-
-
Constructor Summary
Constructors Constructor Description AbstractReferenceType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(AbstractReferenceType o)booleanequals(Object obj)StringgetHref()Get hrefStringgetRole()Get roleStringgetTitle()Get titleStringgetTitleOrFromHref()Get title from href.
Cuts href:
- starts with 'http': cuts string at last '/'
- starts with 'urn': cuts string at last ':'
- contains "#": cuts string at last "#"inthashCode()booleanhasValues()Check whether href, title, and role are setbooleanisSetHref()Check whether href is setbooleanisSetRole()Check whether role is setbooleanisSetTitle()Check whether title is setAbstractReferenceTypesetHref(String href)Set hrefAbstractReferenceTypesetRole(String role)Set roleAbstractReferenceTypesetTitle(String title)Set titleStringtoString()
-
-
-
Method Detail
-
getHref
public String getHref()
Get href- Returns:
- Href
-
getTitle
public String getTitle()
Get title- Returns:
- Title
-
getRole
public String getRole()
Get role- Returns:
- Role
-
setHref
public AbstractReferenceType setHref(String href)
Set href- Parameters:
href- Href to set
-
setTitle
public AbstractReferenceType setTitle(String title)
Set title- Parameters:
title- Title to set
-
setRole
public AbstractReferenceType setRole(String role)
Set role- Parameters:
role- Role to set
-
isSetHref
public boolean isSetHref()
Check whether href is set- Returns:
true, if href is set
-
isSetTitle
public boolean isSetTitle()
Check whether title is set- Returns:
true, if title is set
-
isSetRole
public boolean isSetRole()
Check whether role is set- Returns:
true, if role is set
-
hasValues
public boolean hasValues()
Check whether href, title, and role are set- Returns:
true, if href, title, and role are set
-
getTitleOrFromHref
public String getTitleOrFromHref()
Get title from href.
Cuts href:
- starts with 'http': cuts string at last '/'
- starts with 'urn': cuts string at last ':'
- contains "#": cuts string at last "#"- Returns:
- Title from href
-
compareTo
public int compareTo(AbstractReferenceType o)
- Specified by:
compareToin interfaceComparable<AbstractReferenceType>
-
-