Skip to content

Commit

Permalink
Add oslc-ui-model module (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
berezovskyi committed Jun 10, 2021
1 parent c9a326f commit 08aa6af
Show file tree
Hide file tree
Showing 15 changed files with 863 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Added

- [Domains] Add `org.eclipse.lyo.domains:ui-classes` module with POJOs needed by [lyo.oslc-ui](https://github.com/eclipse/lyo.oslc-ui).
- Store adds interface support for closing the Store cleanly and releasing underlying connections.
- SparqlStoreImpl can now be set up with a custom query executor

Expand Down Expand Up @@ -31,7 +32,7 @@

## [4.0.0] - 2020-12-16

See changelog summary under https://github.com/eclipse/lyo/releases/tag/v4.0.0
See changelog summary under https://github.com/eclipse/lyo/releases/tag/v4.0.0

### Added

Expand Down
22 changes: 22 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,28 @@
<version>${v.jersey}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.12.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.0</version>
</dependency>

<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.11</version>
</dependency>

<!--Maven Enforcer-->
<dependency>
<groupId>commons-codec</groupId>
Expand Down
2 changes: 1 addition & 1 deletion server/oauth-consumer-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<groupId>org.eclipse.lyo.server</groupId>
<artifactId>oauth-consumer-store</artifactId>
<name>Lyo :: OAuth :: Consumer Store</name>
<name>Lyo :: Server :: OAuth Consumer Store</name>
<description>File-based consumer store for Eclipse Lyo OAuth providers.</description>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion server/oauth-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<groupId>org.eclipse.lyo.server</groupId>
<artifactId>oauth-core</artifactId>
<packaging>jar</packaging>
<name>Lyo :: OAuth :: Core</name>
<name>Lyo :: Server :: OAuth Core</name>
<description>Core components of the Eclipse Lyo OAuth provider.</description>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion server/oauth-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<groupId>org.eclipse.lyo.server</groupId>
<artifactId>oauth-webapp</artifactId>
<packaging>war</packaging>
<name>Lyo :: OAuth :: Webapp</name>
<name>Lyo :: Server :: OAuth Webapp</name>
<description>A template webapp for implementing an OAuth provider.</description>

<properties>
Expand Down
50 changes: 50 additions & 0 deletions server/oslc-ui-model/pom.xml
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>
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))));
}

}
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)));
}

}
Loading

0 comments on commit 08aa6af

Please sign in to comment.