Skip to content

Svf2 #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Svf2 #52

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ Add the following dependency to your `pom.xml`:
<dependency>
<groupId>com.autodesk</groupId>
<artifactId>forge-java-sdk</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</dependency>
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Mon Apr 22 13:49:58 BRT 2019
forge-java-sdk-1.0.3-sources.jar>=
forge-java-sdk-1.0.3-jar-with-dependencies.jar>=
forge-java-sdk-1.0.3-tests.jar>=
forge-java-sdk-1.0.3.jar>=
forge-java-sdk-1.0.3-javadoc.jar>=
forge-java-sdk-1.0.3.pom>=
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Mon Apr 22 13:47:11 BRT 2019
https\://github.com/edneyego/forge-api-java-client/.lastUpdated=1555951566210
https\://repo.maven.apache.org/maven2/.lastUpdated=1555951566845
https\://github.com/edneyego/forge-api-java-client/mvn-repo/.lastUpdated=1555951631697
https\://github.com/edneyego/forge-api-java-client/mvn-repo/.error=
https\://github.com/edneyego/forge-api-java-client/.error=
https\://repo.maven.apache.org/maven2/.error=
326 changes: 326 additions & 0 deletions mvn-repo/com/autodesk/forge-java-sdk/1.0.3/forge-java-sdk-1.0.3.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,326 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.autodesk</groupId>
<artifactId>forge-java-sdk</artifactId>
<packaging>jar</packaging>
<name>forge-java-sdk</name>
<description>SDK of Autodesk Forge</description>
<url>https://github.com/edneyego/forge-api-java-client</url>
<version>1.0.3</version>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Cyrille Fauvel</name>
<email>[email protected]</email>
<organization>Autodesk</organization>
<url>https://github.com/cyrillef</url>
<roles>
<role>architect</role>
</roles>
</developer>
<developer>
<name>Jaime Rosales Duque</name>
<email>[email protected]</email>
<organization>Autodesk</organization>
<url>https://github.com/jaimerosales/</url>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Augusto Goncalves</name>
<email>[email protected]</email>
<organization>Autodesk</organization>
<url>https://github.com/augustogoncalves</url>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>xiaodongliang</name>
<email>[email protected]</email>
<organization>Autodesk</organization>
<url>https://github.com/xiaodongliang</url>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>
<scm>
<url>https://github.com/edneyego/forge-api-java-client</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<name>OSS Snapshots Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>OSS Staging Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.example.yourMain</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- this is used for inheritance merges -->
<phase>package</phase>
<!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<systemProperties>
<property>
<name>loggerPath</name>
<value>conf/log4j.properties</value>
</property>
</systemProperties>
<argLine>-Xms512m -Xmx1500m</argLine>
<parallel>methods</parallel>
<forkMode>pertest</forkMode>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- attach test jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration></configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>add_sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add_test_sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations-version}</version>
</dependency>
<!-- HTTP client: jersey-client -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
<version>${jersey-version}</version>
</dependency>
<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${jodatime-version}</version>
</dependency>
<!-- Base64 encoding that works in both JVM and Android -->
<dependency>
<groupId>com.brsanthu</groupId>
<artifactId>migbase64</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<!-- http://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160212</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<swagger-annotations-version>1.5.8</swagger-annotations-version>
<jersey-version>1.19.1</jersey-version>
<jackson-version>2.9.8</jackson-version>
<jodatime-version>2.9.4</jodatime-version>
<maven-plugin-version>1.4.0</maven-plugin-version>
<junit-version>4.12</junit-version>
</properties>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Mon Apr 22 13:47:10 BRT 2019
https\://github.com/edneyego/forge-api-java-client/.lastUpdated=1555951563688
https\://repo.maven.apache.org/maven2/.lastUpdated=1555951564804
https\://github.com/edneyego/forge-api-java-client/mvn-repo/.lastUpdated=1555951630460
https\://github.com/edneyego/forge-api-java-client/mvn-repo/.error=
https\://github.com/edneyego/forge-api-java-client/.error=
https\://repo.maven.apache.org/maven2/.error=
12 changes: 12 additions & 0 deletions mvn-repo/com/autodesk/forge-java-sdk/maven-metadata-local.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.autodesk</groupId>
<artifactId>forge-java-sdk</artifactId>
<versioning>
<release>1.0.3</release>
<versions>
<version>1.0.3</version>
</versions>
<lastUpdated>20190422164958</lastUpdated>
</versioning>
</metadata>
9 changes: 6 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
<name>forge-java-sdk</name>
<description>SDK of Autodesk Forge</description>
<url>https://github.com/Autodesk-Forge/forge-api-java-client</url>
<version>1.0.2</version>
<version>1.0.4</version>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>
@@ -197,7 +197,7 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
@@ -210,10 +210,13 @@
</goals>
</execution>
</executions>
</plugin>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<source>8</source>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
69 changes: 69 additions & 0 deletions src/main/java/com/autodesk/client/api/DerivativesApi.java
Original file line number Diff line number Diff line change
@@ -172,6 +172,75 @@ public ApiResponse<Void> getDerivativeManifest(String urn, String derivativeUrn,
localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, null);
}

