Skip to content

Commit 17123d2

Browse files
authored
Create building.md
1 parent 2075a7c commit 17123d2

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

doc/building.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
## Building the SDK from source
2+
3+
To look at the samples or build **OSLC4Net** from source, follow these steps:
4+
5+
* install [ASP.NET MVC 4](http://www.asp.net/mvc/mvc4/)
6+
* git clone https://git01.codeplex.com/oslc4net master
7+
* open the solution OSLC4Net_SDK\OSLC4Net.Core.sln
8+
* build the solution
9+
10+
## Running the StockQuote provider
11+
12+
OSLC4Net.StockQuoteSample is a sample OSLC provider which implements one resource type, a StockQuote. This resource is not defined by an OSLC specification, it shows how OSLC4Net can be used to create an experimental OSLC provider.
13+
14+
### Project structure and prereqs
15+
16+
This project was originally created using the VS 2010 new project wizard to create an ASP.NET MVC 4 project. If you get the project from Git, it will be missing an important directory created by the wizard. Until we find the best way to package the files in this directory, you can do the following:
17+
18+
1. In Solution Explorer, right click the solution -> Add Project and then select ASP.NET MVC 4 Web Application. Give it any name you would like and complete the wizard.
19+
2. Go to Windows Explorer and go to the root directory of the new project. There will be a directory called "packages". Copy the directory and paste it into the OSLC4Net_SDK directory
20+
21+
The OSLC4Net.StockQuoteSamples has 3 interesting folders:
22+
23+
1. App_Start - See **WebApiConfig.cs** for added customization to register our RDF/XML formatter and to get the application context
24+
2. Models - This is where the resources are defined, especially **StockQuote.cs**
25+
3. Controllers - This is where the REST services are defined. **ServiceProviderController** sets up the Service Provider and serves it. **StockQuoteController.cs** contains the REST services for the main OSLC provider
26+
27+
### Running the sample
28+
29+
* Right click the OSLC4Net.StockQuoteSample project->Debug->Start new instance
30+
* You'll see a web page created - that is currently just a skeleton provided by ASP.NET. You can close it.
31+
* Try the following URLs in a tool like Poster or Advanced REST Client
32+
* Set the Accept header to application/rdf+xml
33+
* GET http://localhost:7077/api/stockquote - returns all StockQuotes
34+
* GET http://localhost:7077/api/stockquote?getShape=true - returns the StockQuote OSLC resource shape
35+
* GET http://localhost:7077/api/stockquote/nasdaq_goog - returns an individual StockQuote
36+
37+
## Running the DotNetRdfProvider tests
38+
39+
The tests for the RDF/XML provider in the DotNetRdfProviderTests project require no configuration and can be run as-is.
40+
41+
## Running the ChangeManagement tests
42+
43+
**OSLC4Net** does not currently have an OSLC provider implementation. That is high on the priority list of contributions to the project. The SDK itself does support being used in provider implementations.
44+
45+
The ChangeManagementTests can be run against the **Eclipse Lyo** OSLC4J ChangeManagement provider and serve as an example of a ChangeManagement consumer. They create, retrieve, update and delete OSLC ChangeManagement resources.
46+
47+
The tests assume the OSLC4J ChangeManagement sample is running on port 8080 on the same system where VisualStudio and the OSLC4Net.ChangeManagementTest project are located.
48+
49+
See the [instructions](http://wiki.eclipse.org/Lyo/BuildingOSLC4J) on the **Eclipse Lyo** site for information on building and running the ChangeManagement sample provider.
50+
51+
Once we have a sample provider with tests in OSLC4Net, this won't be necessary.
52+
53+
## Binary zip
54+
55+
A zip of the **OSLC4Net** library DLLs and their dependencies can be found here: http://oslc4net.codeplex.com/releases/view/100344</div>

0 commit comments

Comments
 (0)