-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
308 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
processing-api/src/main/java/org/n52/javaps/ogc/ows/OwsMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.n52.javaps.ogc.ows; | ||
|
||
import java.net.URI; | ||
import java.util.Objects; | ||
import java.util.Optional; | ||
|
||
import org.n52.javaps.ogc.w3c.xlink.XLink; | ||
|
||
|
||
/** | ||
* TODO JavaDoc | ||
* @author Christian Autermann | ||
*/ | ||
public class OwsMetadata extends XLink { | ||
private Optional<URI> about = Optional.empty(); | ||
|
||
public Optional<URI> getAbout() { | ||
return about; | ||
} | ||
|
||
public void setAbout(Optional<URI> about) { | ||
this.about = about; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
final OwsMetadata other = (OwsMetadata) obj; | ||
|
||
return super.equals(obj) && Objects.equals(getAbout(), other.getAbout()); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return 53 * super.hashCode() + Objects.hashCode(getAbout()); | ||
} | ||
|
||
} |
120 changes: 120 additions & 0 deletions
120
processing-api/src/main/java/org/n52/javaps/ogc/w3c/xlink/XLink.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
package org.n52.javaps.ogc.w3c.xlink; | ||
|
||
import java.net.URI; | ||
import java.util.Objects; | ||
import java.util.Optional; | ||
|
||
import com.google.common.base.Strings; | ||
|
||
/** | ||
* TODO JavaDoc | ||
* | ||
* @author Christian Autermann | ||
*/ | ||
public class XLink { | ||
private Optional<URI> href = Optional.empty(); | ||
private Optional<URI> role = Optional.empty(); | ||
private Optional<URI> arcrole = Optional.empty(); | ||
private Optional<String> title = Optional.empty(); | ||
private Optional<Show> show = Optional.empty(); | ||
private Optional<Actuate> actuate = Optional.empty(); | ||
|
||
public Optional<URI> getHref() { | ||
return this.href; | ||
} | ||
|
||
public void setHref(URI href) { | ||
this.href = Optional.ofNullable(href); | ||
} | ||
|
||
public Optional<URI> getRole() { | ||
return role; | ||
} | ||
|
||
public void setRole(URI role) { | ||
this.role = Optional.ofNullable(role); | ||
} | ||
|
||
public Optional<URI> getArcrole() { | ||
return arcrole; | ||
} | ||
|
||
public void setArcrole(URI arcrole) { | ||
this.arcrole = Optional.ofNullable(arcrole); | ||
} | ||
|
||
public Optional<String> getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = Optional.ofNullable(Strings.emptyToNull(title)); | ||
} | ||
|
||
public Optional<Show> getShow() { | ||
return show; | ||
} | ||
|
||
public void setShow(Show show) { | ||
this.show = Optional.ofNullable(show); | ||
} | ||
|
||
public Optional<Actuate> getActuate() { | ||
return actuate; | ||
} | ||
|
||
public void setActuate(Actuate actuate) { | ||
this.actuate = Optional.ofNullable(actuate); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(getHref(), getRole(), getArcrole(), | ||
getTitle(), getShow(), getActuate()); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
final XLink other = (XLink) obj; | ||
return Objects.equals(this.getHref(), other.getHref()) && | ||
Objects.equals(this.getRole(), other.getRole()) && | ||
Objects.equals(this.getArcrole(), other.getArcrole()) && | ||
Objects.equals(this.getTitle(), other.getTitle()) && | ||
Objects.equals(this.getShow(), other.getShow()) && | ||
Objects.equals(this.getActuate(), other.getActuate()); | ||
} | ||
|
||
public enum Type { | ||
SIMPLE, | ||
EXTENDED, | ||
LOCATOR, | ||
ARC, | ||
RESOURCE, | ||
TITLE, | ||
NONE | ||
} | ||
|
||
public enum Show { | ||
NEW, | ||
REPLACE, | ||
EMBED, | ||
OTHER, | ||
NONE; | ||
} | ||
|
||
public enum Actuate { | ||
ON_LOAD, | ||
ON_REQUEST, | ||
OTHER, | ||
NONE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.