-
Notifications
You must be signed in to change notification settings - Fork 15
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
1 parent
c9a326f
commit 08aa6af
Showing
15 changed files
with
863 additions
and
7 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.eclipse.lyo.oslc4j.server</groupId> | ||
<artifactId>lyo-server-build</artifactId> | ||
<version>4.1.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<groupId>org.eclipse.lyo.server</groupId> | ||
<artifactId>oslc-ui-model</artifactId> | ||
<version>4.1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>Lyo :: Server:: OSLC UI model classes</name> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.eclipse.lyo.oslc4j.core</groupId> | ||
<artifactId>oslc4j-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
122 changes: 122 additions & 0 deletions
122
server/oslc-ui-model/src/main/java/org/eclipse/lyo/server/ui/model/Link.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,122 @@ | ||
/* | ||
* Copyright (c) 2020 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License 1.0 | ||
* which is available at http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
package org.eclipse.lyo.server.ui.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@JsonPropertyOrder({ | ||
"link", | ||
"title" | ||
}) | ||
public class Link { | ||
|
||
/** | ||
* | ||
* (Required) | ||
* | ||
*/ | ||
@JsonProperty("link") | ||
private String link; | ||
/** | ||
* | ||
* (Required) | ||
* | ||
*/ | ||
@JsonProperty("title") | ||
private String title; | ||
|
||
/** | ||
* | ||
* (Required) | ||
* | ||
*/ | ||
@JsonProperty("link") | ||
public String getLink() { | ||
return link; | ||
} | ||
|
||
/** | ||
* | ||
* (Required) | ||
* | ||
*/ | ||
@JsonProperty("link") | ||
public void setLink(String link) { | ||
this.link = link; | ||
} | ||
|
||
/** | ||
* | ||
* (Required) | ||
* | ||
*/ | ||
@JsonProperty("title") | ||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
/** | ||
* | ||
* (Required) | ||
* | ||
*/ | ||
@JsonProperty("title") | ||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append(Link.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); | ||
sb.append("link"); | ||
sb.append('='); | ||
sb.append(((this.link == null)?"<null>":this.link)); | ||
sb.append(','); | ||
sb.append("title"); | ||
sb.append('='); | ||
sb.append(((this.title == null)?"<null>":this.title)); | ||
sb.append(','); | ||
if (sb.charAt((sb.length()- 1)) == ',') { | ||
sb.setCharAt((sb.length()- 1), ']'); | ||
} else { | ||
sb.append(']'); | ||
} | ||
return sb.toString(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = 1; | ||
result = ((result* 31)+((this.link == null)? 0 :this.link.hashCode())); | ||
result = ((result* 31)+((this.title == null)? 0 :this.title.hashCode())); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object other) { | ||
if (other == this) { | ||
return true; | ||
} | ||
if ((other instanceof Link) == false) { | ||
return false; | ||
} | ||
Link rhs = ((Link) other); | ||
return (((this.link == rhs.link)||((this.link!= null)&&this.link.equals(rhs.link)))&&((this.title == rhs.title)||((this.title!= null)&&this.title.equals(rhs.title)))); | ||
} | ||
|
||
} |
91 changes: 91 additions & 0 deletions
91
server/oslc-ui-model/src/main/java/org/eclipse/lyo/server/ui/model/Preview.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,91 @@ | ||
/* | ||
* Copyright (c) 2020 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License 1.0 | ||
* which is available at http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
package org.eclipse.lyo.server.ui.model; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@JsonPropertyOrder({ | ||
"properties" | ||
}) | ||
public class Preview { | ||
|
||
/** | ||
* | ||
* (Required) | ||
* | ||
*/ | ||
@JsonProperty("properties") | ||
private List<Property> properties = new ArrayList<Property>(); | ||
|
||
/** | ||
* | ||
* (Required) | ||
* | ||
*/ | ||
@JsonProperty("properties") | ||
public List<Property> getProperties() { | ||
return properties; | ||
} | ||
|
||
/** | ||
* | ||
* (Required) | ||
* | ||
*/ | ||
@JsonProperty("properties") | ||
public void setProperties(List<Property> properties) { | ||
this.properties = properties; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append(Preview.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); | ||
sb.append("properties"); | ||
sb.append('='); | ||
sb.append(((this.properties == null)?"<null>":this.properties)); | ||
sb.append(','); | ||
if (sb.charAt((sb.length()- 1)) == ',') { | ||
sb.setCharAt((sb.length()- 1), ']'); | ||
} else { | ||
sb.append(']'); | ||
} | ||
return sb.toString(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = 1; | ||
result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode())); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object other) { | ||
if (other == this) { | ||
return true; | ||
} | ||
if ((other instanceof Preview) == false) { | ||
return false; | ||
} | ||
Preview rhs = ((Preview) other); | ||
return ((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))); | ||
} | ||
|
||
} |
Oops, something went wrong.