/**
*
* Downloads a selected derivative. To download the file, you need to specify
* the file’s URN, which you retrieve by calling the [GET
* {urn}/manifest](https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-manifest-GET)
* endpoint. Note that the Model Derivative API uses 2 types of URNs. The
* **design URN** is generated when you upload the source design file to Forge,
* and is used when calling most of the Model Derivative endpoints. A
* **derivative URN** is generated for each translated output file format, and
* is used for downloading the output design files. You can set the range of
* bytes that are returned when downloading the derivative, using the range
* header.
*
* @param urn The Base64 (URL Safe) encoded design URN (required)
* @param derivativeUrn The URL-encoded URN of the derivatives. The URN is
* retrieved from the GET :urn/manifest endpoint.
* (required)
* @param range This is the standard RFC 2616 range request header. It
* only supports one range specifier per request: 1.
* Range:bytes&#x3D;0-63 (returns the first 64 bytes) 2.
* Range:bytes&#x3D;64-127 (returns the second set of 64
* bytes) 3. Range:bytes&#x3D;1022- (returns all the bytes
* from offset 1022 to the end) 4. If the range header is
* not specified, the whole content is returned. (optional)
* @throws ApiException if fails to make API call
*/
public ApiResponse<File> downloadDerivative(String urn, String derivativeUrn, Integer range,
Authentication oauth2, Credentials credentials) throws ApiException, Exception {

Object localVarPostBody = null;

// verify the required parameter 'urn' is set
if (urn == null) {
throw new ApiException(400, "Missing the required parameter 'urn' when calling getDerivativeManifest");
}

// verify the required parameter 'derivativeUrn' is set
if (derivativeUrn == null) {
throw new ApiException(400,
"Missing the required parameter 'derivativeUrn' when calling getDerivativeManifest");
}

// create path and map variables
String localVarPath = "/modelderivative/v2/designdata/{urn}/manifest/{derivativeUrn}"
.replaceAll("\\{format\\}", "json")
.replaceAll("\\{" + "urn" + "\\}", apiClient.escapeString(urn.toString()))
.replaceAll("\\{" + "derivativeUrn" + "\\}", apiClient.escapeString(derivativeUrn.toString()));

// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

if (range != null)
localVarHeaderParams.put("Range", apiClient.parameterToString(range));

final String[] localVarAccepts = { "application/octet-stream" };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

final String[] localVarContentTypes = { "application/json" };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

GenericType<File> localVarReturnType = new GenericType<File>() {
};

return apiClient.invokeAPI(oauth2, credentials, localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarReturnType);
}

/**
*
* Returns an up-to-date list of Forge-supported translations, that you can use
2 changes: 2 additions & 0 deletions src/main/java/com/autodesk/client/model/JobPayloadItem.java
Original file line number Diff line number Diff line change
@@ -54,6 +54,8 @@ public class JobPayloadItem {
public enum TypeEnum {
SVF("svf"),

SVF2("svf2"),

RVT("rvt"),

IFC("ifc"),
2 changes: 2 additions & 0 deletions src/main/java/com/autodesk/client/model/ManifestChildren.java
Original file line number Diff line number Diff line change
@@ -85,6 +85,8 @@ public enum RoleEnum {

IFC("ifc"),

OBJ("obj"),

//to solved the issue GetManifest is returning an unhandled role enum
PROPERTYDB("Autodesk.CloudPlatform.PropertyDatabase");

Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ public enum OutputTypeEnum {
OBJ("obj"),

SVF("svf"),
SVF2("svf2"),

THUMBNAIL("thumbnail");