diff --git a/README.md b/README.md index 529751a..e4184d1 100644 --- a/README.md +++ b/README.md @@ -124,9 +124,12 @@ $ lein jar $ lein npm install # this is only required on the first run $ lein node ``` - The output NPM package will be generated at `output/node`. +### Java Bindings + +The programming guide the Java Bindings can be found [here](doc/java.md). +Javadoc for the bindings can be consulted [here](doc/java/apidocs/index.html). ### API Modeling Framework Clojurescript/Web library diff --git a/doc/java.md b/doc/java.md new file mode 100644 index 0000000..66cac49 --- /dev/null +++ b/doc/java.md @@ -0,0 +1,136 @@ +# AMF Java Programming guide + +Java wrapping code for the AMF library can be found in the `org.raml.amf` namespace. +This package provides a Java friendly interface on top of the native Clojure code of the library. + +## Compiling + +At this moment we don't provide any artifacts in any repository to use AMF or these Java bindings, so they must be built manually with the help of Leiningen. +In order to build the library, you fist need to build an 'ubejar' with AMF. To accomplish this, from the main AMF project directory run the following instruction: + +``` bash +$ lein uberjar +``` +After Leiningen has finished you should have a standalone jar for AMF and all its dependencies in the `target/api-modeling-framework-0.1.2-SNAPSHOT-standalone.jar` location. Version might be different from the one at the moment of writing this documentation. + +Once the jar for AMF has been generated, we can generate the Java bindings jar. For that change to the `java` directory in the AMF project and use maven: + +``` bash +mvn package +``` + +After Maven has finished you should have an additional jar in the `target/amf-java-0.1.2-SNAPSHOT.jar` location with the Java bindings. Add both jars into your project to use the AMF Java bindings. + +## Parsing + +Parser can be found in the `org.raml.amf.parsers` package of the project. They can be build using the factories in `org.raml.amf.AMF` + +``` java +DocumentModel model = AMF.RAMLParser().parseFile(new URL("http://test.com/worldmusic/api.raml")); +``` + +Parsers are include for RAML, OpenAPI and the JSON-LD serialisation of the AMF model. + +Parsers can accept options, including a hash-map of URLs to local directories that will be used to resolve references in the parsed documents. + +For instance, in the next snippet all remote references to the URLs prefixed by `http://test.com/worldmusic` will be resolved looking into the local directory `/Users/antoniogarrote/world-music-api`. + +``` java +HashMap cacheDirs = new HashMap<>(); +cacheDirs.put("http://test.com/worldmusic","/Users/antoniogarrote/vocabs/world-music-api"); +ParsingOptions options = new ParsingOptions().setCacheDirs(cacheDirs); + +DocumentDocument model = (Document) AMF.RAMLParser().parseFile(new URL("http://test.com/worldmusic/api.raml"), options); +``` +The original parsed text can be retrieved using the `rawText` method. + +## Navigating the Document Model +Parsing will return an instance of a subclass of `DocumentModel` Depending on what is the parsed file, a `Document` a `Fragment` or a `Module` instance will be returned. + +No matter what is the actual Document Model class, the returned model will also include references to all linked references in the model. + +These references can be listed using the `references` method and new instances of `DocumentModel` can be build for these references using the `modelForReference` method: + +``` java +for (URL ref : model.references()) { + DocumentModel refModel = model.modelForReference(ref); + System.out.println("Found a reference model: " + refModel); +} +``` + +## Applying resolution + +To run the resolution algorithm and combine all the documents from the Document Model into a single Domain Model description, the method `resolve` can be invoked. + +``` java +DocumentModel resolvedModel = model.resolve(); +``` + +## Accessing the Domain Model + +The parsed Domain Model can be retrieved from the Document Model instance using the appropriate accessor. + +Fragments returns the encoded Domain Model element using the `encodes` method from the `org.raml.amf.core.document.EncodesDomainModel` interface. +Modules returns the list of declared Domain Model elements using the `declares` method from the `org.raml.amf.core.document.DeclaresDomainModel` interface. +Documents can use both methods to retrieve the top level encoded element and the list of declared elements in the root element. + +``` java +if (model instanceof EncodesDomainModel) { + System.out.println(model.encodes()); +} + +if (targetModel instanceof DeclaresDomainModel) { + List declarations = model.declares(); + for(DomainModel decl : declarations) { + System.out.println(decl); + } +} +``` + +## Navigating and mutating the Domain Model + +The Domain Model includes Java Bean classes for all elements in the AMF Domain Model. +This getters and setters can be used to navigate and mutate the model. Please, refer to the [documentation](./java/apidocs/index.html) for more details. + +``` java +APIDocumentation api = (APIDocumentation) model.encodes(); + +for (EndPoint endpoint : api.getEndpoints()) { + endpoint.setName("Modified " + endpoint.getName()); +} +``` + +## Generating + +AMF includes generators capable of serialising the AMF model back into one of the supported syntaxes. The method `generateString` can be used to generate a String representation and the method `generateFile` can be used to dump the serialised model directly into a file. +Factory methods for each generator can be found in the `org.raml.amf.AMF` class. + + +``` java +// Generating RAML +// Generate can accept just the model +String generated = AMF.RAMLGenerator().generateString(targetModel); +System.out.println(generated); + +// Generating OpenAPI +// It can also accept a destination File/URL for the model +generated = AMF.OpenAPIGenerator().generateString( + new File("world_music.json"), + targetModel +); +System.out.println(generated); + +// Generating JSON-LD +// Finally it can also accept a set of generation options +generated = AMF.JSONLDGenerator().generateString( + new File("world_music.jsonld"), + targetModel, + new GenerationOptions() + .setFullgraph(true) + .setSourceMapGeneration(true)); +System.out.println(generated); +``` + +Two options are available when generating JSON-LD documents. +`setFullGraph` will nest the JSON-LD graphs for the referenced documents in the model to be serialised, otherwise only URIs will be generated. +`setSourceMapGeneration` enables or disables the generation of source maps JSON-LD information in the output. diff --git a/doc/java/apidocs/allclasses-frame.html b/doc/java/apidocs/allclasses-frame.html new file mode 100644 index 0000000..921fb94 --- /dev/null +++ b/doc/java/apidocs/allclasses-frame.html @@ -0,0 +1,58 @@ + + + + + + +All Classes (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

All Classes

+ + + diff --git a/doc/java/apidocs/allclasses-noframe.html b/doc/java/apidocs/allclasses-noframe.html new file mode 100644 index 0000000..007a2c1 --- /dev/null +++ b/doc/java/apidocs/allclasses-noframe.html @@ -0,0 +1,58 @@ + + + + + + +All Classes (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

All Classes

+ + + diff --git a/doc/java/apidocs/constant-values.html b/doc/java/apidocs/constant-values.html new file mode 100644 index 0000000..f0c0393 --- /dev/null +++ b/doc/java/apidocs/constant-values.html @@ -0,0 +1,183 @@ + + + + + + +Constant Field Values (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Constant Field Values

+

Contents

+ +
+
+ + +

org.raml.*

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/deprecated-list.html b/doc/java/apidocs/deprecated-list.html new file mode 100644 index 0000000..b4675dd --- /dev/null +++ b/doc/java/apidocs/deprecated-list.html @@ -0,0 +1,126 @@ + + + + + + +Deprecated List (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
+ + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/help-doc.html b/doc/java/apidocs/help-doc.html new file mode 100644 index 0000000..4256257 --- /dev/null +++ b/doc/java/apidocs/help-doc.html @@ -0,0 +1,231 @@ + + + + + + +API Help (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + +
+ + + + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Overview

    +

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

    +
  • +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/index-all.html b/doc/java/apidocs/index-all.html new file mode 100644 index 0000000..3bb0702 --- /dev/null +++ b/doc/java/apidocs/index-all.html @@ -0,0 +1,920 @@ + + + + + + +Index (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I J K L M O P R S T U V W  + + +

A

+
+
AMF - Class in org.raml.amf
+
+
Facade class providing access to the main IO facilities in the library
+
+
AMF() - Constructor for class org.raml.amf.AMF
+
 
+
AMFJSONLDGenerator - Class in org.raml.amf.generators
+
+
Created by antoniogarrote on 04/05/2017.
+
+
AMFJSONLDGenerator() - Constructor for class org.raml.amf.generators.AMFJSONLDGenerator
+
 
+
AMFJSONLDParser - Class in org.raml.amf.parsers
+
+
Wrapper class for the AMF OWL model parser, processes AMF model specification JSON-LD documents and generate the DocumentModel out of them
+
+
AMFJSONLDParser() - Constructor for class org.raml.amf.parsers.AMFJSONLDParser
+
 
+
API_MODELING_FRAMEWORK_CORE - Static variable in class org.raml.amf.utils.Clojure
+
 
+
API_MODELING_FRAMEWORK_MODEL_DOCUMENT - Static variable in class org.raml.amf.utils.Clojure
+
 
+
API_MODELING_FRAMEWORK_MODEL_DOMAIN - Static variable in class org.raml.amf.utils.Clojure
+
 
+
APIDocumentation - Class in org.raml.amf.core.domain
+
+
Main EntryPoint of the description of HTTP RPC API
+
+
APIDocumentation(ParsedAPIDocumentation) - Constructor for class org.raml.amf.core.domain.APIDocumentation
+
 
+
APIDocumentation(String) - Constructor for class org.raml.amf.core.domain.APIDocumentation
+
+
Build a new empty API Documentation for the provided URI
+
+
+ + + +

B

+
+
BaseGenerator - Class in org.raml.amf.generators
+
+
Basic interface for all AMF generators.
+
+
BaseGenerator() - Constructor for class org.raml.amf.generators.BaseGenerator
+
 
+
BaseParser - Class in org.raml.amf.parsers
+
+
Basic interface for all AMF parsers.
+
+
BaseParser() - Constructor for class org.raml.amf.parsers.BaseParser
+
 
+
BasicParsingAndNavigation - Class in org.raml.amf.examples
+
+
Created by antoniogarrote on 04/05/2017.
+
+
BasicParsingAndNavigation() - Constructor for class org.raml.amf.examples.BasicParsingAndNavigation
+
 
+
build() - Method in class org.raml.amf.generators.GenerationOptions
+
 
+
build() - Method in class org.raml.amf.parsers.ParsingOptions
+
 
+
+ + + +

C

+
+
CHESHIRE_CORE - Static variable in class org.raml.amf.utils.Clojure
+
 
+
Clojure - Class in org.raml.amf.utils
+
+
Clojure interop utilties.
+
+
Clojure() - Constructor for class org.raml.amf.utils.Clojure
+
 
+
CLOJURE_CORE - Static variable in class org.raml.amf.utils.Clojure
+
 
+
clojureModel() - Method in class org.raml.amf.core.document.DocumentModel
+
+
Returns the native Clojure data structure for the model
+
+
clojureModel() - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
clojureModel() - Method in class org.raml.amf.core.Model
+
+
Returns the raw Clojure data structure for this instance data
+
+
+ + + +

D

+
+
declares() - Method in interface org.raml.amf.core.document.DeclaresDomainModel
+
+
Declared DomainElements that can be re-used from other documents.
+
+
declares() - Method in class org.raml.amf.core.document.Document
+
+
List of domain elements declared in the document to be referenced in the encoded element.
+
+
declares() - Method in class org.raml.amf.core.document.Module
+
+
Declared DomainElements that can be re-used from other documents.
+
+
DeclaresDomainModel - Interface in org.raml.amf.core.document
+
+
Created by antoniogarrote on 04/05/2017.
+
+
Document - Class in org.raml.amf.core.document
+
+
AMF Documents encode the main element of a description in a particular Domain Model + For example, in RAML/HTTP, the main domain element is an APIDescription.
+
+
Document(Object) - Constructor for class org.raml.amf.core.document.Document
+
 
+
DocumentModel - Class in org.raml.amf.core.document
+
+
AMF Document model that can be used to work with the graph of linked documents generated by the parser.
+
+
DomainModel - Class in org.raml.amf.core.domain
+
+
Created by antoniogarrote on 04/05/2017.
+
+
DomainModel(Object) - Constructor for class org.raml.amf.core.domain.DomainModel
+
 
+
+ + + +

E

+
+
encodes() - Method in class org.raml.amf.core.document.Document
+
+
Encoded domain element.
+
+
encodes() - Method in interface org.raml.amf.core.document.EncodesDomainModel
+
+
Encoded domain element described in the document element.
+
+
encodes() - Method in class org.raml.amf.core.document.Fragment
+
+
Encoded Domain element that can referenced from other documents in the DocumentModel
+
+
EncodesDomainModel - Interface in org.raml.amf.core.document
+
+
Created by antoniogarrote on 04/05/2017.
+
+
EndPoint - Class in org.raml.amf.core.domain
+
+
EndPoints contains information about a HTTP remote location where a number of API operations have been bound
+
+
EndPoint(ParsedEndPoint) - Constructor for class org.raml.amf.core.domain.EndPoint
+
 
+
EndPoint(String) - Constructor for class org.raml.amf.core.domain.EndPoint
+
+
Builds a new EndPoint for the provided URI
+
+
+ + + +

F

+
+
findDomainElement(String) - Method in class org.raml.amf.core.document.DocumentModel
+
 
+
Fragment - Class in org.raml.amf.core.document
+
+
AMF Fragments encode a single DomainElement that can be referenced and re-used in other documents.
+
+
Fragment(Object) - Constructor for class org.raml.amf.core.document.Fragment
+
 
+
fromRawModel(Object) - Static method in class org.raml.amf.core.document.DocumentModel
+
+
Factory method building the right wrapper Java DocumentModel subclass for the provided Clojure model data structure
+
+
fromRawModel(Object) - Static method in class org.raml.amf.core.domain.DomainModel
+
 
+
+ + + +

G

+
+
generateFile(File, DocumentModel, GenerationOptions) - Method in class org.raml.amf.generators.BaseGenerator
+
+
Serialises the model and stores it in the provided file path and options
+
+
generateFile(File, DocumentModel) - Method in class org.raml.amf.generators.BaseGenerator
+
+
Serialises the model and stores it in the provided file path.
+
+
generateString(File, DocumentModel, GenerationOptions) - Method in class org.raml.amf.generators.BaseGenerator
+
+
Serialises the model and uses the provided file path as the default model location, applying the provided options
+
+
generateString(File, DocumentModel) - Method in class org.raml.amf.generators.BaseGenerator
+
+
Serialises the model and stores it in the using the privded file path as the model location
+
+
generateString(DocumentModel) - Method in class org.raml.amf.generators.BaseGenerator
+
+
Serialises the model using the default location stored in the model
+
+
generateStringInternal(String, DocumentModel, GenerationOptions) - Method in class org.raml.amf.generators.BaseGenerator
+
 
+
GenerationException - Class in org.raml.amf.generators
+
+
Created by antoniogarrote on 04/05/2017.
+
+
GenerationException(Exception) - Constructor for class org.raml.amf.generators.GenerationException
+
 
+
GenerationOptions - Class in org.raml.amf.generators
+
+
Created by antoniogarrote on 04/05/2017.
+
+
GenerationOptions() - Constructor for class org.raml.amf.generators.GenerationOptions
+
 
+
generatorConstructor() - Method in class org.raml.amf.generators.AMFJSONLDGenerator
+
 
+
generatorConstructor() - Method in class org.raml.amf.generators.BaseGenerator
+
 
+
generatorConstructor() - Method in class org.raml.amf.generators.OpenAPIGenerator
+
 
+
generatorConstructor() - Method in class org.raml.amf.generators.RAMLGenerator
+
 
+
GenericOperationUnit - Class in org.raml.amf.core.domain
+
+
Base class for the Request and Response of an API
+
+
GenericOperationUnit(Object) - Constructor for class org.raml.amf.core.domain.GenericOperationUnit
+
 
+
GenericParameter - Class in org.raml.amf.core.domain
+
+
Parameters include all kind of input or output information that is requested or returned by an API Operation that + are not encoded in the Request or Response payloads.
+
+
GenericParameter(ParsedParameter) - Constructor for class org.raml.amf.core.domain.GenericParameter
+
 
+
GenericTag - Class in org.raml.amf.core.domain
+
+
Tag included in a SourceMap + Tags are tuples with an identifier, describing the kind of information in the mapping and an arbitrary value.
+
+
GenericTag(Object) - Constructor for class org.raml.amf.core.domain.GenericTag
+
 
+
GenericTag(String, Object) - Constructor for class org.raml.amf.core.domain.GenericTag
+
 
+
GenericTag(String, String, Object) - Constructor for class org.raml.amf.core.domain.GenericTag
+
 
+
getAbstract() - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
getAccepts() - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
getAccepts() - Method in class org.raml.amf.core.domain.Operation
+
+
HTTP media-types accepted by the operation, overrides the default in APIDocumentation
+
+
getBasePath() - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
getContentTypes() - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
getContentTypes() - Method in class org.raml.amf.core.domain.Operation
+
+
HTTP media-types returned by the operation, overrides the default in APIDocumentation
+
+
getDescription() - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
getEndpoints() - Method in class org.raml.amf.core.domain.APIDocumentation
+
+
List of EndPoints declared in this API
+
+
getExtends() - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
getHeaders() - Method in class org.raml.amf.core.domain.GenericOperationUnit
+
+
List of HTTP headers in this unit
+
+
getHost() - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
getId() - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
getKw(Object, String) - Static method in class org.raml.amf.utils.Clojure
+
 
+
getMediaType() - Method in class org.raml.amf.core.domain.Payload
+
 
+
getMethod() - Method in class org.raml.amf.core.domain.Operation
+
+
HTTP method that must be used to invoke the Operation
+
+
getModel() - Method in exception org.raml.amf.core.exceptions.ResolutionException
+
 
+
getName() - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
getParameterKind() - Method in class org.raml.amf.core.domain.Parameter
+
 
+
getParameters() - Method in class org.raml.amf.core.domain.Request
+
 
+
getPath() - Method in class org.raml.amf.core.domain.EndPoint
+
+
Path for the URL where the operations of the EndPoint are bound
+
+
getPayloads() - Method in class org.raml.amf.core.domain.GenericOperationUnit
+
+
List of Payloads in the unit
+
+
getRequest() - Method in class org.raml.amf.core.domain.Operation
+
+
Request information for the operation
+
+
getRequired() - Method in class org.raml.amf.core.domain.GenericParameter
+
 
+
getResponses() - Method in class org.raml.amf.core.domain.Operation
+
+
List of responses for different HTTP status codes supported by this operation
+
+
getSchema() - Method in class org.raml.amf.core.domain.GenericParameter
+
 
+
getSchema() - Method in class org.raml.amf.core.domain.Payload
+
+
Schema information for the payload
+
+
getScheme() - Method in class org.raml.amf.core.domain.APIDocumentation
+
+
URI Scheme for the paths in the API
+
+
getScheme() - Method in class org.raml.amf.core.domain.Operation
+
+
HTTP scheme that must be used to invoke the operation, overrides the default in APIDocumentation
+
+
getShape() - Method in class org.raml.amf.core.domain.Type
+
+
JSON-LD string containing a SHACL shape that can be used to validate payloads for this operation unit
+
+
getSource() - Method in class org.raml.amf.core.domain.SourceMap
+
 
+
getSourceMaps() - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
getStatusCode() - Method in class org.raml.amf.core.domain.Response
+
+
Status code for the response
+
+
getSupportedOperations() - Method in class org.raml.amf.core.domain.EndPoint
+
+
List of API Operations bound to this EndPoint
+
+
getTagId() - Method in class org.raml.amf.core.domain.GenericTag
+
 
+
getTags() - Method in class org.raml.amf.core.domain.SourceMap
+
 
+
getTermsOfService() - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
getUknownReference() - Method in exception org.raml.amf.core.exceptions.UnknownModelReferenceException
+
 
+
getValue() - Method in class org.raml.amf.core.domain.GenericTag
+
 
+
+ + + +

H

+
+
Header - Class in org.raml.amf.core.domain
+
+
Created by antoniogarrote on 04/05/2017.
+
+
Header(ParsedParameter) - Constructor for class org.raml.amf.core.domain.Header
+
 
+
Header(String) - Constructor for class org.raml.amf.core.domain.Header
+
 
+
+ + + +

I

+
+
InvalidModelException - Exception in org.raml.amf.core.exceptions
+
+
Exception related to a native clojure model that is not matching the expected value
+
+
InvalidModelException(Exception) - Constructor for exception org.raml.amf.core.exceptions.InvalidModelException
+
 
+
isResolved() - Method in class org.raml.amf.core.document.DocumentModel
+
 
+
+ + + +

J

+
+
JSONLDGenerator() - Static method in class org.raml.amf.AMF
+
+
Builds a AMF to JSON-LD generator
+
+
JSONLDParser() - Static method in class org.raml.amf.AMF
+
+
Builds a AMF encoded JSON-LD to AMF parser
+
+
+ + + +

K

+
+
kw(String) - Static method in class org.raml.amf.utils.Clojure
+
 
+
+ + + +

L

+
+
list(List) - Static method in class org.raml.amf.utils.Clojure
+
 
+
location() - Method in class org.raml.amf.core.document.DocumentModel
+
+
Returns the file location for the document that has been parsed to generate this model
+
+
+ + + +

M

+
+
main(String[]) - Static method in class org.raml.amf.examples.BasicParsingAndNavigation
+
 
+
map() - Static method in class org.raml.amf.utils.Clojure
+
 
+
Model - Class in org.raml.amf.core
+
+
Base class for all AMF parsed models, provides methods to inspect and manipulate the model
+
+
Model(Object) - Constructor for class org.raml.amf.core.Model
+
 
+
modelForReference(URL) - Method in class org.raml.amf.core.document.DocumentModel
+
+
Builds a new Model object for the referenced Document
+
+
Module - Class in org.raml.amf.core.document
+
+
AMF Modules contains collections of DomainElements that can be re-used and referenced from other documents in the + Documentmodel.
+
+
Module(Object) - Constructor for class org.raml.amf.core.document.Module
+
 
+
+ + + +

O

+
+
OpenAPIGenerator() - Static method in class org.raml.amf.AMF
+
+
Builds a AMF to OpenAPI generator
+
+
OpenAPIGenerator - Class in org.raml.amf.generators
+
+
Created by antoniogarrote on 04/05/2017.
+
+
OpenAPIGenerator() - Constructor for class org.raml.amf.generators.OpenAPIGenerator
+
 
+
OpenAPIParser() - Static method in class org.raml.amf.AMF
+
+
Builds an OpenAPI to AMF parser
+
+
OpenAPIParser - Class in org.raml.amf.parsers
+
+
Wrapper class for the AMF OpenAPI parser, processes OpenAPI specification documents and generate the DocumentModel out of them
+
+
OpenAPIParser() - Constructor for class org.raml.amf.parsers.OpenAPIParser
+
 
+
Operation - Class in org.raml.amf.core.domain
+
+
A unit of business logic exposed by the API.
+
+
Operation(ParsedOperation) - Constructor for class org.raml.amf.core.domain.Operation
+
 
+
Operation(String) - Constructor for class org.raml.amf.core.domain.Operation
+
+
Builds a new empty Operation with the provide URI
+
+
org.raml.amf - package org.raml.amf
+
 
+
org.raml.amf.core - package org.raml.amf.core
+
 
+
org.raml.amf.core.document - package org.raml.amf.core.document
+
 
+
org.raml.amf.core.domain - package org.raml.amf.core.domain
+
 
+
org.raml.amf.core.exceptions - package org.raml.amf.core.exceptions
+
 
+
org.raml.amf.examples - package org.raml.amf.examples
+
 
+
org.raml.amf.generators - package org.raml.amf.generators
+
 
+
org.raml.amf.parsers - package org.raml.amf.parsers
+
 
+
org.raml.amf.utils - package org.raml.amf.utils
+
 
+
+ + + +

P

+
+
Parameter - Class in org.raml.amf.core.domain
+
+
Created by antoniogarrote on 04/05/2017.
+
+
Parameter(ParsedParameter) - Constructor for class org.raml.amf.core.domain.Parameter
+
 
+
Parameter(String, String) - Constructor for class org.raml.amf.core.domain.Parameter
+
 
+
parseFile(URL) - Method in class org.raml.amf.parsers.BaseParser
+
+
Generates a model parsing the file referenced by the provided URL.
+
+
parseFile(URL, ParsingOptions) - Method in class org.raml.amf.parsers.BaseParser
+
+
Generates a model parsing the file referenced by the provided URL and parsing options.
+
+
parseFile(String, URL, ParsingOptions) - Method in class org.raml.amf.parsers.BaseParser
+
+
Generates a model parsing the provided textual input syntax and parsing options.
+
+
parserConstructor() - Method in class org.raml.amf.parsers.AMFJSONLDParser
+
 
+
parserConstructor() - Method in class org.raml.amf.parsers.BaseParser
+
 
+
parserConstructor() - Method in class org.raml.amf.parsers.OpenAPIParser
+
 
+
parserConstructor() - Method in class org.raml.amf.parsers.RAMLParser
+
 
+
parseString(String, URL) - Method in class org.raml.amf.parsers.BaseParser
+
+
Generates a model parsing the provided textual input syntax.
+
+
ParsingException - Exception in org.raml.amf.parsers
+
+
Exception produced while parsing an input syntax for the AMF parser
+
+
ParsingException(Exception) - Constructor for exception org.raml.amf.parsers.ParsingException
+
 
+
ParsingOptions - Class in org.raml.amf.parsers
+
+
Parsing options for parsing
+
+
ParsingOptions() - Constructor for class org.raml.amf.parsers.ParsingOptions
+
 
+
Payload - Class in org.raml.amf.core.domain
+
+
Schema information for a Payload associated to a particular media-type
+
+
Payload(ParsedPayload) - Constructor for class org.raml.amf.core.domain.Payload
+
 
+
Payload(String) - Constructor for class org.raml.amf.core.domain.Payload
+
 
+
+ + + +

R

+
+
RAMLGenerator() - Static method in class org.raml.amf.AMF
+
+
Builds a AMF to RAML generator
+
+
RAMLGenerator - Class in org.raml.amf.generators
+
+
Created by antoniogarrote on 04/05/2017.
+
+
RAMLGenerator() - Constructor for class org.raml.amf.generators.RAMLGenerator
+
 
+
RAMLParser() - Static method in class org.raml.amf.AMF
+
+
Builds a RAML to AMF parser
+
+
RAMLParser - Class in org.raml.amf.parsers
+
+
Wrapper class for the AMF RAML parser, processes RAML specification documents and generate the DocumentModel out of them
+
+
RAMLParser() - Constructor for class org.raml.amf.parsers.RAMLParser
+
 
+
rawModel - Variable in class org.raml.amf.core.Model
+
 
+
rawText() - Method in class org.raml.amf.core.document.DocumentModel
+
+
Returns the raw text of the parsed file for the file parsed to generate the model
+
+
references() - Method in class org.raml.amf.core.document.DocumentModel
+
+
Returns the list document URIs referenced from the document that has been parsed to generate this model
+
+
Request - Class in org.raml.amf.core.domain
+
+
Created by antoniogarrote on 04/05/2017.
+
+
Request(ParsedRequest) - Constructor for class org.raml.amf.core.domain.Request
+
 
+
Request(String) - Constructor for class org.raml.amf.core.domain.Request
+
 
+
REQUIRE - Static variable in class org.raml.amf.utils.Clojure
+
 
+
require(String) - Static method in class org.raml.amf.utils.Clojure
+
 
+
ResolutionException - Exception in org.raml.amf.core.exceptions
+
+
Created by antoniogarrote on 04/05/2017.
+
+
ResolutionException(DocumentModel, Exception) - Constructor for exception org.raml.amf.core.exceptions.ResolutionException
+
 
+
resolve() - Method in class org.raml.amf.core.document.DocumentModel
+
+
Applies the resolution algorithm and returns a new Model contained the resolved DomainModel
+
+
Response - Class in org.raml.amf.core.domain
+
+
Information about the response returned by an operation, associated to a particular status
+
+
Response(ParsedResponse) - Constructor for class org.raml.amf.core.domain.Response
+
 
+
Response(String) - Constructor for class org.raml.amf.core.domain.Response
+
 
+
+ + + +

S

+
+
setAbstract(Boolean) - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
setAccepts(List<String>) - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
setAccepts(List<String>) - Method in class org.raml.amf.core.domain.Operation
+
 
+
setBasePath(String) - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
setCacheDirs(HashMap<String, String>) - Method in class org.raml.amf.parsers.ParsingOptions
+
+
Sets a mapping from URL prefixes for references to local directories to resolve references in the syntax
+
+
setContentTypes(List<String>) - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
setContentTypes(List<String>) - Method in class org.raml.amf.core.domain.Operation
+
 
+
setDescription(String) - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
setEndPoints(List<EndPoint>) - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
setExtends(List<DomainModel>) - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
setFullgraph(Boolean) - Method in class org.raml.amf.generators.GenerationOptions
+
+
When serialising into JSON-LD, if set to true, all the JSON-LD RDF graph for referenced documents will be nested inside + the JSON-LD document of the model.
+
+
setHeaders(List<Header>) - Method in class org.raml.amf.core.domain.GenericOperationUnit
+
 
+
setHost(String) - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
setId(String) - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
setKw(Object, String, Object) - Static method in class org.raml.amf.utils.Clojure
+
 
+
setMediaType(String) - Method in class org.raml.amf.core.domain.Payload
+
 
+
setMethod(String) - Method in class org.raml.amf.core.domain.Operation
+
 
+
setName(String) - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
setParameterKind(String) - Method in class org.raml.amf.core.domain.Parameter
+
 
+
setParameterKindInternal(String) - Method in class org.raml.amf.core.domain.GenericParameter
+
 
+
setParameters(List<Parameter>) - Method in class org.raml.amf.core.domain.Request
+
 
+
setPath(String) - Method in class org.raml.amf.core.domain.EndPoint
+
 
+
setPayloads(List<Payload>) - Method in class org.raml.amf.core.domain.GenericOperationUnit
+
 
+
setRequest(Request) - Method in class org.raml.amf.core.domain.Operation
+
 
+
setRequired(Boolean) - Method in class org.raml.amf.core.domain.GenericParameter
+
 
+
setResolved(boolean) - Method in class org.raml.amf.core.document.DocumentModel
+
 
+
setResponses(List<Operation>) - Method in class org.raml.amf.core.domain.Operation
+
 
+
setSchema(Type) - Method in class org.raml.amf.core.domain.GenericParameter
+
 
+
setSchema(Type) - Method in class org.raml.amf.core.domain.Payload
+
 
+
setScheme(String) - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
setScheme(String) - Method in class org.raml.amf.core.domain.Operation
+
 
+
setShape(String) - Method in class org.raml.amf.core.domain.Type
+
+
Sets the SHACL shape for the payloads of this operation unit
+
+
setSource(String) - Method in class org.raml.amf.core.domain.SourceMap
+
 
+
setSourceMapGeneration(Boolean) - Method in class org.raml.amf.generators.GenerationOptions
+
+
When serialising to JSON-LD, enables or disables the generation of source-maps
+
+
setSourceMaps(List<SourceMap>) - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
setStatusCode(String) - Method in class org.raml.amf.core.domain.Response
+
 
+
setSupportedOperations(List<Operation>) - Method in class org.raml.amf.core.domain.EndPoint
+
 
+
setTagId(String) - Method in class org.raml.amf.core.domain.GenericTag
+
 
+
setTags(List<GenericTag>) - Method in class org.raml.amf.core.domain.SourceMap
+
 
+
setTermsOfService(String) - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
setValue(Object) - Method in class org.raml.amf.core.domain.GenericTag
+
 
+
SourceMap - Class in org.raml.amf.core.domain
+
+
Created by antoniogarrote on 04/05/2017.
+
+
SourceMap(DocumentSourceMap) - Constructor for class org.raml.amf.core.domain.SourceMap
+
 
+
stringToURL(String) - Method in class org.raml.amf.core.document.DocumentModel
+
 
+
+ + + +

T

+
+
toJavaList(List) - Static method in class org.raml.amf.utils.Clojure
+
 
+
toString() - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
Type - Class in org.raml.amf.core.domain
+
+
Data Shape that describing a set of constraints over an operation unit payload
+
+
Type(Object) - Constructor for class org.raml.amf.core.domain.Type
+
 
+
Type(String) - Constructor for class org.raml.amf.core.domain.Type
+
 
+
+ + + +

U

+
+
UnknownModelReferenceException - Exception in org.raml.amf.core.exceptions
+
+
Exception due to a reference to an unknown model
+
+
UnknownModelReferenceException(URL) - Constructor for exception org.raml.amf.core.exceptions.UnknownModelReferenceException
+
 
+
+ + + +

V

+
+
var(String, String) - Static method in class org.raml.amf.utils.Clojure
+
+
Looks up a var by name in the given namespace.
+
+
+ + + +

W

+
+
wrapped() - Method in class org.raml.amf.core.domain.APIDocumentation
+
 
+
wrapped() - Method in class org.raml.amf.core.domain.EndPoint
+
 
+
wrapped() - Method in class org.raml.amf.core.domain.GenericParameter
+
 
+
wrapped() - Method in class org.raml.amf.core.domain.GenericTag
+
 
+
wrapped() - Method in class org.raml.amf.core.domain.Parameter
+
 
+
wrapped() - Method in class org.raml.amf.core.domain.SourceMap
+
 
+
wrapped() - Method in class org.raml.amf.core.domain.Type
+
 
+
wrappedNode() - Method in class org.raml.amf.core.domain.DomainModel
+
 
+
+A B C D E F G H I J K L M O P R S T U V W 
+ +
+ + + + + + + +
+ + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/index.html b/doc/java/apidocs/index.html new file mode 100644 index 0000000..c4192bd --- /dev/null +++ b/doc/java/apidocs/index.html @@ -0,0 +1,75 @@ + + + + + + +api-modeling-framework java bindings 0.1.2-SNAPSHOT API + + + + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/doc/java/apidocs/org/raml/amf/AMF.html b/doc/java/apidocs/org/raml/amf/AMF.html new file mode 100644 index 0000000..c20236c --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/AMF.html @@ -0,0 +1,375 @@ + + + + + + +AMF (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf
+

Class AMF

+
+
+ +
+
    +
  • +
    +
    +
    public class AMF
    +extends Object
    +
    Facade class providing access to the main IO facilities in the library
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AMF

        +
        public AMF()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        RAMLParser

        +
        public static RAMLParser RAMLParser()
        +
        Builds a RAML to AMF parser
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        OpenAPIParser

        +
        public static OpenAPIParser OpenAPIParser()
        +
        Builds an OpenAPI to AMF parser
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        JSONLDParser

        +
        public static AMFJSONLDParser JSONLDParser()
        +
        Builds a AMF encoded JSON-LD to AMF parser
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        RAMLGenerator

        +
        public static RAMLGenerator RAMLGenerator()
        +
        Builds a AMF to RAML generator
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        OpenAPIGenerator

        +
        public static OpenAPIGenerator OpenAPIGenerator()
        +
        Builds a AMF to OpenAPI generator
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        JSONLDGenerator

        +
        public static AMFJSONLDGenerator JSONLDGenerator()
        +
        Builds a AMF to JSON-LD generator
        +
        +
        Returns:
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/class-use/AMF.html b/doc/java/apidocs/org/raml/amf/class-use/AMF.html new file mode 100644 index 0000000..42e5bb5 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/class-use/AMF.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class org.raml.amf.AMF (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.AMF

+
+
No usage of org.raml.amf.AMF
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/Model.html b/doc/java/apidocs/org/raml/amf/core/Model.html new file mode 100644 index 0000000..1caa724 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/Model.html @@ -0,0 +1,322 @@ + + + + + + +Model (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core
+

Class Model

+
+
+ +
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    DocumentModel, DomainModel
    +
    +
    +
    +
    public abstract class Model
    +extends Object
    +
    Base class for all AMF parsed models, provides methods to inspect and manipulate the model
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        rawModel

        +
        protected Object rawModel
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Model

        +
        protected Model(Object rawModel)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        clojureModel

        +
        public abstract Object clojureModel()
        +
        Returns the raw Clojure data structure for this instance data
        +
        +
        Returns:
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/class-use/Model.html b/doc/java/apidocs/org/raml/amf/core/class-use/Model.html new file mode 100644 index 0000000..93d86dd --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/class-use/Model.html @@ -0,0 +1,292 @@ + + + + + + +Uses of Class org.raml.amf.core.Model (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.Model

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Packages that use Model 
    PackageDescription
    org.raml.amf.core.document 
    org.raml.amf.core.domain 
    +
  • +
  • +
      +
    • + + +

      Uses of Model in org.raml.amf.core.document

      + + + + + + + + + + + + + + + + + + + + + + + + +
      Subclasses of Model in org.raml.amf.core.document 
      Modifier and TypeClass and Description
      class Document +
      AMF Documents encode the main element of a description in a particular Domain Model + For example, in RAML/HTTP, the main domain element is an APIDescription.
      +
      class DocumentModel +
      AMF Document model that can be used to work with the graph of linked documents generated by the parser.
      +
      class Fragment +
      AMF Fragments encode a single DomainElement that can be referenced and re-used in other documents.
      +
      class Module +
      AMF Modules contains collections of DomainElements that can be re-used and referenced from other documents in the + Documentmodel.
      +
      +
    • +
    • + + +

      Uses of Model in org.raml.amf.core.domain

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Subclasses of Model in org.raml.amf.core.domain 
      Modifier and TypeClass and Description
      class APIDocumentation +
      Main EntryPoint of the description of HTTP RPC API
      +
      class DomainModel +
      Created by antoniogarrote on 04/05/2017.
      +
      class EndPoint +
      EndPoints contains information about a HTTP remote location where a number of API operations have been bound
      +
      class GenericOperationUnit +
      Base class for the Request and Response of an API
      +
      class GenericParameter +
      Parameters include all kind of input or output information that is requested or returned by an API Operation that + are not encoded in the Request or Response payloads.
      +
      class GenericTag +
      Tag included in a SourceMap + Tags are tuples with an identifier, describing the kind of information in the mapping and an arbitrary value.
      +
      class Header +
      Created by antoniogarrote on 04/05/2017.
      +
      class Operation +
      A unit of business logic exposed by the API.
      +
      class Parameter +
      Created by antoniogarrote on 04/05/2017.
      +
      class Payload +
      Schema information for a Payload associated to a particular media-type
      +
      class Request +
      Created by antoniogarrote on 04/05/2017.
      +
      class Response +
      Information about the response returned by an operation, associated to a particular status
      +
      class SourceMap +
      Created by antoniogarrote on 04/05/2017.
      +
      class Type +
      Data Shape that describing a set of constraints over an operation unit payload
      +
      +
    • +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/DeclaresDomainModel.html b/doc/java/apidocs/org/raml/amf/core/document/DeclaresDomainModel.html new file mode 100644 index 0000000..29894a2 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/DeclaresDomainModel.html @@ -0,0 +1,235 @@ + + + + + + +DeclaresDomainModel (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.document
+

Interface DeclaresDomainModel

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    Document, Module
    +
    +
    +
    +
    public interface DeclaresDomainModel
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        declares

        +
        List<DomainModel> declares()
        +
        Declared DomainElements that can be re-used from other documents.
        +
        +
        Returns:
        +
        List of domain elements.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/Document.html b/doc/java/apidocs/org/raml/amf/core/document/Document.html new file mode 100644 index 0000000..2cc6a75 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/Document.html @@ -0,0 +1,351 @@ + + + + + + +Document (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.document
+

Class Document

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    DeclaresDomainModel, EncodesDomainModel
    +
    +
    +
    +
    public class Document
    +extends DocumentModel
    +implements EncodesDomainModel, DeclaresDomainModel
    +
    AMF Documents encode the main element of a description in a particular Domain Model + For example, in RAML/HTTP, the main domain element is an APIDescription. + + Since AMF Documents encode Domain elements they behave like Fragments + AMF Documents can also contains declarations of domain elements to be used in the description of the domain. + From this point of view Documents also behave like Modules.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Document

        +
        public Document(Object rawModel)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        declares

        +
        public List<DomainModel> declares()
        +
        List of domain elements declared in the document to be referenced in the encoded element. + They are supposed to be private to the description and not meant to be re-used as in Modules.
        +
        +
        Specified by:
        +
        declares in interface DeclaresDomainModel
        +
        Returns:
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/DocumentModel.html b/doc/java/apidocs/org/raml/amf/core/document/DocumentModel.html new file mode 100644 index 0000000..0e1928c --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/DocumentModel.html @@ -0,0 +1,471 @@ + + + + + + +DocumentModel (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.document
+

Class DocumentModel

+
+
+ +
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    Document, Fragment, Module
    +
    +
    +
    +
    public abstract class DocumentModel
    +extends Model
    +
    AMF Document model that can be used to work with the graph of linked documents generated by the parser.
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/EncodesDomainModel.html b/doc/java/apidocs/org/raml/amf/core/document/EncodesDomainModel.html new file mode 100644 index 0000000..4466e24 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/EncodesDomainModel.html @@ -0,0 +1,238 @@ + + + + + + +EncodesDomainModel (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.document
+

Interface EncodesDomainModel

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    Document, Fragment
    +
    +
    +
    +
    public interface EncodesDomainModel
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/Fragment.html b/doc/java/apidocs/org/raml/amf/core/document/Fragment.html new file mode 100644 index 0000000..a664aff --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/Fragment.html @@ -0,0 +1,322 @@ + + + + + + +Fragment (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.document
+

Class Fragment

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/Module.html b/doc/java/apidocs/org/raml/amf/core/document/Module.html new file mode 100644 index 0000000..e2591fb --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/Module.html @@ -0,0 +1,321 @@ + + + + + + +Module (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.document
+

Class Module

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    DeclaresDomainModel
    +
    +
    +
    +
    public class Module
    +extends DocumentModel
    +implements DeclaresDomainModel
    +
    AMF Modules contains collections of DomainElements that can be re-used and referenced from other documents in the + Documentmodel.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Module

        +
        public Module(Object rawModel)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        declares

        +
        public List<DomainModel> declares()
        +
        Declared DomainElements that can be re-used from other documents.
        +
        +
        Specified by:
        +
        declares in interface DeclaresDomainModel
        +
        Returns:
        +
        List of domain elements.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/class-use/DeclaresDomainModel.html b/doc/java/apidocs/org/raml/amf/core/document/class-use/DeclaresDomainModel.html new file mode 100644 index 0000000..556edcb --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/class-use/DeclaresDomainModel.html @@ -0,0 +1,176 @@ + + + + + + +Uses of Interface org.raml.amf.core.document.DeclaresDomainModel (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Interface
org.raml.amf.core.document.DeclaresDomainModel

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/class-use/Document.html b/doc/java/apidocs/org/raml/amf/core/document/class-use/Document.html new file mode 100644 index 0000000..ff3afc7 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/class-use/Document.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class org.raml.amf.core.document.Document (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.document.Document

+
+
No usage of org.raml.amf.core.document.Document
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/class-use/DocumentModel.html b/doc/java/apidocs/org/raml/amf/core/document/class-use/DocumentModel.html new file mode 100644 index 0000000..6bb6c9a --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/class-use/DocumentModel.html @@ -0,0 +1,349 @@ + + + + + + +Uses of Class org.raml.amf.core.document.DocumentModel (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.document.DocumentModel

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/class-use/EncodesDomainModel.html b/doc/java/apidocs/org/raml/amf/core/document/class-use/EncodesDomainModel.html new file mode 100644 index 0000000..05398f5 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/class-use/EncodesDomainModel.html @@ -0,0 +1,175 @@ + + + + + + +Uses of Interface org.raml.amf.core.document.EncodesDomainModel (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Interface
org.raml.amf.core.document.EncodesDomainModel

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/class-use/Fragment.html b/doc/java/apidocs/org/raml/amf/core/document/class-use/Fragment.html new file mode 100644 index 0000000..efee913 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/class-use/Fragment.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class org.raml.amf.core.document.Fragment (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.document.Fragment

+
+
No usage of org.raml.amf.core.document.Fragment
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/class-use/Module.html b/doc/java/apidocs/org/raml/amf/core/document/class-use/Module.html new file mode 100644 index 0000000..dd36377 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/class-use/Module.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class org.raml.amf.core.document.Module (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.document.Module

+
+
No usage of org.raml.amf.core.document.Module
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/package-frame.html b/doc/java/apidocs/org/raml/amf/core/document/package-frame.html new file mode 100644 index 0000000..7e9cc1c --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/package-frame.html @@ -0,0 +1,29 @@ + + + + + + +org.raml.amf.core.document (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

org.raml.amf.core.document

+ + + diff --git a/doc/java/apidocs/org/raml/amf/core/document/package-summary.html b/doc/java/apidocs/org/raml/amf/core/document/package-summary.html new file mode 100644 index 0000000..b7cc330 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/package-summary.html @@ -0,0 +1,189 @@ + + + + + + +org.raml.amf.core.document (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Package org.raml.amf.core.document

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    DeclaresDomainModel +
    Created by antoniogarrote on 04/05/2017.
    +
    EncodesDomainModel +
    Created by antoniogarrote on 04/05/2017.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Document +
    AMF Documents encode the main element of a description in a particular Domain Model + For example, in RAML/HTTP, the main domain element is an APIDescription.
    +
    DocumentModel +
    AMF Document model that can be used to work with the graph of linked documents generated by the parser.
    +
    Fragment +
    AMF Fragments encode a single DomainElement that can be referenced and re-used in other documents.
    +
    Module +
    AMF Modules contains collections of DomainElements that can be re-used and referenced from other documents in the + Documentmodel.
    +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/package-tree.html b/doc/java/apidocs/org/raml/amf/core/document/package-tree.html new file mode 100644 index 0000000..3498db1 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/package-tree.html @@ -0,0 +1,154 @@ + + + + + + +org.raml.amf.core.document Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Hierarchy For Package org.raml.amf.core.document

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/document/package-use.html b/doc/java/apidocs/org/raml/amf/core/document/package-use.html new file mode 100644 index 0000000..e2a697e --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/document/package-use.html @@ -0,0 +1,234 @@ + + + + + + +Uses of Package org.raml.amf.core.document (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Package
org.raml.amf.core.document

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/APIDocumentation.html b/doc/java/apidocs/org/raml/amf/core/domain/APIDocumentation.html new file mode 100644 index 0000000..1cf3568 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/APIDocumentation.html @@ -0,0 +1,522 @@ + + + + + + +APIDocumentation (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class APIDocumentation

+
+
+ +
+
    +
  • +
    +
    +
    public class APIDocumentation
    +extends DomainModel
    +
    Main EntryPoint of the description of HTTP RPC API
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        APIDocumentation

        +
        public APIDocumentation(api_modeling_framework.model.domain.ParsedAPIDocumentation rawModel)
        +
      • +
      + + + +
        +
      • +

        APIDocumentation

        +
        public APIDocumentation(String id)
        +
        Build a new empty API Documentation for the provided URI
        +
        +
        Parameters:
        +
        id -
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getTermsOfService

        +
        public String getTermsOfService()
        +
      • +
      + + + +
        +
      • +

        setTermsOfService

        +
        public void setTermsOfService(String termsOfService)
        +
      • +
      + + + +
        +
      • +

        getBasePath

        +
        public String getBasePath()
        +
      • +
      + + + +
        +
      • +

        setBasePath

        +
        public void setBasePath(String basePath)
        +
      • +
      + + + +
        +
      • +

        getHost

        +
        public String getHost()
        +
      • +
      + + + +
        +
      • +

        setHost

        +
        public void setHost(String host)
        +
      • +
      + + + +
        +
      • +

        getScheme

        +
        public String getScheme()
        +
        URI Scheme for the paths in the API
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setScheme

        +
        public void setScheme(String scheme)
        +
      • +
      + + + +
        +
      • +

        getAccepts

        +
        public List<String> getAccepts()
        +
      • +
      + + + +
        +
      • +

        setAccepts

        +
        public void setAccepts(List<String> accepts)
        +
      • +
      + + + +
        +
      • +

        getContentTypes

        +
        public List<String> getContentTypes()
        +
      • +
      + + + +
        +
      • +

        setContentTypes

        +
        public void setContentTypes(List<String> contentTypes)
        +
      • +
      + + + + + + + +
        +
      • +

        setEndPoints

        +
        public void setEndPoints(List<EndPoint> operations)
        +
      • +
      + + + +
        +
      • +

        wrapped

        +
        protected api_modeling_framework.model.domain.ParsedAPIDocumentation wrapped()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/DomainModel.html b/doc/java/apidocs/org/raml/amf/core/domain/DomainModel.html new file mode 100644 index 0000000..cf029dc --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/DomainModel.html @@ -0,0 +1,506 @@ + + + + + + +DomainModel (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class DomainModel

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DomainModel

        +
        public DomainModel(Object rawModel)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        clojureModel

        +
        public Object clojureModel()
        +
        Description copied from class: Model
        +
        Returns the raw Clojure data structure for this instance data
        +
        +
        Specified by:
        +
        clojureModel in class Model
        +
        Returns:
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getId

        +
        public String getId()
        +
      • +
      + + + +
        +
      • +

        getName

        +
        public String getName()
        +
      • +
      + + + +
        +
      • +

        setName

        +
        public void setName(String name)
        +
      • +
      + + + +
        +
      • +

        getAbstract

        +
        public Boolean getAbstract()
        +
      • +
      + + + +
        +
      • +

        setAbstract

        +
        public void setAbstract(Boolean abstractBool)
        +
      • +
      + + + +
        +
      • +

        getDescription

        +
        public String getDescription()
        +
      • +
      + + + +
        +
      • +

        setDescription

        +
        public void setDescription(String description)
        +
      • +
      + + + + + + + +
        +
      • +

        setSourceMaps

        +
        public void setSourceMaps(List<SourceMap> sourceMaps)
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        setId

        +
        protected void setId(String id)
        +
      • +
      + + + +
        +
      • +

        wrappedNode

        +
        protected api_modeling_framework.model.document.Node wrappedNode()
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/EndPoint.html b/doc/java/apidocs/org/raml/amf/core/domain/EndPoint.html new file mode 100644 index 0000000..d0ae893 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/EndPoint.html @@ -0,0 +1,389 @@ + + + + + + +EndPoint (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class EndPoint

+
+
+ +
+
    +
  • +
    +
    +
    public class EndPoint
    +extends DomainModel
    +
    EndPoints contains information about a HTTP remote location where a number of API operations have been bound
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        EndPoint

        +
        public EndPoint(api_modeling_framework.model.domain.ParsedEndPoint rawModel)
        +
      • +
      + + + +
        +
      • +

        EndPoint

        +
        public EndPoint(String id)
        +
        Builds a new EndPoint for the provided URI
        +
        +
        Parameters:
        +
        id -
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        wrapped

        +
        protected api_modeling_framework.model.domain.ParsedEndPoint wrapped()
        +
      • +
      + + + +
        +
      • +

        getPath

        +
        public String getPath()
        +
        Path for the URL where the operations of the EndPoint are bound
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setPath

        +
        public void setPath(String path)
        +
      • +
      + + + +
        +
      • +

        getSupportedOperations

        +
        public List<Operation> getSupportedOperations()
        +
        List of API Operations bound to this EndPoint
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setSupportedOperations

        +
        public void setSupportedOperations(List<Operation> operations)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/GenericOperationUnit.html b/doc/java/apidocs/org/raml/amf/core/domain/GenericOperationUnit.html new file mode 100644 index 0000000..3134440 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/GenericOperationUnit.html @@ -0,0 +1,361 @@ + + + + + + +GenericOperationUnit (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class GenericOperationUnit

+
+
+ +
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    Request, Response
    +
    +
    +
    +
    public abstract class GenericOperationUnit
    +extends DomainModel
    +
    Base class for the Request and Response of an API
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GenericOperationUnit

        +
        public GenericOperationUnit(Object rawModel)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getHeaders

        +
        public List<Header> getHeaders()
        +
        List of HTTP headers in this unit
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setHeaders

        +
        public void setHeaders(List<Header> headers)
        +
      • +
      + + + +
        +
      • +

        getPayloads

        +
        public List<Payload> getPayloads()
        +
        List of Payloads in the unit
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setPayloads

        +
        public void setPayloads(List<Payload> payloads)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/GenericParameter.html b/doc/java/apidocs/org/raml/amf/core/domain/GenericParameter.html new file mode 100644 index 0000000..3bc1318 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/GenericParameter.html @@ -0,0 +1,377 @@ + + + + + + +GenericParameter (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class GenericParameter

+
+
+ +
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    Header, Parameter
    +
    +
    +
    +
    public abstract class GenericParameter
    +extends DomainModel
    +
    Parameters include all kind of input or output information that is requested or returned by an API Operation that + are not encoded in the Request or Response payloads. + Parameters can be located in HTTP headers or in the domain, path or arguments of the request URL.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GenericParameter

        +
        public GenericParameter(api_modeling_framework.model.domain.ParsedParameter rawModel)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getRequired

        +
        public Boolean getRequired()
        +
      • +
      + + + +
        +
      • +

        setRequired

        +
        public void setRequired(Boolean required)
        +
      • +
      + + + +
        +
      • +

        getSchema

        +
        public Type getSchema()
        +
      • +
      + + + +
        +
      • +

        setParameterKindInternal

        +
        protected void setParameterKindInternal(String parameterKind)
        +
      • +
      + + + +
        +
      • +

        setSchema

        +
        public void setSchema(Type type)
        +
      • +
      + + + +
        +
      • +

        wrapped

        +
        protected api_modeling_framework.model.domain.ParsedParameter wrapped()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/GenericTag.html b/doc/java/apidocs/org/raml/amf/core/domain/GenericTag.html new file mode 100644 index 0000000..5cfbc6b --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/GenericTag.html @@ -0,0 +1,390 @@ + + + + + + +GenericTag (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class GenericTag

+
+
+ +
+
    +
  • +
    +
    +
    public class GenericTag
    +extends DomainModel
    +
    Tag included in a SourceMap + Tags are tuples with an identifier, describing the kind of information in the mapping and an arbitrary value. + Tags are also elements of the model, so they also have an associated URI.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GenericTag

        +
        public GenericTag(Object rawModel)
        +
      • +
      + + + +
        +
      • +

        GenericTag

        +
        public GenericTag(String id,
        +                  Object value)
        +
      • +
      + + + + +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getTagId

        +
        public String getTagId()
        +
      • +
      + + + +
        +
      • +

        setTagId

        +
        public void setTagId(String tagId)
        +
      • +
      + + + +
        +
      • +

        getValue

        +
        public Object getValue()
        +
      • +
      + + + +
        +
      • +

        setValue

        +
        public void setValue(Object value)
        +
      • +
      + + + +
        +
      • +

        wrapped

        +
        protected api_modeling_framework.model.document.Tag wrapped()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/Header.html b/doc/java/apidocs/org/raml/amf/core/domain/Header.html new file mode 100644 index 0000000..3f7acce --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/Header.html @@ -0,0 +1,296 @@ + + + + + + +Header (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class Header

+
+
+ +
+
    +
  • +
    +
    +
    public class Header
    +extends GenericParameter
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Header

        +
        public Header(api_modeling_framework.model.domain.ParsedParameter rawModel)
        +
      • +
      + + + +
        +
      • +

        Header

        +
        public Header(String id)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/Operation.html b/doc/java/apidocs/org/raml/amf/core/domain/Operation.html new file mode 100644 index 0000000..fdfc270 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/Operation.html @@ -0,0 +1,503 @@ + + + + + + +Operation (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class Operation

+
+
+ +
+
    +
  • +
    +
    +
    public class Operation
    +extends DomainModel
    +
    A unit of business logic exposed by the API. Operations can be invoked using the associated HTTP method.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + + + + + +
        +
      • +

        Operation

        +
        public Operation(String id)
        +
        Builds a new empty Operation with the provide URI
        +
        +
        Parameters:
        +
        id -
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getMethod

        +
        public String getMethod()
        +
        HTTP method that must be used to invoke the Operation
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setMethod

        +
        public void setMethod(String method)
        +
      • +
      + + + +
        +
      • +

        getScheme

        +
        public String getScheme()
        +
        HTTP scheme that must be used to invoke the operation, overrides the default in APIDocumentation
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setScheme

        +
        public void setScheme(String scheme)
        +
      • +
      + + + +
        +
      • +

        getAccepts

        +
        public List<String> getAccepts()
        +
        HTTP media-types accepted by the operation, overrides the default in APIDocumentation
        +
      • +
      + + + +
        +
      • +

        setAccepts

        +
        public void setAccepts(List<String> accepts)
        +
      • +
      + + + +
        +
      • +

        getContentTypes

        +
        public List<String> getContentTypes()
        +
        HTTP media-types returned by the operation, overrides the default in APIDocumentation
        +
      • +
      + + + +
        +
      • +

        setContentTypes

        +
        public void setContentTypes(List<String> contentTypes)
        +
      • +
      + + + +
        +
      • +

        getResponses

        +
        public List<Response> getResponses()
        +
        List of responses for different HTTP status codes supported by this operation
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setResponses

        +
        public void setResponses(List<Operation> responses)
        +
      • +
      + + + +
        +
      • +

        getRequest

        +
        public Request getRequest()
        +
        Request information for the operation
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setRequest

        +
        public void setRequest(Request request)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/Parameter.html b/doc/java/apidocs/org/raml/amf/core/domain/Parameter.html new file mode 100644 index 0000000..c974569 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/Parameter.html @@ -0,0 +1,362 @@ + + + + + + +Parameter (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class Parameter

+
+
+ +
+
    +
  • +
    +
    +
    public class Parameter
    +extends GenericParameter
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Parameter

        +
        public Parameter(api_modeling_framework.model.domain.ParsedParameter rawModel)
        +
      • +
      + + + +
        +
      • +

        Parameter

        +
        public Parameter(String id,
        +                 String parameterKind)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setParameterKind

        +
        protected void setParameterKind(String parameterKind)
        +
      • +
      + + + +
        +
      • +

        getParameterKind

        +
        public String getParameterKind()
        +
      • +
      + + + +
        +
      • +

        wrapped

        +
        protected api_modeling_framework.model.domain.ParsedParameter wrapped()
        +
        +
        Overrides:
        +
        wrapped in class GenericParameter
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/Payload.html b/doc/java/apidocs/org/raml/amf/core/domain/Payload.html new file mode 100644 index 0000000..bd4a51f --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/Payload.html @@ -0,0 +1,363 @@ + + + + + + +Payload (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class Payload

+
+
+ +
+
    +
  • +
    +
    +
    public class Payload
    +extends DomainModel
    +
    Schema information for a Payload associated to a particular media-type
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Payload

        +
        public Payload(api_modeling_framework.model.domain.ParsedPayload rawModel)
        +
      • +
      + + + +
        +
      • +

        Payload

        +
        public Payload(String id)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getMediaType

        +
        public String getMediaType()
        +
      • +
      + + + +
        +
      • +

        setMediaType

        +
        public void setMediaType(String mediaType)
        +
      • +
      + + + +
        +
      • +

        getSchema

        +
        public Type getSchema()
        +
        Schema information for the payload
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setSchema

        +
        public void setSchema(Type type)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/Request.html b/doc/java/apidocs/org/raml/amf/core/domain/Request.html new file mode 100644 index 0000000..2f8c9f1 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/Request.html @@ -0,0 +1,348 @@ + + + + + + +Request (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class Request

+
+
+ +
+
    +
  • +
    +
    +
    public class Request
    +extends GenericOperationUnit
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/Response.html b/doc/java/apidocs/org/raml/amf/core/domain/Response.html new file mode 100644 index 0000000..e665c5c --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/Response.html @@ -0,0 +1,349 @@ + + + + + + +Response (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class Response

+
+
+ +
+
    +
  • +
    +
    +
    public class Response
    +extends GenericOperationUnit
    +
    Information about the response returned by an operation, associated to a particular status
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Response

        +
        public Response(api_modeling_framework.model.domain.ParsedResponse rawModel)
        +
      • +
      + + + +
        +
      • +

        Response

        +
        public Response(String id)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getStatusCode

        +
        public String getStatusCode()
        +
        Status code for the response
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setStatusCode

        +
        public void setStatusCode(String status)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/SourceMap.html b/doc/java/apidocs/org/raml/amf/core/domain/SourceMap.html new file mode 100644 index 0000000..36ad470 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/SourceMap.html @@ -0,0 +1,358 @@ + + + + + + +SourceMap (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class SourceMap

+
+
+ +
+
    +
  • +
    +
    +
    public class SourceMap
    +extends DomainModel
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SourceMap

        +
        public SourceMap(api_modeling_framework.model.document.DocumentSourceMap rawModel)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        wrapped

        +
        protected api_modeling_framework.model.document.DocumentSourceMap wrapped()
        +
      • +
      + + + +
        +
      • +

        getSource

        +
        public String getSource()
        +
      • +
      + + + +
        +
      • +

        setSource

        +
        public void setSource(String source)
        +
      • +
      + + + + + + + + +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/Type.html b/doc/java/apidocs/org/raml/amf/core/domain/Type.html new file mode 100644 index 0000000..2be2ea6 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/Type.html @@ -0,0 +1,357 @@ + + + + + + +Type (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.domain
+

Class Type

+
+
+ +
+
    +
  • +
    +
    +
    public class Type
    +extends DomainModel
    +
    Data Shape that describing a set of constraints over an operation unit payload
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Type

        +
        public Type(Object rawModel)
        +
      • +
      + + + +
        +
      • +

        Type

        +
        public Type(String id)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getShape

        +
        public String getShape()
        +
        JSON-LD string containing a SHACL shape that can be used to validate payloads for this operation unit
        +
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        setShape

        +
        public void setShape(String shaclShape)
        +
        Sets the SHACL shape for the payloads of this operation unit
        +
        +
        Parameters:
        +
        shaclShape - valid SHACL shape encoded as JSON-LD string
        +
        +
      • +
      + + + +
        +
      • +

        wrapped

        +
        public api_modeling_framework.model.domain.ParsedType wrapped()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/APIDocumentation.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/APIDocumentation.html new file mode 100644 index 0000000..72f77bc --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/APIDocumentation.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.APIDocumentation (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.APIDocumentation

+
+
No usage of org.raml.amf.core.domain.APIDocumentation
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/DomainModel.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/DomainModel.html new file mode 100644 index 0000000..de0169b --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/DomainModel.html @@ -0,0 +1,348 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.DomainModel (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.DomainModel

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/EndPoint.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/EndPoint.html new file mode 100644 index 0000000..971d0a5 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/EndPoint.html @@ -0,0 +1,181 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.EndPoint (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.EndPoint

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/GenericOperationUnit.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/GenericOperationUnit.html new file mode 100644 index 0000000..b83ebcf --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/GenericOperationUnit.html @@ -0,0 +1,174 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.GenericOperationUnit (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.GenericOperationUnit

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/GenericParameter.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/GenericParameter.html new file mode 100644 index 0000000..2463d91 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/GenericParameter.html @@ -0,0 +1,174 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.GenericParameter (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.GenericParameter

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/GenericTag.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/GenericTag.html new file mode 100644 index 0000000..3cfee6e --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/GenericTag.html @@ -0,0 +1,179 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.GenericTag (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.GenericTag

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/Header.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Header.html new file mode 100644 index 0000000..9ae9bd4 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Header.html @@ -0,0 +1,181 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.Header (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.Header

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/Operation.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Operation.html new file mode 100644 index 0000000..83512b5 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Operation.html @@ -0,0 +1,185 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.Operation (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.Operation

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/Parameter.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Parameter.html new file mode 100644 index 0000000..b0a8b1e --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Parameter.html @@ -0,0 +1,179 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.Parameter (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.Parameter

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/Payload.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Payload.html new file mode 100644 index 0000000..b87458d --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Payload.html @@ -0,0 +1,181 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.Payload (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.Payload

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/Request.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Request.html new file mode 100644 index 0000000..d9c5993 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Request.html @@ -0,0 +1,181 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.Request (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.Request

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/Response.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Response.html new file mode 100644 index 0000000..0f746b7 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Response.html @@ -0,0 +1,168 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.Response (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.Response

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/SourceMap.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/SourceMap.html new file mode 100644 index 0000000..f2967cb --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/SourceMap.html @@ -0,0 +1,179 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.SourceMap (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.SourceMap

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/class-use/Type.html b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Type.html new file mode 100644 index 0000000..90b31d8 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/class-use/Type.html @@ -0,0 +1,189 @@ + + + + + + +Uses of Class org.raml.amf.core.domain.Type (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.domain.Type

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/package-frame.html b/doc/java/apidocs/org/raml/amf/core/domain/package-frame.html new file mode 100644 index 0000000..bbccb47 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/package-frame.html @@ -0,0 +1,34 @@ + + + + + + +org.raml.amf.core.domain (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

org.raml.amf.core.domain

+ + + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/package-summary.html b/doc/java/apidocs/org/raml/amf/core/domain/package-summary.html new file mode 100644 index 0000000..4697f45 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/package-summary.html @@ -0,0 +1,226 @@ + + + + + + +org.raml.amf.core.domain (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Package org.raml.amf.core.domain

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    APIDocumentation +
    Main EntryPoint of the description of HTTP RPC API
    +
    DomainModel +
    Created by antoniogarrote on 04/05/2017.
    +
    EndPoint +
    EndPoints contains information about a HTTP remote location where a number of API operations have been bound
    +
    GenericOperationUnit +
    Base class for the Request and Response of an API
    +
    GenericParameter +
    Parameters include all kind of input or output information that is requested or returned by an API Operation that + are not encoded in the Request or Response payloads.
    +
    GenericTag +
    Tag included in a SourceMap + Tags are tuples with an identifier, describing the kind of information in the mapping and an arbitrary value.
    +
    Header +
    Created by antoniogarrote on 04/05/2017.
    +
    Operation +
    A unit of business logic exposed by the API.
    +
    Parameter +
    Created by antoniogarrote on 04/05/2017.
    +
    Payload +
    Schema information for a Payload associated to a particular media-type
    +
    Request +
    Created by antoniogarrote on 04/05/2017.
    +
    Response +
    Information about the response returned by an operation, associated to a particular status
    +
    SourceMap +
    Created by antoniogarrote on 04/05/2017.
    +
    Type +
    Data Shape that describing a set of constraints over an operation unit payload
    +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/package-tree.html b/doc/java/apidocs/org/raml/amf/core/domain/package-tree.html new file mode 100644 index 0000000..e8ad53b --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/package-tree.html @@ -0,0 +1,165 @@ + + + + + + +org.raml.amf.core.domain Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Hierarchy For Package org.raml.amf.core.domain

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/domain/package-use.html b/doc/java/apidocs/org/raml/amf/core/domain/package-use.html new file mode 100644 index 0000000..a25af71 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/domain/package-use.html @@ -0,0 +1,244 @@ + + + + + + +Uses of Package org.raml.amf.core.domain (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Package
org.raml.amf.core.domain

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Packages that use org.raml.amf.core.domain 
    PackageDescription
    org.raml.amf.core.document 
    org.raml.amf.core.domain 
    +
  • +
  • + + + + + + + + + + + + +
    Classes in org.raml.amf.core.domain used by org.raml.amf.core.document 
    Class and Description
    DomainModel +
    Created by antoniogarrote on 04/05/2017.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Classes in org.raml.amf.core.domain used by org.raml.amf.core.domain 
    Class and Description
    DomainModel +
    Created by antoniogarrote on 04/05/2017.
    +
    EndPoint +
    EndPoints contains information about a HTTP remote location where a number of API operations have been bound
    +
    GenericOperationUnit +
    Base class for the Request and Response of an API
    +
    GenericParameter +
    Parameters include all kind of input or output information that is requested or returned by an API Operation that + are not encoded in the Request or Response payloads.
    +
    GenericTag +
    Tag included in a SourceMap + Tags are tuples with an identifier, describing the kind of information in the mapping and an arbitrary value.
    +
    Header +
    Created by antoniogarrote on 04/05/2017.
    +
    Operation +
    A unit of business logic exposed by the API.
    +
    Parameter +
    Created by antoniogarrote on 04/05/2017.
    +
    Payload +
    Schema information for a Payload associated to a particular media-type
    +
    Request +
    Created by antoniogarrote on 04/05/2017.
    +
    Response +
    Information about the response returned by an operation, associated to a particular status
    +
    SourceMap +
    Created by antoniogarrote on 04/05/2017.
    +
    Type +
    Data Shape that describing a set of constraints over an operation unit payload
    +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/InvalidModelException.html b/doc/java/apidocs/org/raml/amf/core/exceptions/InvalidModelException.html new file mode 100644 index 0000000..af4b43d --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/InvalidModelException.html @@ -0,0 +1,270 @@ + + + + + + +InvalidModelException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.exceptions
+

Class InvalidModelException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class InvalidModelException
    +extends RuntimeException
    +
    Exception related to a native clojure model that is not matching the expected value
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        InvalidModelException

        +
        public InvalidModelException(Exception ex)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/ResolutionException.html b/doc/java/apidocs/org/raml/amf/core/exceptions/ResolutionException.html new file mode 100644 index 0000000..4011ee5 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/ResolutionException.html @@ -0,0 +1,301 @@ + + + + + + +ResolutionException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.exceptions
+

Class ResolutionException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class ResolutionException
    +extends Exception
    +
    Created by antoniogarrote on 04/05/2017.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/UnknownModelReferenceException.html b/doc/java/apidocs/org/raml/amf/core/exceptions/UnknownModelReferenceException.html new file mode 100644 index 0000000..00cd3fe --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/UnknownModelReferenceException.html @@ -0,0 +1,299 @@ + + + + + + +UnknownModelReferenceException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.core.exceptions
+

Class UnknownModelReferenceException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class UnknownModelReferenceException
    +extends Exception
    +
    Exception due to a reference to an unknown model
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UnknownModelReferenceException

        +
        public UnknownModelReferenceException(URL reference)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getUknownReference

        +
        public URL getUknownReference()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/class-use/InvalidModelException.html b/doc/java/apidocs/org/raml/amf/core/exceptions/class-use/InvalidModelException.html new file mode 100644 index 0000000..c88824c --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/class-use/InvalidModelException.html @@ -0,0 +1,283 @@ + + + + + + +Uses of Class org.raml.amf.core.exceptions.InvalidModelException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.exceptions.InvalidModelException

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/class-use/ResolutionException.html b/doc/java/apidocs/org/raml/amf/core/exceptions/class-use/ResolutionException.html new file mode 100644 index 0000000..04d41f3 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/class-use/ResolutionException.html @@ -0,0 +1,190 @@ + + + + + + +Uses of Class org.raml.amf.core.exceptions.ResolutionException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.exceptions.ResolutionException

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/class-use/UnknownModelReferenceException.html b/doc/java/apidocs/org/raml/amf/core/exceptions/class-use/UnknownModelReferenceException.html new file mode 100644 index 0000000..0212a22 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/class-use/UnknownModelReferenceException.html @@ -0,0 +1,190 @@ + + + + + + +Uses of Class org.raml.amf.core.exceptions.UnknownModelReferenceException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.core.exceptions.UnknownModelReferenceException

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/package-frame.html b/doc/java/apidocs/org/raml/amf/core/exceptions/package-frame.html new file mode 100644 index 0000000..8812bdf --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/package-frame.html @@ -0,0 +1,23 @@ + + + + + + +org.raml.amf.core.exceptions (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

org.raml.amf.core.exceptions

+ + + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/package-summary.html b/doc/java/apidocs/org/raml/amf/core/exceptions/package-summary.html new file mode 100644 index 0000000..c8efa21 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/package-summary.html @@ -0,0 +1,158 @@ + + + + + + +org.raml.amf.core.exceptions (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Package org.raml.amf.core.exceptions

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/package-tree.html b/doc/java/apidocs/org/raml/amf/core/exceptions/package-tree.html new file mode 100644 index 0000000..c7b7a90 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/package-tree.html @@ -0,0 +1,153 @@ + + + + + + +org.raml.amf.core.exceptions Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Hierarchy For Package org.raml.amf.core.exceptions

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/exceptions/package-use.html b/doc/java/apidocs/org/raml/amf/core/exceptions/package-use.html new file mode 100644 index 0000000..5aaeab7 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/exceptions/package-use.html @@ -0,0 +1,244 @@ + + + + + + +Uses of Package org.raml.amf.core.exceptions (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Package
org.raml.amf.core.exceptions

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/package-frame.html b/doc/java/apidocs/org/raml/amf/core/package-frame.html new file mode 100644 index 0000000..8c44a61 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +org.raml.amf.core (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

org.raml.amf.core

+
+

Classes

+ +
+ + diff --git a/doc/java/apidocs/org/raml/amf/core/package-summary.html b/doc/java/apidocs/org/raml/amf/core/package-summary.html new file mode 100644 index 0000000..c814a01 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/package-summary.html @@ -0,0 +1,146 @@ + + + + + + +org.raml.amf.core (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Package org.raml.amf.core

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Model +
    Base class for all AMF parsed models, provides methods to inspect and manipulate the model
    +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/package-tree.html b/doc/java/apidocs/org/raml/amf/core/package-tree.html new file mode 100644 index 0000000..f9c4147 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/package-tree.html @@ -0,0 +1,139 @@ + + + + + + +org.raml.amf.core Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Hierarchy For Package org.raml.amf.core

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/core/package-use.html b/doc/java/apidocs/org/raml/amf/core/package-use.html new file mode 100644 index 0000000..f4b087d --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/core/package-use.html @@ -0,0 +1,182 @@ + + + + + + +Uses of Package org.raml.amf.core (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Package
org.raml.amf.core

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/examples/BasicParsingAndNavigation.html b/doc/java/apidocs/org/raml/amf/examples/BasicParsingAndNavigation.html new file mode 100644 index 0000000..39a848e --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/examples/BasicParsingAndNavigation.html @@ -0,0 +1,289 @@ + + + + + + +BasicParsingAndNavigation (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.examples
+

Class BasicParsingAndNavigation

+
+
+ +
+
    +
  • +
    +
    +
    public class BasicParsingAndNavigation
    +extends Object
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/examples/class-use/BasicParsingAndNavigation.html b/doc/java/apidocs/org/raml/amf/examples/class-use/BasicParsingAndNavigation.html new file mode 100644 index 0000000..312075e --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/examples/class-use/BasicParsingAndNavigation.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class org.raml.amf.examples.BasicParsingAndNavigation (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.examples.BasicParsingAndNavigation

+
+
No usage of org.raml.amf.examples.BasicParsingAndNavigation
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/examples/package-frame.html b/doc/java/apidocs/org/raml/amf/examples/package-frame.html new file mode 100644 index 0000000..4bdded1 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/examples/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +org.raml.amf.examples (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

org.raml.amf.examples

+
+

Classes

+ +
+ + diff --git a/doc/java/apidocs/org/raml/amf/examples/package-summary.html b/doc/java/apidocs/org/raml/amf/examples/package-summary.html new file mode 100644 index 0000000..7e133f8 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/examples/package-summary.html @@ -0,0 +1,146 @@ + + + + + + +org.raml.amf.examples (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Package org.raml.amf.examples

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    BasicParsingAndNavigation +
    Created by antoniogarrote on 04/05/2017.
    +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/examples/package-tree.html b/doc/java/apidocs/org/raml/amf/examples/package-tree.html new file mode 100644 index 0000000..7029b88 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/examples/package-tree.html @@ -0,0 +1,139 @@ + + + + + + +org.raml.amf.examples Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Hierarchy For Package org.raml.amf.examples

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/examples/package-use.html b/doc/java/apidocs/org/raml/amf/examples/package-use.html new file mode 100644 index 0000000..9eaa73e --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/examples/package-use.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Package org.raml.amf.examples (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Package
org.raml.amf.examples

+
+
No usage of org.raml.amf.examples
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/AMFJSONLDGenerator.html b/doc/java/apidocs/org/raml/amf/generators/AMFJSONLDGenerator.html new file mode 100644 index 0000000..8e6ba52 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/AMFJSONLDGenerator.html @@ -0,0 +1,290 @@ + + + + + + +AMFJSONLDGenerator (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.generators
+

Class AMFJSONLDGenerator

+
+
+ +
+
    +
  • +
    +
    +
    public class AMFJSONLDGenerator
    +extends BaseGenerator
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AMFJSONLDGenerator

        +
        public AMFJSONLDGenerator()
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/BaseGenerator.html b/doc/java/apidocs/org/raml/amf/generators/BaseGenerator.html new file mode 100644 index 0000000..a32815f --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/BaseGenerator.html @@ -0,0 +1,431 @@ + + + + + + +BaseGenerator (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.generators
+

Class BaseGenerator

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/GenerationException.html b/doc/java/apidocs/org/raml/amf/generators/GenerationException.html new file mode 100644 index 0000000..d6d4902 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/GenerationException.html @@ -0,0 +1,260 @@ + + + + + + +GenerationException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.generators
+

Class GenerationException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class GenerationException
    +extends Throwable
    +
    Created by antoniogarrote on 04/05/2017.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GenerationException

        +
        public GenerationException(Exception rawModel)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/GenerationOptions.html b/doc/java/apidocs/org/raml/amf/generators/GenerationOptions.html new file mode 100644 index 0000000..efda135 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/GenerationOptions.html @@ -0,0 +1,317 @@ + + + + + + +GenerationOptions (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.generators
+

Class GenerationOptions

+
+
+ +
+
    +
  • +
    +
    +
    public class GenerationOptions
    +extends Object
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GenerationOptions

        +
        public GenerationOptions()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setSourceMapGeneration

        +
        public GenerationOptions setSourceMapGeneration(Boolean shouldGenerate)
        +
        When serialising to JSON-LD, enables or disables the generation of source-maps
        +
        +
        Parameters:
        +
        shouldGenerate -
        +
        +
      • +
      + + + +
        +
      • +

        setFullgraph

        +
        public GenerationOptions setFullgraph(Boolean shouldGenerateFullGraph)
        +
        When serialising into JSON-LD, if set to true, all the JSON-LD RDF graph for referenced documents will be nested inside + the JSON-LD document of the model. + If set to false, only the URI will be serialised
        +
        +
        Parameters:
        +
        shouldGenerateFullGraph -
        +
        +
      • +
      + + + +
        +
      • +

        build

        +
        public clojure.lang.IPersistentMap build()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/OpenAPIGenerator.html b/doc/java/apidocs/org/raml/amf/generators/OpenAPIGenerator.html new file mode 100644 index 0000000..4d7c936 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/OpenAPIGenerator.html @@ -0,0 +1,290 @@ + + + + + + +OpenAPIGenerator (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.generators
+

Class OpenAPIGenerator

+
+
+ +
+
    +
  • +
    +
    +
    public class OpenAPIGenerator
    +extends BaseGenerator
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/RAMLGenerator.html b/doc/java/apidocs/org/raml/amf/generators/RAMLGenerator.html new file mode 100644 index 0000000..21d4a65 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/RAMLGenerator.html @@ -0,0 +1,290 @@ + + + + + + +RAMLGenerator (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.generators
+

Class RAMLGenerator

+
+
+ +
+
    +
  • +
    +
    +
    public class RAMLGenerator
    +extends BaseGenerator
    +
    Created by antoniogarrote on 04/05/2017.
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/class-use/AMFJSONLDGenerator.html b/doc/java/apidocs/org/raml/amf/generators/class-use/AMFJSONLDGenerator.html new file mode 100644 index 0000000..6445735 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/class-use/AMFJSONLDGenerator.html @@ -0,0 +1,168 @@ + + + + + + +Uses of Class org.raml.amf.generators.AMFJSONLDGenerator (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.generators.AMFJSONLDGenerator

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/class-use/BaseGenerator.html b/doc/java/apidocs/org/raml/amf/generators/class-use/BaseGenerator.html new file mode 100644 index 0000000..5d2a154 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/class-use/BaseGenerator.html @@ -0,0 +1,180 @@ + + + + + + +Uses of Class org.raml.amf.generators.BaseGenerator (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.generators.BaseGenerator

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/class-use/GenerationException.html b/doc/java/apidocs/org/raml/amf/generators/class-use/GenerationException.html new file mode 100644 index 0000000..1619994 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/class-use/GenerationException.html @@ -0,0 +1,226 @@ + + + + + + +Uses of Class org.raml.amf.generators.GenerationException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.generators.GenerationException

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/class-use/GenerationOptions.html b/doc/java/apidocs/org/raml/amf/generators/class-use/GenerationOptions.html new file mode 100644 index 0000000..5af04e4 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/class-use/GenerationOptions.html @@ -0,0 +1,206 @@ + + + + + + +Uses of Class org.raml.amf.generators.GenerationOptions (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.generators.GenerationOptions

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/class-use/OpenAPIGenerator.html b/doc/java/apidocs/org/raml/amf/generators/class-use/OpenAPIGenerator.html new file mode 100644 index 0000000..9dde242 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/class-use/OpenAPIGenerator.html @@ -0,0 +1,168 @@ + + + + + + +Uses of Class org.raml.amf.generators.OpenAPIGenerator (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.generators.OpenAPIGenerator

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/class-use/RAMLGenerator.html b/doc/java/apidocs/org/raml/amf/generators/class-use/RAMLGenerator.html new file mode 100644 index 0000000..ae4a248 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/class-use/RAMLGenerator.html @@ -0,0 +1,168 @@ + + + + + + +Uses of Class org.raml.amf.generators.RAMLGenerator (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.generators.RAMLGenerator

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/package-frame.html b/doc/java/apidocs/org/raml/amf/generators/package-frame.html new file mode 100644 index 0000000..124d8a8 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/package-frame.html @@ -0,0 +1,26 @@ + + + + + + +org.raml.amf.generators (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

org.raml.amf.generators

+ + + diff --git a/doc/java/apidocs/org/raml/amf/generators/package-summary.html b/doc/java/apidocs/org/raml/amf/generators/package-summary.html new file mode 100644 index 0000000..b4b4128 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/package-summary.html @@ -0,0 +1,176 @@ + + + + + + +org.raml.amf.generators (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Package org.raml.amf.generators

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/package-tree.html b/doc/java/apidocs/org/raml/amf/generators/package-tree.html new file mode 100644 index 0000000..b32cdbc --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/package-tree.html @@ -0,0 +1,151 @@ + + + + + + +org.raml.amf.generators Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Hierarchy For Package org.raml.amf.generators

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/generators/package-use.html b/doc/java/apidocs/org/raml/amf/generators/package-use.html new file mode 100644 index 0000000..6338837 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/generators/package-use.html @@ -0,0 +1,223 @@ + + + + + + +Uses of Package org.raml.amf.generators (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Package
org.raml.amf.generators

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/package-frame.html b/doc/java/apidocs/org/raml/amf/package-frame.html new file mode 100644 index 0000000..3a5ca6d --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +org.raml.amf (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

org.raml.amf

+
+

Classes

+ +
+ + diff --git a/doc/java/apidocs/org/raml/amf/package-summary.html b/doc/java/apidocs/org/raml/amf/package-summary.html new file mode 100644 index 0000000..bb75a8d --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/package-summary.html @@ -0,0 +1,146 @@ + + + + + + +org.raml.amf (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Package org.raml.amf

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    AMF +
    Facade class providing access to the main IO facilities in the library
    +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/package-tree.html b/doc/java/apidocs/org/raml/amf/package-tree.html new file mode 100644 index 0000000..5bb3ae0 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/package-tree.html @@ -0,0 +1,139 @@ + + + + + + +org.raml.amf Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Hierarchy For Package org.raml.amf

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/package-use.html b/doc/java/apidocs/org/raml/amf/package-use.html new file mode 100644 index 0000000..3320d14 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/package-use.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Package org.raml.amf (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Package
org.raml.amf

+
+
No usage of org.raml.amf
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/AMFJSONLDParser.html b/doc/java/apidocs/org/raml/amf/parsers/AMFJSONLDParser.html new file mode 100644 index 0000000..df7069f --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/AMFJSONLDParser.html @@ -0,0 +1,290 @@ + + + + + + +AMFJSONLDParser (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.parsers
+

Class AMFJSONLDParser

+
+
+ +
+
    +
  • +
    +
    +
    public class AMFJSONLDParser
    +extends BaseParser
    +
    Wrapper class for the AMF OWL model parser, processes AMF model specification JSON-LD documents and generate the DocumentModel out of them
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AMFJSONLDParser

        +
        public AMFJSONLDParser()
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/BaseParser.html b/doc/java/apidocs/org/raml/amf/parsers/BaseParser.html new file mode 100644 index 0000000..94d1c28 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/BaseParser.html @@ -0,0 +1,395 @@ + + + + + + +BaseParser (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.parsers
+

Class BaseParser

+
+
+ +
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    AMFJSONLDParser, OpenAPIParser, RAMLParser
    +
    +
    +
    +
    public abstract class BaseParser
    +extends Object
    +
    Basic interface for all AMF parsers. It allows to parse syntax files and syntax text and generate the AMF Model out + of it.
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/OpenAPIParser.html b/doc/java/apidocs/org/raml/amf/parsers/OpenAPIParser.html new file mode 100644 index 0000000..7d6497a --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/OpenAPIParser.html @@ -0,0 +1,290 @@ + + + + + + +OpenAPIParser (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.parsers
+

Class OpenAPIParser

+
+
+ +
+
    +
  • +
    +
    +
    public class OpenAPIParser
    +extends BaseParser
    +
    Wrapper class for the AMF OpenAPI parser, processes OpenAPI specification documents and generate the DocumentModel out of them
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        OpenAPIParser

        +
        public OpenAPIParser()
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/ParsingException.html b/doc/java/apidocs/org/raml/amf/parsers/ParsingException.html new file mode 100644 index 0000000..21547e7 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/ParsingException.html @@ -0,0 +1,270 @@ + + + + + + +ParsingException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.parsers
+

Class ParsingException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Serializable
    +
    +
    +
    +
    public class ParsingException
    +extends IOException
    +
    Exception produced while parsing an input syntax for the AMF parser
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ParsingException

        +
        public ParsingException(Exception ex)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/ParsingOptions.html b/doc/java/apidocs/org/raml/amf/parsers/ParsingOptions.html new file mode 100644 index 0000000..55bf78a --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/ParsingOptions.html @@ -0,0 +1,294 @@ + + + + + + +ParsingOptions (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.parsers
+

Class ParsingOptions

+
+
+ +
+
    +
  • +
    +
    +
    public class ParsingOptions
    +extends Object
    +
    Parsing options for parsing
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ParsingOptions

        +
        public ParsingOptions()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setCacheDirs

        +
        public ParsingOptions setCacheDirs(HashMap<String,String> uriToDirs)
        +
        Sets a mapping from URL prefixes for references to local directories to resolve references in the syntax
        +
        +
        Parameters:
        +
        uriToDirs -
        +
        +
      • +
      + + + +
        +
      • +

        build

        +
        public clojure.lang.IPersistentMap build()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/RAMLParser.html b/doc/java/apidocs/org/raml/amf/parsers/RAMLParser.html new file mode 100644 index 0000000..41cc8c1 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/RAMLParser.html @@ -0,0 +1,290 @@ + + + + + + +RAMLParser (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.parsers
+

Class RAMLParser

+
+
+ +
+
    +
  • +
    +
    +
    public class RAMLParser
    +extends BaseParser
    +
    Wrapper class for the AMF RAML parser, processes RAML specification documents and generate the DocumentModel out of them
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        RAMLParser

        +
        public RAMLParser()
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/class-use/AMFJSONLDParser.html b/doc/java/apidocs/org/raml/amf/parsers/class-use/AMFJSONLDParser.html new file mode 100644 index 0000000..fc66927 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/class-use/AMFJSONLDParser.html @@ -0,0 +1,168 @@ + + + + + + +Uses of Class org.raml.amf.parsers.AMFJSONLDParser (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.parsers.AMFJSONLDParser

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/class-use/BaseParser.html b/doc/java/apidocs/org/raml/amf/parsers/class-use/BaseParser.html new file mode 100644 index 0000000..d2fd62d --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/class-use/BaseParser.html @@ -0,0 +1,180 @@ + + + + + + +Uses of Class org.raml.amf.parsers.BaseParser (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.parsers.BaseParser

+
+
+
    +
  • + + + + + + + + + + + + +
    Packages that use BaseParser 
    PackageDescription
    org.raml.amf.parsers 
    +
  • +
  • +
      +
    • + + +

      Uses of BaseParser in org.raml.amf.parsers

      + + + + + + + + + + + + + + + + + + + + +
      Subclasses of BaseParser in org.raml.amf.parsers 
      Modifier and TypeClass and Description
      class AMFJSONLDParser +
      Wrapper class for the AMF OWL model parser, processes AMF model specification JSON-LD documents and generate the DocumentModel out of them
      +
      class OpenAPIParser +
      Wrapper class for the AMF OpenAPI parser, processes OpenAPI specification documents and generate the DocumentModel out of them
      +
      class RAMLParser +
      Wrapper class for the AMF RAML parser, processes RAML specification documents and generate the DocumentModel out of them
      +
      +
    • +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/class-use/OpenAPIParser.html b/doc/java/apidocs/org/raml/amf/parsers/class-use/OpenAPIParser.html new file mode 100644 index 0000000..5e2ca5d --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/class-use/OpenAPIParser.html @@ -0,0 +1,168 @@ + + + + + + +Uses of Class org.raml.amf.parsers.OpenAPIParser (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.parsers.OpenAPIParser

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/class-use/ParsingException.html b/doc/java/apidocs/org/raml/amf/parsers/class-use/ParsingException.html new file mode 100644 index 0000000..389af31 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/class-use/ParsingException.html @@ -0,0 +1,212 @@ + + + + + + +Uses of Class org.raml.amf.parsers.ParsingException (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.parsers.ParsingException

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/class-use/ParsingOptions.html b/doc/java/apidocs/org/raml/amf/parsers/class-use/ParsingOptions.html new file mode 100644 index 0000000..302e916 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/class-use/ParsingOptions.html @@ -0,0 +1,192 @@ + + + + + + +Uses of Class org.raml.amf.parsers.ParsingOptions (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.parsers.ParsingOptions

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/class-use/RAMLParser.html b/doc/java/apidocs/org/raml/amf/parsers/class-use/RAMLParser.html new file mode 100644 index 0000000..998f593 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/class-use/RAMLParser.html @@ -0,0 +1,168 @@ + + + + + + +Uses of Class org.raml.amf.parsers.RAMLParser (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.parsers.RAMLParser

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/package-frame.html b/doc/java/apidocs/org/raml/amf/parsers/package-frame.html new file mode 100644 index 0000000..16b0640 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/package-frame.html @@ -0,0 +1,29 @@ + + + + + + +org.raml.amf.parsers (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

org.raml.amf.parsers

+ + + diff --git a/doc/java/apidocs/org/raml/amf/parsers/package-summary.html b/doc/java/apidocs/org/raml/amf/parsers/package-summary.html new file mode 100644 index 0000000..9305730 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/package-summary.html @@ -0,0 +1,187 @@ + + + + + + +org.raml.amf.parsers (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Package org.raml.amf.parsers

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    AMFJSONLDParser +
    Wrapper class for the AMF OWL model parser, processes AMF model specification JSON-LD documents and generate the DocumentModel out of them
    +
    BaseParser +
    Basic interface for all AMF parsers.
    +
    OpenAPIParser +
    Wrapper class for the AMF OpenAPI parser, processes OpenAPI specification documents and generate the DocumentModel out of them
    +
    ParsingOptions +
    Parsing options for parsing
    +
    RAMLParser +
    Wrapper class for the AMF RAML parser, processes RAML specification documents and generate the DocumentModel out of them
    +
    +
  • +
  • + + + + + + + + + + + + +
    Exception Summary 
    ExceptionDescription
    ParsingException +
    Exception produced while parsing an input syntax for the AMF parser
    +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/package-tree.html b/doc/java/apidocs/org/raml/amf/parsers/package-tree.html new file mode 100644 index 0000000..f307b1f --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/package-tree.html @@ -0,0 +1,159 @@ + + + + + + +org.raml.amf.parsers Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Hierarchy For Package org.raml.amf.parsers

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/parsers/package-use.html b/doc/java/apidocs/org/raml/amf/parsers/package-use.html new file mode 100644 index 0000000..f87bd2b --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/parsers/package-use.html @@ -0,0 +1,223 @@ + + + + + + +Uses of Package org.raml.amf.parsers (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Package
org.raml.amf.parsers

+
+
+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/utils/Clojure.html b/doc/java/apidocs/org/raml/amf/utils/Clojure.html new file mode 100644 index 0000000..a7f6a00 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/utils/Clojure.html @@ -0,0 +1,507 @@ + + + + + + +Clojure (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + + +
+
org.raml.amf.utils
+

Class Clojure

+
+
+ +
+
    +
  • +
    +
    +
    public class Clojure
    +extends Object
    +
    Clojure interop utilties. + Many of this utilities and this particular approach to interop is because of a bug related to core.async preventing + us to use aot compilation and the class that could have been generated in api-modeling-framework.core
    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Clojure

        +
        public Clojure()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        require

        +
        public static Object require(String nsName)
        +
      • +
      + + + +
        +
      • +

        var

        +
        public static clojure.lang.Var var(String nsName,
        +                                   String varName)
        +
        Looks up a var by name in the given namespace. + + The var can subsequently be invoked if it is a function.
        +
        +
        Parameters:
        +
        nsName -
        +
        varName -
        +
        Returns:
        +
        +
      • +
      + + + +
        +
      • +

        kw

        +
        public static clojure.lang.Keyword kw(String name)
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        list

        +
        public static clojure.lang.IPersistentVector list(List list)
        +
      • +
      + + + +
        +
      • +

        toJavaList

        +
        public static <T> List<T> toJavaList(List xs)
        +
      • +
      + + + +
        +
      • +

        map

        +
        public static clojure.lang.IPersistentMap map()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/utils/class-use/Clojure.html b/doc/java/apidocs/org/raml/amf/utils/class-use/Clojure.html new file mode 100644 index 0000000..f882675 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/utils/class-use/Clojure.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Class org.raml.amf.utils.Clojure (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Class
org.raml.amf.utils.Clojure

+
+
No usage of org.raml.amf.utils.Clojure
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/utils/package-frame.html b/doc/java/apidocs/org/raml/amf/utils/package-frame.html new file mode 100644 index 0000000..fc8e203 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/utils/package-frame.html @@ -0,0 +1,21 @@ + + + + + + +org.raml.amf.utils (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + +

org.raml.amf.utils

+
+

Classes

+ +
+ + diff --git a/doc/java/apidocs/org/raml/amf/utils/package-summary.html b/doc/java/apidocs/org/raml/amf/utils/package-summary.html new file mode 100644 index 0000000..ca2c5b2 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/utils/package-summary.html @@ -0,0 +1,146 @@ + + + + + + +org.raml.amf.utils (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Package org.raml.amf.utils

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Clojure +
    Clojure interop utilties.
    +
    +
  • +
+
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/utils/package-tree.html b/doc/java/apidocs/org/raml/amf/utils/package-tree.html new file mode 100644 index 0000000..4cee125 --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/utils/package-tree.html @@ -0,0 +1,139 @@ + + + + + + +org.raml.amf.utils Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Hierarchy For Package org.raml.amf.utils

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/org/raml/amf/utils/package-use.html b/doc/java/apidocs/org/raml/amf/utils/package-use.html new file mode 100644 index 0000000..a0e427e --- /dev/null +++ b/doc/java/apidocs/org/raml/amf/utils/package-use.html @@ -0,0 +1,126 @@ + + + + + + +Uses of Package org.raml.amf.utils (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + + + + +
+

Uses of Package
org.raml.amf.utils

+
+
No usage of org.raml.amf.utils
+ + + + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/overview-frame.html b/doc/java/apidocs/overview-frame.html new file mode 100644 index 0000000..50c0d10 --- /dev/null +++ b/doc/java/apidocs/overview-frame.html @@ -0,0 +1,30 @@ + + + + + + +Overview List (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + +

 

+ + diff --git a/doc/java/apidocs/overview-summary.html b/doc/java/apidocs/overview-summary.html new file mode 100644 index 0000000..21a8135 --- /dev/null +++ b/doc/java/apidocs/overview-summary.html @@ -0,0 +1,172 @@ + + + + + + +Overview (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + +
+ + + + + + + +
+ + +
+

api-modeling-framework java bindings 0.1.2-SNAPSHOT API

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages 
PackageDescription
org.raml.amf 
org.raml.amf.core 
org.raml.amf.core.document 
org.raml.amf.core.domain 
org.raml.amf.core.exceptions 
org.raml.amf.examples 
org.raml.amf.generators 
org.raml.amf.parsers 
org.raml.amf.utils 
+
+ +
+ + + + + + + +
+ + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/overview-tree.html b/doc/java/apidocs/overview-tree.html new file mode 100644 index 0000000..7e2a770 --- /dev/null +++ b/doc/java/apidocs/overview-tree.html @@ -0,0 +1,225 @@ + + + + + + +Class Hierarchy (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + +
+ + + + + + + +
+ + + +
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/package-list b/doc/java/apidocs/package-list new file mode 100644 index 0000000..c328859 --- /dev/null +++ b/doc/java/apidocs/package-list @@ -0,0 +1,9 @@ +org.raml.amf +org.raml.amf.core +org.raml.amf.core.document +org.raml.amf.core.domain +org.raml.amf.core.exceptions +org.raml.amf.examples +org.raml.amf.generators +org.raml.amf.parsers +org.raml.amf.utils diff --git a/doc/java/apidocs/script.js b/doc/java/apidocs/script.js new file mode 100644 index 0000000..b346356 --- /dev/null +++ b/doc/java/apidocs/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/doc/java/apidocs/serialized-form.html b/doc/java/apidocs/serialized-form.html new file mode 100644 index 0000000..dcd9fee --- /dev/null +++ b/doc/java/apidocs/serialized-form.html @@ -0,0 +1,191 @@ + + + + + + +Serialized Form (api-modeling-framework java bindings 0.1.2-SNAPSHOT API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Serialized Form

+
+
+ +
+ +
+ + + + + + + +
+ + +

Copyright © 2017. All rights reserved.

+ + diff --git a/doc/java/apidocs/stylesheet.css b/doc/java/apidocs/stylesheet.css new file mode 100644 index 0000000..98055b2 --- /dev/null +++ b/doc/java/apidocs/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/java/src/org/raml/amf/AMF.java b/java/src/org/raml/amf/AMF.java new file mode 100644 index 0000000..d29da76 --- /dev/null +++ b/java/src/org/raml/amf/AMF.java @@ -0,0 +1,66 @@ +package org.raml.amf; + +import org.raml.amf.generators.AMFJSONLDGenerator; +import org.raml.amf.generators.OpenAPIGenerator; +import org.raml.amf.generators.RAMLGenerator; +import org.raml.amf.parsers.AMFJSONLDParser; +import org.raml.amf.parsers.OpenAPIParser; +import org.raml.amf.parsers.RAMLParser; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Facade class providing access to the main IO facilities in the library + */ +public class AMF { + + /** + * Builds a RAML to AMF parser + * @return + */ + public static RAMLParser RAMLParser() { + return new RAMLParser(); + } + + /** + * Builds an OpenAPI to AMF parser + * @return + */ + public static OpenAPIParser OpenAPIParser() { + return new OpenAPIParser(); + } + + /** + * Builds a AMF encoded JSON-LD to AMF parser + * @return + */ + public static AMFJSONLDParser JSONLDParser() { + return new AMFJSONLDParser(); + } + + /** + * Builds a AMF to RAML generator + * @return + */ + public static RAMLGenerator RAMLGenerator() { + return new RAMLGenerator(); + } + + /** + * Builds a AMF to OpenAPI generator + * @return + */ + public static OpenAPIGenerator OpenAPIGenerator() { + return new OpenAPIGenerator(); + } + + /** + * Builds a AMF to JSON-LD generator + * @return + */ + public static AMFJSONLDGenerator JSONLDGenerator() { + return new AMFJSONLDGenerator(); + } +} diff --git a/java/src/org/raml/amf/core/Model.java b/java/src/org/raml/amf/core/Model.java new file mode 100644 index 0000000..cb427c5 --- /dev/null +++ b/java/src/org/raml/amf/core/Model.java @@ -0,0 +1,33 @@ +package org.raml.amf.core; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +/** + * Base class for all AMF parsed models, provides methods to inspect and manipulate the model + */ +public abstract class Model { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_CORE); + } + + protected Object rawModel; + + protected Model(Object rawModel) { + if (rawModel instanceof Exception) { + throw new InvalidModelException((Exception) rawModel); + } + this.rawModel = rawModel; + } + + /** + * Returns the raw Clojure data structure for this instance data + * @return + */ + public abstract Object clojureModel(); +} diff --git a/java/src/org/raml/amf/core/document/DeclaresDomainModel.java b/java/src/org/raml/amf/core/document/DeclaresDomainModel.java new file mode 100644 index 0000000..4c5d4e8 --- /dev/null +++ b/java/src/org/raml/amf/core/document/DeclaresDomainModel.java @@ -0,0 +1,16 @@ +package org.raml.amf.core.document; + +import org.raml.amf.core.domain.DomainModel; + +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ +public interface DeclaresDomainModel { + /** + * Declared DomainElements that can be re-used from other documents. + * @return List of domain elements. + */ + public List declares(); +} diff --git a/java/src/org/raml/amf/core/document/Document.java b/java/src/org/raml/amf/core/document/Document.java new file mode 100644 index 0000000..4a1fef3 --- /dev/null +++ b/java/src/org/raml/amf/core/document/Document.java @@ -0,0 +1,54 @@ +package org.raml.amf.core.document; + +import clojure.lang.IFn; +import org.raml.amf.core.domain.DomainModel; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * AMF Documents encode the main element of a description in a particular Domain Model + * For example, in RAML/HTTP, the main domain element is an APIDescription. + * + * Since AMF Documents encode Domain elements they behave like Fragments + * AMF Documents can also contains declarations of domain elements to be used in the description of the domain. + * From this point of view Documents also behave like Modules. + */ +public class Document extends DocumentModel implements EncodesDomainModel, DeclaresDomainModel { + public Document(Object rawModel) { + super(rawModel); + } + + /** + * Encoded domain element. It's considered to be the root element of a stand-alone description, not a domain element + * to be re-used and reference + * @return DomainElement encoded in the document. + * @throws InvalidModelException + */ + public DomainModel encodes() throws InvalidModelException { + IFn getFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_MODEL_DOCUMENT, "encodes"); + return DomainModel.fromRawModel(getFn.invoke(this.clojureModel())); + } + + /** + * List of domain elements declared in the document to be referenced in the encoded element. + * They are supposed to be private to the description and not meant to be re-used as in Modules. + * @return + */ + public List declares() { + IFn getFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_MODEL_DOCUMENT, "declares"); + List parsedElements = Clojure.toJavaList((List) getFn.invoke(this.clojureModel())); + ArrayList declared = new ArrayList<>(); + for(Object parsed : parsedElements) { + declared.add(DomainModel.fromRawModel(parsed)); + } + + return declared; + } +} diff --git a/java/src/org/raml/amf/core/document/DocumentModel.java b/java/src/org/raml/amf/core/document/DocumentModel.java new file mode 100644 index 0000000..f4f0d22 --- /dev/null +++ b/java/src/org/raml/amf/core/document/DocumentModel.java @@ -0,0 +1,187 @@ +package org.raml.amf.core.document; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +import api_modeling_framework.model.document.ParsedDocument; +import api_modeling_framework.model.document.ParsedFragment; +import api_modeling_framework.model.document.ParsedModule; +import clojure.lang.IFn; +import org.raml.amf.core.domain.DomainModel; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.core.Model; +import org.raml.amf.core.exceptions.ResolutionException; +import org.raml.amf.core.exceptions.UnknownModelReferenceException; +import org.raml.amf.utils.Clojure; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * AMF Document model that can be used to work with the graph of linked documents generated by the parser. + */ +public abstract class DocumentModel extends Model { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_CORE); + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOCUMENT); + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + DocumentModel(Object rawModel) throws InvalidModelException { + super(rawModel); + } + + private boolean resolved = false; + + /** + * Builds a new Model object for the referenced Document + * @param reference + * @return + * @throws MalformedURLException + * @throws InvalidModelException + * @throws UnknownModelReferenceException + */ + public DocumentModel modelForReference(URL reference) throws MalformedURLException, InvalidModelException, UnknownModelReferenceException { + IFn referenceModelFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "reference-model"); + URL[] refs = this.references(); + for(URL ref : refs) { + if (ref.sameFile(reference)) { + return DocumentModel.fromRawModel(referenceModelFn.invoke(this.rawModel, ref.toString().replace("file:",""))); + } + } + + throw new UnknownModelReferenceException(reference); + } + + + /** + * Returns the list document URIs referenced from the document that has been parsed to generate this model + * @return An array of URI locations for the remote documents + */ + public URL[] references() throws MalformedURLException { + IFn referencesFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "references"); + List references = (List) referencesFn.invoke(this.rawModel); + URL[] acc = new URL[references.size()]; + for (int i=0; i rawText() { + IFn rawFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "raw"); + String text = (String) rawFn.invoke(this.rawModel); + if (text != null) { + return Optional.of(text); + } else { + return Optional.empty(); + } + } + + + protected URL stringToURL(String location) throws MalformedURLException { + if (!location.contains("://")) { + return new URL("file://"+location); + } else { + return new URL(location); + } + } + + + /** + * Returns the native Clojure data structure for the model + * @return Clojure data structure encoding the model + */ + @Override + public Object clojureModel() { + IFn documentModelFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "document-model"); + return documentModelFn.invoke(this.rawModel); + } + + /** + * Factory method building the right wrapper Java DocumentModel subclass for the provided Clojure model data structure + * @param rawModel native Clojure encoded model + * @return The right DocumentModel + * @throws InvalidModelException + */ + public static DocumentModel fromRawModel(Object rawModel) throws InvalidModelException { + IFn unitKindFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "unit-kind"); + String unitKind = (String) unitKindFn.invoke(rawModel); + if (Objects.equals(unitKind, "module")) { + return new Module(rawModel); + } else if (Objects.equals(unitKind, "fragment")) { + return new Fragment(rawModel); + } else if (Objects.equals(unitKind, "document")) { + return new Document(rawModel); + } else { + throw new InvalidModelException(new Exception("Unknown type of document unit " + unitKind)); + } + } + + public DomainModel findDomainElement(String id) { + IFn findFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "find-element"); + Object res = findFn.invoke(this.rawModel, (isResolved() ? "domain": "document"), id); + if (res != null){ + Document doc = (Document) DocumentModel.fromRawModel(res); + return doc.encodes(); + } else { + return null; + } + } + + public boolean isResolved() { + return resolved; + } + + protected void setResolved(boolean resolved) { + this.resolved = resolved; + } +} diff --git a/java/src/org/raml/amf/core/document/EncodesDomainModel.java b/java/src/org/raml/amf/core/document/EncodesDomainModel.java new file mode 100644 index 0000000..f2e03d1 --- /dev/null +++ b/java/src/org/raml/amf/core/document/EncodesDomainModel.java @@ -0,0 +1,18 @@ +package org.raml.amf.core.document; + +import org.raml.amf.core.domain.DomainModel; +import org.raml.amf.core.exceptions.InvalidModelException; + +/** + * Created by antoniogarrote on 04/05/2017. + */ +public interface EncodesDomainModel { + + /** + * Encoded domain element described in the document element. + * @return DomainElement encoded in the document. + * @throws InvalidModelException + */ + public DomainModel encodes() throws InvalidModelException; + +} diff --git a/java/src/org/raml/amf/core/document/Fragment.java b/java/src/org/raml/amf/core/document/Fragment.java new file mode 100644 index 0000000..dea3431 --- /dev/null +++ b/java/src/org/raml/amf/core/document/Fragment.java @@ -0,0 +1,35 @@ +package org.raml.amf.core.document; + +import clojure.lang.IFn; +import clojure.lang.Keyword; +import org.raml.amf.core.domain.DomainModel; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * AMF Fragments encode a single DomainElement that can be referenced and re-used in other documents. + */ +public class Fragment extends DocumentModel implements EncodesDomainModel { + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_CORE); + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOCUMENT); + } + + public Fragment(Object rawModel) { + super(rawModel); + } + + /** + * Encoded Domain element that can referenced from other documents in the DocumentModel + * @return + * @throws InvalidModelException + */ + public DomainModel encodes() throws InvalidModelException { + IFn getFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_MODEL_DOCUMENT, "encodes"); + return DomainModel.fromRawModel(getFn.invoke(this.clojureModel())); + } +} diff --git a/java/src/org/raml/amf/core/document/Module.java b/java/src/org/raml/amf/core/document/Module.java new file mode 100644 index 0000000..135c00a --- /dev/null +++ b/java/src/org/raml/amf/core/document/Module.java @@ -0,0 +1,37 @@ +package org.raml.amf.core.document; + +import clojure.lang.IFn; +import org.raml.amf.core.domain.DomainModel; +import org.raml.amf.utils.Clojure; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * AMF Modules contains collections of DomainElements that can be re-used and referenced from other documents in the + * Documentmodel. + */ +public class Module extends DocumentModel implements DeclaresDomainModel { + public Module(Object rawModel) { + super(rawModel); + } + + /** + * Declared DomainElements that can be re-used from other documents. + * @return List of domain elements. + */ + public List declares() { + IFn getFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_MODEL_DOCUMENT, "declares"); + List parsedElements = Clojure.toJavaList((List) getFn.invoke(this.clojureModel())); + ArrayList declared = new ArrayList<>(); + for(Object parsed : parsedElements) { + declared.add(DomainModel.fromRawModel(parsed)); + } + + return declared; + } +} diff --git a/java/src/org/raml/amf/core/domain/APIDocumentation.java b/java/src/org/raml/amf/core/domain/APIDocumentation.java new file mode 100644 index 0000000..2e1ffb5 --- /dev/null +++ b/java/src/org/raml/amf/core/domain/APIDocumentation.java @@ -0,0 +1,136 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedAPIDocumentation; +import clojure.lang.IFn; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +import java.util.ArrayList; +import java.util.List; + + +/** + * Created by antoniogarrote on 04/05/2017. + */ + + +/** + * Main EntryPoint of the description of HTTP RPC API + */ +public class APIDocumentation extends DomainModel { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public APIDocumentation(ParsedAPIDocumentation rawModel) { + super(rawModel); + } + + /** + * Build a new empty API Documentation for the provided URI + * @param id + */ + public APIDocumentation(String id) { + super(Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN, + "api-modeling-framework.model.domain/map->ParsedAPIDocumentation" + ).invoke(Clojure.map()) + ); + this.setId(id); + } + + public String getTermsOfService() { + return (String) this.wrapped().terms_of_service(); + } + + public void setTermsOfService(String termsOfService) { + this.rawModel = Clojure.setKw(this.rawModel, "terms-of-service", termsOfService); + } + + public String getBasePath() { + Object res = this.wrapped().base_path(); + if (res != null) + return (String) res; + else + return null; + } + + public void setBasePath(String basePath) { + this.rawModel = Clojure.setKw(this.rawModel, "base-path", basePath); + } + + public String getHost() { + Object res = this.wrapped().host(); + if (res != null) + return (String) res; + else + return null; + } + + public void setHost(String host) { + this.rawModel = Clojure.setKw(this.rawModel, "host", host); + } + + /** + * URI Scheme for the paths in the API + * @return + */ + public String getScheme() { + Object res = this.wrapped().scheme(); + if (res != null) + return (String) res; + else + return null; + } + + public void setScheme(String scheme) { + this.rawModel = Clojure.setKw(this.rawModel, "scheme", scheme); + } + + public List getAccepts() { + return (List) this.wrapped().accepts(); + } + + public void setAccepts(List accepts) { + this.rawModel = Clojure.setKw(this.wrapped(), "accepts", Clojure.list(accepts)); + } + + public List getContentTypes() { + return (List) this.wrapped().content_type(); + } + + public void setContentTypes(List contentTypes) { + this.rawModel = Clojure.setKw(this.wrapped(), "content-type", Clojure.list(contentTypes)); + } + + /** + * List of EndPoints declared in this API + * @return + * @throws InvalidModelException + */ + public List getEndpoints() throws InvalidModelException { + List endpoints = (List) this.wrapped().endpoints(); + List tmp = Clojure.toJavaList(endpoints); + ArrayList eps = new ArrayList<>(); + for(api_modeling_framework.model.domain.ParsedEndPoint x : tmp) { + EndPoint parsed = new EndPoint(x); + eps.add(parsed); + } + + return eps; + } + + public void setEndPoints(List operations) { + ArrayList raws = new ArrayList<>(); + for(EndPoint x : operations) { + raws.add(x.clojureModel()); + } + + this.rawModel = Clojure.setKw(this.rawModel, "endpoints", Clojure.list(raws)); + } + + protected ParsedAPIDocumentation wrapped() { + return (ParsedAPIDocumentation) this.rawModel; + } +} diff --git a/java/src/org/raml/amf/core/domain/DomainModel.java b/java/src/org/raml/amf/core/domain/DomainModel.java new file mode 100644 index 0000000..8390657 --- /dev/null +++ b/java/src/org/raml/amf/core/domain/DomainModel.java @@ -0,0 +1,130 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.document.Node; +import api_modeling_framework.model.document.DocumentSourceMap; +import api_modeling_framework.model.domain.*; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.core.Model; +import org.raml.amf.utils.Clojure; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ +public class DomainModel extends Model { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public DomainModel(Object rawModel) { + super(rawModel); + } + + @Override + public Object clojureModel() { + return this.rawModel; + } + + public static DomainModel fromRawModel(Object rawModel) { + if (rawModel instanceof ParsedAPIDocumentation) { + return new APIDocumentation((ParsedAPIDocumentation) rawModel); + } else if (rawModel instanceof ParsedEndPoint) { + return new EndPoint((ParsedEndPoint) rawModel); + } else if (rawModel instanceof ParsedOperation) { + return new Operation((ParsedOperation) rawModel); + } else if (rawModel instanceof ParsedRequest) { + return new Request((ParsedRequest) rawModel); + } else if (rawModel instanceof ParsedResponse) { + return new Response((ParsedResponse) rawModel); + } else if (rawModel instanceof Payload) { + return new Payload((ParsedPayload) rawModel); + } else if (rawModel instanceof ParsedType) { + return new Type((ParsedType) rawModel); + } else { + throw new InvalidModelException(new Exception("Unknown DomainModel class " + rawModel)); + } + } + + public String getId() { + return (String) wrappedNode().id(); + } + + public String getName() { + return (String) wrappedNode().name(); + } + + public void setName(String name) { + this.rawModel = Clojure.setKw(this.rawModel, "name", name); + } + + public Boolean getAbstract() { + return (Boolean) Clojure.getKw(this.rawModel, "abstract") || false; + } + + public void setAbstract(Boolean abstractBool) { + this.rawModel = Clojure.setKw(this.rawModel, "abstract", abstractBool); + } + + public String getDescription() { + return (String) wrappedNode().name(); + } + + public void setDescription(String description) { + this.rawModel = Clojure.setKw(this.rawModel, "description", description); + } + + public List getSourceMaps() { + List operations = (List) this.wrappedNode().sources(); + List tmp = Clojure.toJavaList(operations); + ArrayList eps = new ArrayList<>(); + for(DocumentSourceMap x : tmp) { + SourceMap parsed = new SourceMap(x); + eps.add(parsed); + } + + return eps; + } + + public void setSourceMaps(List sourceMaps) { + ArrayList raws = new ArrayList<>(); + for(SourceMap x : sourceMaps) { + raws.add(x.clojureModel()); + } + + this.rawModel = Clojure.setKw(this.rawModel, "sources", Clojure.list(raws)); + } + + public List getExtends() { + List operations = (List) Clojure.getKw(this.rawModel, "extends"); + List tmp = Clojure.toJavaList(operations); + ArrayList eps = new ArrayList<>(); + for(Object x : tmp) { + eps.add(DomainModel.fromRawModel(x)); + } + + return eps; + } + + public void setExtends(List toExtend) { + ArrayList raws = new ArrayList<>(); + for(DomainModel x : toExtend) { + raws.add(x.clojureModel()); + } + + this.rawModel = Clojure.setKw(this.rawModel, "extends", Clojure.list(raws)); + } + + protected void setId(String id) { + this.rawModel = Clojure.setKw(this.rawModel, "id", id); + } + protected Node wrappedNode() { + return (Node) this.rawModel; + } + + public String toString() { + return (this.getId() + " :: " + super.toString()); + } +} diff --git a/java/src/org/raml/amf/core/domain/EndPoint.java b/java/src/org/raml/amf/core/domain/EndPoint.java new file mode 100644 index 0000000..08deb2a --- /dev/null +++ b/java/src/org/raml/amf/core/domain/EndPoint.java @@ -0,0 +1,82 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedEndPoint; +import api_modeling_framework.model.domain.ParsedOperation; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * EndPoints contains information about a HTTP remote location where a number of API operations have been bound + */ +public class EndPoint extends DomainModel { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public EndPoint(ParsedEndPoint rawModel) { + super(rawModel); + } + + /** + * Builds a new EndPoint for the provided URI + * @param id + */ + public EndPoint(String id) { + super(Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN, + "api-modeling-framework.model.domain/map->ParsedEndPoint" + ).invoke(Clojure.map()) + ); + this.setId(id); + } + + protected ParsedEndPoint wrapped() { + return (ParsedEndPoint) rawModel; + } + + /** + * Path for the URL where the operations of the EndPoint are bound + * @return + */ + public String getPath() { + return (String) this.wrapped().path(); + } + + public void setPath(String path) { + this.rawModel = Clojure.setKw(this.wrapped(), "path", path); + } + + /** + * List of API Operations bound to this EndPoint + * @return + */ + public List getSupportedOperations() { + List operations = (List) this.wrapped().supported_operations(); + List tmp = Clojure.toJavaList(operations); + ArrayList eps = new ArrayList<>(); + for(api_modeling_framework.model.domain.ParsedOperation x : tmp) { + Operation parsed = new Operation(x); + eps.add(parsed); + } + + return eps; + } + + public void setSupportedOperations(List operations) { + ArrayList raws = new ArrayList<>(); + for(Operation x : operations) { + raws.add(x.clojureModel()); + } + + this.rawModel = Clojure.setKw(this.rawModel, "supported-operations", Clojure.list(raws)); + } + +} diff --git a/java/src/org/raml/amf/core/domain/GenericOperationUnit.java b/java/src/org/raml/amf/core/domain/GenericOperationUnit.java new file mode 100644 index 0000000..d148bdc --- /dev/null +++ b/java/src/org/raml/amf/core/domain/GenericOperationUnit.java @@ -0,0 +1,86 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.HeadersHolder; +import api_modeling_framework.model.domain.PayloadHolder; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Base class for the Request and Response of an API + */ +public abstract class GenericOperationUnit extends DomainModel { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public GenericOperationUnit(Object rawModel) { + super(rawModel); + } + + /** + * List of HTTP headers in this unit + * @return + */ + public List
getHeaders() { + List headers = (List) this.headersHolder().headers(); + List tmp = Clojure.toJavaList(headers); + ArrayList
eps = new ArrayList<>(); + for(api_modeling_framework.model.domain.ParsedParameter x : tmp) { + Header parsed = new Header(x); + eps.add(parsed); + } + + return eps; + } + + public void setHeaders(List
headers) { + ArrayList raws = new ArrayList<>(); + for(Header x : headers) { + raws.add(x.clojureModel()); + } + + this.rawModel = Clojure.setKw(this.rawModel, "headers", Clojure.list(raws)); + } + + /** + * List of Payloads in the unit + * @return + */ + public List getPayloads() { + List payloads = (List) this.payloadHolder().payloads(); + List tmp = Clojure.toJavaList(payloads); + ArrayList eps = new ArrayList<>(); + for(api_modeling_framework.model.domain.ParsedPayload x : tmp) { + Payload parsed = new Payload(x); + eps.add(parsed); + } + + return eps; + } + + public void setPayloads(List payloads) { + ArrayList raws = new ArrayList<>(); + for(Payload x : payloads) { + raws.add(x.clojureModel()); + } + + this.rawModel = Clojure.setKw(this.rawModel, "payloads", Clojure.list(raws)); + } + + + private HeadersHolder headersHolder() { + return (HeadersHolder) this.rawModel; + } + + private PayloadHolder payloadHolder() { + return (PayloadHolder) this.rawModel; + } +} diff --git a/java/src/org/raml/amf/core/domain/GenericParameter.java b/java/src/org/raml/amf/core/domain/GenericParameter.java new file mode 100644 index 0000000..21b6969 --- /dev/null +++ b/java/src/org/raml/amf/core/domain/GenericParameter.java @@ -0,0 +1,52 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedParameter; +import api_modeling_framework.model.domain.ParsedType; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + + +/** + * Parameters include all kind of input or output information that is requested or returned by an API Operation that + * are not encoded in the Request or Response payloads. + * Parameters can be located in HTTP headers or in the domain, path or arguments of the request URL. + */ +public abstract class GenericParameter extends DomainModel { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public GenericParameter(ParsedParameter rawModel) { + super(rawModel); + } + + public Boolean getRequired() { + return (Boolean) this.wrapped().required(); + } + + public void setRequired(Boolean required) { + this.rawModel = Clojure.setKw(this.rawModel, "required", required); + } + + public Type getSchema() { + ParsedType type = (ParsedType) this.wrapped().shape(); + return new Type(type); + } + + protected void setParameterKindInternal(String parameterKind) { + this.rawModel = Clojure.setKw(this.rawModel, "parameter-kind", parameterKind); + } + + public void setSchema(Type type) { + this.rawModel = Clojure.setKw(this.wrapped(), "shape", type.clojureModel()); + } + + protected ParsedParameter wrapped() { + return (ParsedParameter) this.rawModel; + } +} diff --git a/java/src/org/raml/amf/core/domain/GenericTag.java b/java/src/org/raml/amf/core/domain/GenericTag.java new file mode 100644 index 0000000..58378d5 --- /dev/null +++ b/java/src/org/raml/amf/core/domain/GenericTag.java @@ -0,0 +1,61 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.document.Tag; +import org.raml.amf.utils.Clojure; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Tag included in a SourceMap + * Tags are tuples with an identifier, describing the kind of information in the mapping and an arbitrary value. + * Tags are also elements of the model, so they also have an associated URI. + */ +public class GenericTag extends DomainModel { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public GenericTag(Object rawModel) { + super(rawModel); + } + + public GenericTag(String id, Object value) { + super(Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOCUMENT, + "api-modeling-framework.model.document/->APITagTag" + ).invoke(id, value) + ); + } + + public GenericTag(String id, String tagId, Object value) { + super(Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOCUMENT, + "api-modeling-framework.model.document/->APITagTag" + ).invoke(id, value) + ); + this.setTagId(tagId); + } + + public String getTagId() { + return (String) this.wrapped().tag_id(); + } + + public void setTagId(String tagId) { + this.rawModel = Clojure.setKw(this.rawModel, "tag-id", tagId); + } + + public Object getValue() { + return this.wrapped().value(); + } + + public void setValue(Object value) { + this.rawModel = Clojure.setKw(this.rawModel, "value", value); + } + + protected Tag wrapped() { + return (Tag) rawModel; + } +} diff --git a/java/src/org/raml/amf/core/domain/Header.java b/java/src/org/raml/amf/core/domain/Header.java new file mode 100644 index 0000000..5ec9300 --- /dev/null +++ b/java/src/org/raml/amf/core/domain/Header.java @@ -0,0 +1,30 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedParameter; +import org.raml.amf.utils.Clojure; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + + +public class Header extends GenericParameter { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public Header(ParsedParameter rawModel) { + super(rawModel); + } + + public Header(String id) { + super((ParsedParameter) Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN, + "api-modeling-framework.model.domain/map->ParsedParameter" + ).invoke(Clojure.map()) + ); + this.setId(id); + this.setParameterKindInternal("header"); + } +} diff --git a/java/src/org/raml/amf/core/domain/Operation.java b/java/src/org/raml/amf/core/domain/Operation.java new file mode 100644 index 0000000..e09f36a --- /dev/null +++ b/java/src/org/raml/amf/core/domain/Operation.java @@ -0,0 +1,144 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedOperation; +import api_modeling_framework.model.domain.ParsedRequest; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * A unit of business logic exposed by the API. Operations can be invoked using the associated HTTP method. + */ +public class Operation extends DomainModel { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public Operation(api_modeling_framework.model.domain.ParsedOperation rawModel) throws InvalidModelException { + super(rawModel); + } + + /** + * Builds a new empty Operation with the provide URI + * @param id + */ + public Operation(String id) { + super(Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN, + "api-modeling-framework.model.domain/map->ParsedOperation" + ).invoke(Clojure.map()) + ); + this.setId(id); + } + + /** + * HTTP method that must be used to invoke the Operation + * @return + */ + public String getMethod() { + Object res = this.wrapped().method(); + if (res != null) { + return (String) res; + } else { + return null; + } + } + + public void setMethod(String method) { + this.rawModel = Clojure.setKw(this.wrapped(), "method", method); + } + + /** + * HTTP scheme that must be used to invoke the operation, overrides the default in APIDocumentation + * @return + */ + public String getScheme() { + Object res = this.wrapped().scheme(); + if (res != null) { + return (String) res; + } else { + return null; + } + } + + public void setScheme(String scheme) { + this.rawModel = Clojure.setKw(this.rawModel, "scheme", scheme); + } + + /** + * HTTP media-types accepted by the operation, overrides the default in APIDocumentation + */ + public List getAccepts() { + return (List) this.wrapped().accepts(); + } + + public void setAccepts(List accepts) { + this.rawModel = Clojure.setKw(this.wrapped(), "accepts", Clojure.list(accepts)); + } + + /** + * HTTP media-types returned by the operation, overrides the default in APIDocumentation + */ + public List getContentTypes() { + return (List) this.wrapped().content_type(); + } + + public void setContentTypes(List contentTypes) { + this.rawModel = Clojure.setKw(this.wrapped(), "content-type", Clojure.list(contentTypes)); + } + + /** + * List of responses for different HTTP status codes supported by this operation + * @return + */ + public List getResponses() { + List responses = (List) this.wrapped().responses(); + List tmp = Clojure.toJavaList(responses); + ArrayList eps = new ArrayList<>(); + for(api_modeling_framework.model.domain.ParsedResponse x : tmp) { + Response parsed = new Response(x); + eps.add(parsed); + } + + return eps; + } + + public void setResponses(List responses) { + ArrayList raws = new ArrayList<>(); + for(Operation x : responses) { + raws.add(x.clojureModel()); + } + + this.rawModel = Clojure.setKw(this.wrapped(), "responses", Clojure.list(raws)); + } + + /** + * Request information for the operation + * @return + */ + public Request getRequest() { + Object res = this.wrapped().request(); + if (res != null) { + ParsedRequest request = (ParsedRequest) res; + return new Request(request); + } else { + return null; + } + } + + public void setRequest(Request request) { + this.rawModel = Clojure.setKw(this.wrapped(), "request", request.clojureModel()); + } + + private ParsedOperation wrapped() { + return (ParsedOperation) this.rawModel; + } + +} diff --git a/java/src/org/raml/amf/core/domain/Parameter.java b/java/src/org/raml/amf/core/domain/Parameter.java new file mode 100644 index 0000000..e74cbef --- /dev/null +++ b/java/src/org/raml/amf/core/domain/Parameter.java @@ -0,0 +1,47 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedParameter; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +/** + * Created by antoniogarrote on 04/05/2017. + */ +public class Parameter extends GenericParameter { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public Parameter(ParsedParameter rawModel) { + super(rawModel); + } + + public Parameter(String id, String parameterKind) { + super((ParsedParameter) Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN, + "api-modeling-framework.model.domain/map->ParsedParameter" + ).invoke(Clojure.map()) + ); + this.setId(id); + this.setParameterKindInternal(parameterKind); + } + + protected void setParameterKind(String parameterKind) { + setParameterKindInternal(parameterKind); + } + + public String getParameterKind() { + Object res = this.wrapped().parameter_kind(); + if (res != null) { + return (String) res; + } else { + return null; + } + } + + + protected ParsedParameter wrapped() { + return (ParsedParameter) this.rawModel; + } +} diff --git a/java/src/org/raml/amf/core/domain/Payload.java b/java/src/org/raml/amf/core/domain/Payload.java new file mode 100644 index 0000000..4e840c2 --- /dev/null +++ b/java/src/org/raml/amf/core/domain/Payload.java @@ -0,0 +1,58 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedPayload; +import api_modeling_framework.model.domain.ParsedType; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Schema information for a Payload associated to a particular media-type + */ +public class Payload extends DomainModel { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public Payload(ParsedPayload rawModel) { + super(rawModel); + } + + public Payload(String id) { + super(Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN, + "api-modeling-framework.model.domain/map->ParsedPayload" + ).invoke(Clojure.map()) + ); + this.setId(id); + } + + public String getMediaType() { + return (String) this.wrapped().media_type(); + } + + public void setMediaType(String mediaType) { + this.rawModel = Clojure.setKw(this.rawModel, "media-type", mediaType); + } + + /** + * Schema information for the payload + * @return + */ + public Type getSchema() { + ParsedType type = (ParsedType) this.wrapped().schema(); + return new Type(type); + } + + public void setSchema(Type type) { + this.rawModel = Clojure.setKw(this.wrapped(), "schema", type.clojureModel()); + } + + private ParsedPayload wrapped() { + return (ParsedPayload) this.rawModel; + } +} diff --git a/java/src/org/raml/amf/core/domain/Request.java b/java/src/org/raml/amf/core/domain/Request.java new file mode 100644 index 0000000..a58ce6e --- /dev/null +++ b/java/src/org/raml/amf/core/domain/Request.java @@ -0,0 +1,59 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedRequest; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + + +public class Request extends GenericOperationUnit { + + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public Request(ParsedRequest request) throws InvalidModelException { + super(request); + } + + public Request(String id) { + super(Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN, + "api-modeling-framework.model.domain/map->ParsedRequest" + ).invoke(Clojure.map()) + ); + this.setId(id); + } + + public List getParameters() { + List parameters = (List) this.wrapped().parameters(); + List tmp = Clojure.toJavaList(parameters); + ArrayList eps = new ArrayList<>(); + for(api_modeling_framework.model.domain.ParsedParameter x : tmp) { + Parameter parsed = new Parameter(x); + eps.add(parsed); + } + + return eps; + } + + public void setParameters(List parameters) { + ArrayList raws = new ArrayList<>(); + for(Parameter x : parameters) { + raws.add(x.clojureModel()); + } + + this.rawModel = Clojure.setKw(this.rawModel, "parameters", Clojure.list(raws)); + } + + private ParsedRequest wrapped() { + return (ParsedRequest) this.rawModel; + } + +} diff --git a/java/src/org/raml/amf/core/domain/Response.java b/java/src/org/raml/amf/core/domain/Response.java new file mode 100644 index 0000000..21f3c8e --- /dev/null +++ b/java/src/org/raml/amf/core/domain/Response.java @@ -0,0 +1,52 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedResponse; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + + +/** + * Information about the response returned by an operation, associated to a particular status + */ +public class Response extends GenericOperationUnit { + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public Response(ParsedResponse rawModel) { + super(rawModel); + } + + public Response(String id) { + super(Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN, + "api-modeling-framework.model.domain/map->ParsedResponse" + ).invoke(Clojure.map()) + ); + this.setId(id); + } + + /** + * Status code for the response + * @return + */ + public String getStatusCode() { + String code = (String) this.wrapped().status_code(); + if (code != null) + return code; + else + return null; + } + + public void setStatusCode(String status) { + this.rawModel = Clojure.setKw(this.wrapped(), "status-code", status); + } + + private ParsedResponse wrapped() { + return (ParsedResponse) this.rawModel; + } +} diff --git a/java/src/org/raml/amf/core/domain/SourceMap.java b/java/src/org/raml/amf/core/domain/SourceMap.java new file mode 100644 index 0000000..2b4a769 --- /dev/null +++ b/java/src/org/raml/amf/core/domain/SourceMap.java @@ -0,0 +1,54 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.document.DocumentSourceMap; +import api_modeling_framework.model.document.Tag; +import org.raml.amf.utils.Clojure; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + + +public class SourceMap extends DomainModel { + + public SourceMap(DocumentSourceMap rawModel) { + super(rawModel); + } + + protected DocumentSourceMap wrapped() { + return (DocumentSourceMap) this.rawModel; + } + + public String getSource() { + return (String) this.wrapped().source(); + } + + public void setSource(String source) { + this.rawModel = Clojure.setKw(this.rawModel, "source", source); + } + + public List getTags() { + List operations = (List) this.wrapped().tags(); + List tmp = Clojure.toJavaList(operations); + ArrayList eps = new ArrayList<>(); + for(Tag x : tmp) { + GenericTag parsed = new GenericTag(x); + eps.add(parsed); + } + + return eps; + } + + public void setTags(List tags) { + ArrayList raws = new ArrayList<>(); + for(GenericTag x : tags) { + raws.add(x.clojureModel()); + } + + this.rawModel = Clojure.setKw(this.rawModel, "tags", Clojure.list(raws)); + } + +} diff --git a/java/src/org/raml/amf/core/domain/Type.java b/java/src/org/raml/amf/core/domain/Type.java new file mode 100644 index 0000000..3ad54c6 --- /dev/null +++ b/java/src/org/raml/amf/core/domain/Type.java @@ -0,0 +1,54 @@ +package org.raml.amf.core.domain; + +import api_modeling_framework.model.domain.ParsedType; +import clojure.lang.IFn; +import org.raml.amf.utils.Clojure; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Data Shape that describing a set of constraints over an operation unit payload + */ +public class Type extends DomainModel { + static { + Clojure.require(Clojure.CHESHIRE_CORE); + Clojure.require(Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN); + } + + public Type(Object rawModel) { + super(rawModel); + } + + public Type(String id) { + super(Clojure.var( + Clojure.API_MODELING_FRAMEWORK_MODEL_DOMAIN, + "api-modeling-framework.model.domain/map->ParsedType" + ).invoke(Clojure.map()) + ); + this.setId(id); + } + + /** + * JSON-LD string containing a SHACL shape that can be used to validate payloads for this operation unit + * @return + */ + public String getShape() { + IFn generateStringFn = Clojure.var(Clojure.CHESHIRE_CORE, "generate-string"); + return (String) generateStringFn.invoke(this.wrapped().shape()); + } + + /** + * Sets the SHACL shape for the payloads of this operation unit + * @param shaclShape valid SHACL shape encoded as JSON-LD string + */ + public void setShape(String shaclShape) { + IFn parseStringFn = Clojure.var(Clojure.CHESHIRE_CORE, "parse-string"); + this.rawModel = Clojure.setKw(this.rawModel, "shape", parseStringFn.invoke(shaclShape)); + } + + public ParsedType wrapped() { + return (ParsedType) this.rawModel; + } +} diff --git a/java/src/org/raml/amf/core/exceptions/InvalidModelException.java b/java/src/org/raml/amf/core/exceptions/InvalidModelException.java new file mode 100644 index 0000000..da99ed7 --- /dev/null +++ b/java/src/org/raml/amf/core/exceptions/InvalidModelException.java @@ -0,0 +1,15 @@ +package org.raml.amf.core.exceptions; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Exception related to a native clojure model that is not matching the expected value + */ +public class InvalidModelException extends RuntimeException { + + public InvalidModelException(Exception ex) { + super(ex); + } +} diff --git a/java/src/org/raml/amf/core/exceptions/ResolutionException.java b/java/src/org/raml/amf/core/exceptions/ResolutionException.java new file mode 100644 index 0000000..e54e660 --- /dev/null +++ b/java/src/org/raml/amf/core/exceptions/ResolutionException.java @@ -0,0 +1,19 @@ +package org.raml.amf.core.exceptions; + +import org.raml.amf.core.document.DocumentModel; + +/** + * Created by antoniogarrote on 04/05/2017. + */ +public class ResolutionException extends Exception { + private final DocumentModel model; + + public ResolutionException(DocumentModel model, Exception ex) { + super("Error resolving model", ex); + this.model = model; + } + + public DocumentModel getModel() { + return model; + } +} diff --git a/java/src/org/raml/amf/core/exceptions/UnknownModelReferenceException.java b/java/src/org/raml/amf/core/exceptions/UnknownModelReferenceException.java new file mode 100644 index 0000000..941c6de --- /dev/null +++ b/java/src/org/raml/amf/core/exceptions/UnknownModelReferenceException.java @@ -0,0 +1,23 @@ +package org.raml.amf.core.exceptions; + +import java.net.URL; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Exception due to a reference to an unknown model + */ +public class UnknownModelReferenceException extends Exception { + private URL uknownReference; + + public UnknownModelReferenceException(URL reference) { + super("Cannot find model with reference " + reference.toString()); + this.uknownReference = reference; + } + + public URL getUknownReference() { + return uknownReference; + } +} diff --git a/java/src/org/raml/amf/examples/BasicParsingAndNavigation.java b/java/src/org/raml/amf/examples/BasicParsingAndNavigation.java new file mode 100644 index 0000000..e7b6365 --- /dev/null +++ b/java/src/org/raml/amf/examples/BasicParsingAndNavigation.java @@ -0,0 +1,110 @@ +package org.raml.amf.examples; + +import org.raml.amf.AMF; +import org.raml.amf.core.document.Document; +import org.raml.amf.core.document.DocumentModel; +import org.raml.amf.core.document.EncodesDomainModel; +import org.raml.amf.core.document.Module; +import org.raml.amf.core.domain.APIDocumentation; +import org.raml.amf.core.domain.DomainModel; +import org.raml.amf.core.domain.EndPoint; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.core.exceptions.ResolutionException; +import org.raml.amf.core.exceptions.UnknownModelReferenceException; +import org.raml.amf.generators.*; +import org.raml.amf.parsers.ParsingException; +import org.raml.amf.parsers.ParsingOptions; +import org.raml.amf.parsers.RAMLParser; + +import java.io.File; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.file.Path; +import java.util.HashMap; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ +public class BasicParsingAndNavigation { + + public static void main(String[] args) throws MalformedURLException, ParsingException, InvalidModelException, UnknownModelReferenceException, GenerationException, ResolutionException { + + URL toParse = new URL("file:///Users/antoniogarrote/Development/api-modelling-framework/resources/other-examples/world-music-api/api.raml"); + // Model model = new RAMLParser().parseFile(); + HashMap cacheDirs = new HashMap<>(); + cacheDirs.put("http://test.com/something","/Users/antoniogarrote/Development/api-modelling-framework/resources/other-examples/world-music-api"); + ParsingOptions options = new ParsingOptions().setCacheDirs(cacheDirs); + Document model = (Document) AMF.RAMLParser().parseFile(new URL("http://test.com/something/api.raml"), options); + System.out.println("GOT A MODEL"); + System.out.println(model); + + System.out.println("LOCATION: " + model.location()); + for (URL ref : model.references()) { + System.out.println("REFERENCE: " + ref); + } + + + toParse = new URL("file:///Users/antoniogarrote/Development/api-modelling-framework/resources/other-examples/world-music-api/api.raml"); + model = (Document) new RAMLParser().parseFile(toParse); + System.out.println("GOT A MODEL"); + System.out.println(model); + + DocumentModel resolvedModel = model.resolve(); + System.out.println("RESOLVED"); + System.out.println(AMF.RAMLGenerator().generateString(resolvedModel)); + + System.out.println("LOCATION: " + model.location()); + for (URL ref : model.references()) { + System.out.println("REFERENCE: " + ref); + } + + System.out.println(model.rawText().get()); + + URL targetRef = model.references()[1]; + System.out.println("TARGETTING " + targetRef); + DocumentModel targetModel = model.modelForReference(targetRef); + System.out.println("TARGET LOCATION: " + targetModel.location()); + System.out.println("TARGET MODEL CLASS " + targetModel.getClass()); + List declarations = ((Module) targetModel).declares(); + System.out.println("DECLARATIONS:"); + for(DomainModel decl : declarations) { + System.out.println(decl); + } + + Object foundModel = targetModel.findDomainElement("/Users/antoniogarrote/Development/api-modelling-framework/resources/other-examples/world-music-api/libraries/api.lib.raml#/definitions/Cat"); + System.out.println("FOUND?"); + System.out.println(foundModel); + + APIDocumentation api = (APIDocumentation) model.encodes(); + + System.out.println("API DOCUMENTATION " + api); + + System.out.println("ENDPOINTS " + api.getEndpoints()); + for (EndPoint endpoint : api.getEndpoints()) { + endpoint.setName("Modified " + endpoint.getName()); + System.out.println(endpoint.getName()); + } + + String generated = AMF.OpenAPIGenerator().generateString(targetModel); + System.out.println("GENERATED OpenAPI"); + System.out.println(generated); + + generated = AMF.RAMLGenerator().generateString( + new File("world_music.raml"), + targetModel + ); + System.out.println("GENERATED RAML"); + System.out.println(generated); + + generated = AMF.JSONLDGenerator().generateString( + new File("world_music.jsonld"), + targetModel, + new GenerationOptions() + .setFullgraph(true) + .setSourceMapGeneration(true) + ); + System.out.println("GENERATED JSONLD"); + System.out.println(generated); + } +} diff --git a/java/src/org/raml/amf/generators/AMFJSONLDGenerator.java b/java/src/org/raml/amf/generators/AMFJSONLDGenerator.java new file mode 100644 index 0000000..58fabc2 --- /dev/null +++ b/java/src/org/raml/amf/generators/AMFJSONLDGenerator.java @@ -0,0 +1,14 @@ +package org.raml.amf.generators; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + + +public class AMFJSONLDGenerator extends BaseGenerator { + + @Override + protected String generatorConstructor() { + return "->APIModelGenerator"; + } +} diff --git a/java/src/org/raml/amf/generators/BaseGenerator.java b/java/src/org/raml/amf/generators/BaseGenerator.java new file mode 100644 index 0000000..c6540d9 --- /dev/null +++ b/java/src/org/raml/amf/generators/BaseGenerator.java @@ -0,0 +1,102 @@ +package org.raml.amf.generators; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +import clojure.lang.IFn; +import org.raml.amf.core.document.DocumentModel; +import org.raml.amf.utils.Clojure; + +import java.io.File; +import java.net.MalformedURLException; + +/** + * Basic interface for all AMF generators. It allows to generate syntax files out of AMF Document Models. + */ +public abstract class BaseGenerator { + static { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_CORE); + } + + /** + * Serialises the model and stores it in the provided file path and options + * @param path Path where the model will be serialised + * @param model DocumentModel to be serialised + */ + public void generateFile(File path, DocumentModel model, GenerationOptions options) throws GenerationException { + String location = path.getAbsolutePath().toString(); + IFn parserFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, generatorConstructor()); + Object generator = parserFn.invoke(); + IFn parseFileSync = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "generate-file-sync"); + try { + Object result = parseFileSync.invoke(generator, location, model.clojureModel(), options.build()); + if (result instanceof Exception) { + throw new GenerationException((Exception) result); + } + + } catch (RuntimeException e) { + throw new GenerationException(e); + } + } + + /** + * Serialises the model and stores it in the provided file path. + * @param path + * @param model + * @throws GenerationException + */ + public void generateFile(File path, DocumentModel model) throws GenerationException { + generateFile(path, model, new GenerationOptions()); + } + + /** + * Serialises the model and uses the provided file path as the default model location, applying the provided options + * @param path Path where the model will be serialised + * @param model DocumentModel to be serialised + */ + public String generateString(File path, DocumentModel model, GenerationOptions options) throws GenerationException { + return generateStringInternal(path.getAbsolutePath().toString(), model, options); + } + + /** + * Serialises the model and stores it in the using the privded file path as the model location + * @param path + * @param model + * @throws GenerationException + */ + public String generateString(File path, DocumentModel model) throws GenerationException { + return generateString(path, model, new GenerationOptions()); + } + + /** + * Serialises the model using the default location stored in the model + * @param model + * @throws GenerationException + */ + public String generateString(DocumentModel model) throws GenerationException { + try { + return generateStringInternal(model.location().toString(), model, new GenerationOptions()); + } catch (MalformedURLException ex) { + throw new GenerationException(ex); + } + } + + protected String generateStringInternal(String location, DocumentModel model, GenerationOptions options) throws GenerationException { + IFn parserFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, generatorConstructor()); + Object generator = parserFn.invoke(); + IFn parseFileSync = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "generate-string-sync"); + try { + Object result = parseFileSync.invoke(generator, location, model.clojureModel(), options.build()); + if (result instanceof Exception) { + throw new GenerationException((Exception) result); + } else { + return (String) result; + } + + } catch (RuntimeException e) { + throw new GenerationException(e); + } + } + protected abstract String generatorConstructor(); +} diff --git a/java/src/org/raml/amf/generators/GenerationException.java b/java/src/org/raml/amf/generators/GenerationException.java new file mode 100644 index 0000000..3817d26 --- /dev/null +++ b/java/src/org/raml/amf/generators/GenerationException.java @@ -0,0 +1,11 @@ +package org.raml.amf.generators; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +public class GenerationException extends Throwable { + public GenerationException(Exception rawModel) { + super(rawModel); + } +} diff --git a/java/src/org/raml/amf/generators/GenerationOptions.java b/java/src/org/raml/amf/generators/GenerationOptions.java new file mode 100644 index 0000000..440e64c --- /dev/null +++ b/java/src/org/raml/amf/generators/GenerationOptions.java @@ -0,0 +1,47 @@ +package org.raml.amf.generators; + +import clojure.lang.IPersistentMap; +import clojure.lang.PersistentHashMap; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + + +public class GenerationOptions { + + private Boolean generateSourceMaps; + private Boolean generateFullGraph; + + /** + * When serialising to JSON-LD, enables or disables the generation of source-maps + * @param shouldGenerate + */ + public GenerationOptions setSourceMapGeneration(Boolean shouldGenerate) { + this.generateSourceMaps = shouldGenerate; + return this; + } + + /** + * When serialising into JSON-LD, if set to true, all the JSON-LD RDF graph for referenced documents will be nested inside + * the JSON-LD document of the model. + * If set to false, only the URI will be serialised + * @param shouldGenerateFullGraph + */ + public GenerationOptions setFullgraph(Boolean shouldGenerateFullGraph) { + this.generateFullGraph = shouldGenerateFullGraph; + return this; + } + + public IPersistentMap build() { + IPersistentMap options = PersistentHashMap.EMPTY; + if (this.generateSourceMaps != null) { + options = options.assoc("source-maps?", this.generateSourceMaps); + } + if (this.generateFullGraph != null) { + options = options.assoc("full-graph?", this.generateSourceMaps); + } + + return options; + } +} diff --git a/java/src/org/raml/amf/generators/OpenAPIGenerator.java b/java/src/org/raml/amf/generators/OpenAPIGenerator.java new file mode 100644 index 0000000..97973fa --- /dev/null +++ b/java/src/org/raml/amf/generators/OpenAPIGenerator.java @@ -0,0 +1,14 @@ +package org.raml.amf.generators; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + + +public class OpenAPIGenerator extends BaseGenerator { + + @Override + protected String generatorConstructor() { + return "->OpenAPIGenerator"; + } +} diff --git a/java/src/org/raml/amf/generators/RAMLGenerator.java b/java/src/org/raml/amf/generators/RAMLGenerator.java new file mode 100644 index 0000000..5ade444 --- /dev/null +++ b/java/src/org/raml/amf/generators/RAMLGenerator.java @@ -0,0 +1,13 @@ +package org.raml.amf.generators; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +public class RAMLGenerator extends BaseGenerator { + + @Override + protected String generatorConstructor() { + return "->RAMLGenerator"; + } +} diff --git a/java/src/org/raml/amf/parsers/AMFJSONLDParser.java b/java/src/org/raml/amf/parsers/AMFJSONLDParser.java new file mode 100644 index 0000000..c87d937 --- /dev/null +++ b/java/src/org/raml/amf/parsers/AMFJSONLDParser.java @@ -0,0 +1,16 @@ +package org.raml.amf.parsers; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Wrapper class for the AMF OWL model parser, processes AMF model specification JSON-LD documents and generate the DocumentModel out of them + */ +public class AMFJSONLDParser extends BaseParser { + + @Override + protected String parserConstructor() { + return "->APIModelParser"; + } +} diff --git a/java/src/org/raml/amf/parsers/BaseParser.java b/java/src/org/raml/amf/parsers/BaseParser.java new file mode 100644 index 0000000..9267652 --- /dev/null +++ b/java/src/org/raml/amf/parsers/BaseParser.java @@ -0,0 +1,113 @@ +package org.raml.amf.parsers; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +import clojure.lang.IFn; +import org.raml.amf.core.document.DocumentModel; +import org.raml.amf.core.exceptions.InvalidModelException; +import org.raml.amf.utils.Clojure; + +import java.net.URL; + +/** + * Basic interface for all AMF parsers. It allows to parse syntax files and syntax text and generate the AMF Model out + * of it. + */ +public abstract class BaseParser { + + /** + * Generates a model parsing the file referenced by the provided URL. + * @param url Local or remote URL + * @return The parsed model + * @throws ParsingException + */ + public DocumentModel parseFile(URL url) throws ParsingException, InvalidModelException { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_CORE); + IFn parserFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, parserConstructor()); + Object parser = parserFn.invoke(); + IFn parseFileSync = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "parse-file-sync"); + try { + Object rawModel = parseFileSync.invoke(parser, url.toString().replace("file:","")); + if (rawModel instanceof Exception) { + throw new ParsingException((Exception) rawModel); + } + return DocumentModel.fromRawModel(rawModel); + } catch (RuntimeException e) { + throw new ParsingException(e); + } + } + + /** + * Generates a model parsing the file referenced by the provided URL and parsing options. + * @param url Local or remote URL + * @param options Parsing options + * @return The parsed model + * @throws ParsingException + */ + public DocumentModel parseFile(URL url, ParsingOptions options) throws ParsingException, InvalidModelException { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_CORE); + IFn parserFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, parserConstructor()); + Object parser = parserFn.invoke(); + IFn parseFileSync = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "parse-file-sync"); + try { + Object rawModel = parseFileSync.invoke(parser, url.toString().replace("file:",""), options.build()); + if (rawModel instanceof Exception) { + throw new ParsingException((Exception) rawModel); + } + return DocumentModel.fromRawModel(rawModel); + } catch (RuntimeException e) { + throw new ParsingException(e); + } + } + + protected abstract String parserConstructor(); + + /** + * Generates a model parsing the provided textual input syntax. + * @param text Input syntax to parse + * @param url Base URL for the document being parsed. It will be the base URL for the inclusions in this file + * @return The parsed Model + * @throws ParsingException + */ + public DocumentModel parseString(String text, URL url) throws ParsingException { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_CORE); + IFn parserFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, parserConstructor()); + Object parser = parserFn.invoke(); + IFn parseFileSync = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "parse-string-sync"); + try { + Object rawModel = parseFileSync.invoke(parser, url.toString().replace("file:",""), text); + if (rawModel instanceof Exception) { + throw new ParsingException((Exception) rawModel); + } + return DocumentModel.fromRawModel(rawModel); + } catch (RuntimeException e) { + throw new ParsingException(e); + } + } + + /** + * Generates a model parsing the provided textual input syntax and parsing options. + * @param text Input syntax to parse + * @param url Base URL for the document being parsed. It will be the base URL for the inclusions in this file + * @param options Parsing options + * @return The parsed Model + * @throws ParsingException + */ + public DocumentModel parseFile(String text, URL url, ParsingOptions options) throws ParsingException { + Clojure.require(Clojure.API_MODELING_FRAMEWORK_CORE); + IFn parserFn = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, parserConstructor()); + Object parser = parserFn.invoke(); + IFn parseFileSync = Clojure.var(Clojure.API_MODELING_FRAMEWORK_CORE, "parse-string-sync"); + try { + Object rawModel = parseFileSync.invoke(parser, url.toString().replace("file:",""), text, options.build()); + if (rawModel instanceof Exception) { + throw new ParsingException((Exception) rawModel); + } + return DocumentModel.fromRawModel(rawModel); + } catch (RuntimeException e) { + throw new ParsingException(e); + } + } +} diff --git a/java/src/org/raml/amf/parsers/OpenAPIParser.java b/java/src/org/raml/amf/parsers/OpenAPIParser.java new file mode 100644 index 0000000..9cab6fe --- /dev/null +++ b/java/src/org/raml/amf/parsers/OpenAPIParser.java @@ -0,0 +1,15 @@ +package org.raml.amf.parsers; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Wrapper class for the AMF OpenAPI parser, processes OpenAPI specification documents and generate the DocumentModel out of them + */ +public class OpenAPIParser extends BaseParser { + @Override + protected String parserConstructor() { + return "->OpenAPIParser"; + } +} diff --git a/java/src/org/raml/amf/parsers/ParsingException.java b/java/src/org/raml/amf/parsers/ParsingException.java new file mode 100644 index 0000000..7720854 --- /dev/null +++ b/java/src/org/raml/amf/parsers/ParsingException.java @@ -0,0 +1,18 @@ +package org.raml.amf.parsers; + +import java.io.IOException; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Exception produced while parsing an input syntax for the AMF parser + */ +public class ParsingException extends IOException { + + public ParsingException(Exception ex) { + super(ex); + } + +} diff --git a/java/src/org/raml/amf/parsers/ParsingOptions.java b/java/src/org/raml/amf/parsers/ParsingOptions.java new file mode 100644 index 0000000..6f7c56e --- /dev/null +++ b/java/src/org/raml/amf/parsers/ParsingOptions.java @@ -0,0 +1,38 @@ +package org.raml.amf.parsers; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +import clojure.lang.IPersistentMap; +import clojure.lang.PersistentHashMap; + +import java.util.HashMap; + +/** + * Parsing options for parsing + */ +public class ParsingOptions { + private IPersistentMap cacheDirs; + + /** + * Sets a mapping from URL prefixes for references to local directories to resolve references in the syntax + * @param uriToDirs + */ + public ParsingOptions setCacheDirs(HashMap uriToDirs) { + this.cacheDirs = PersistentHashMap.EMPTY; + for (String key : uriToDirs.keySet()) { + this.cacheDirs = this.cacheDirs.assoc(key, uriToDirs.get(key)); + } + return this; + } + + public IPersistentMap build() { + IPersistentMap options = PersistentHashMap.EMPTY; + if (this.cacheDirs != null) { + options = options.assoc("cacheDirs", this.cacheDirs); + } + + return options; + } +} diff --git a/java/src/org/raml/amf/parsers/RAMLParser.java b/java/src/org/raml/amf/parsers/RAMLParser.java new file mode 100644 index 0000000..473d9cb --- /dev/null +++ b/java/src/org/raml/amf/parsers/RAMLParser.java @@ -0,0 +1,16 @@ +package org.raml.amf.parsers; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Wrapper class for the AMF RAML parser, processes RAML specification documents and generate the DocumentModel out of them + */ +public class RAMLParser extends BaseParser { + + @Override + protected String parserConstructor() { + return "->RAMLParser"; + } +} diff --git a/java/src/org/raml/amf/utils/Clojure.java b/java/src/org/raml/amf/utils/Clojure.java new file mode 100644 index 0000000..c50b7ca --- /dev/null +++ b/java/src/org/raml/amf/utils/Clojure.java @@ -0,0 +1,83 @@ +package org.raml.amf.utils; + +import clojure.lang.*; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by antoniogarrote on 04/05/2017. + */ + +/** + * Clojure interop utilties. + * Many of this utilities and this particular approach to interop is because of a bug related to core.async preventing + * us to use aot compilation and the class that could have been generated in api-modeling-framework.core + */ +public class Clojure { + + public static final String CLOJURE_CORE = "clojure.core"; + public static final String API_MODELING_FRAMEWORK_CORE = "api-modeling-framework.core"; + public static final String API_MODELING_FRAMEWORK_MODEL_DOCUMENT = "api-modeling-framework.model.document"; + public static final String API_MODELING_FRAMEWORK_MODEL_DOMAIN = "api-modeling-framework.model.domain"; + public static final String CHESHIRE_CORE = "cheshire.core"; + public static final Var REQUIRE= RT.var("clojure.core", "require"); + + + public static Object require(String nsName) { + return REQUIRE.invoke(Symbol.intern(nsName)); + } + + /** + * Looks up a var by name in the given namespace. + * + * The var can subsequently be invoked if it is a function. + * @param nsName + * @param varName + * @return + */ + public static Var var(String nsName, String varName) { + return RT.var(nsName,varName); + } + + public static Keyword kw(String name) { + return Keyword.find(name); + } + + public static Object getKw(Object target, String name) { + IFn getFn= var(CLOJURE_CORE, "get"); + return getFn.invoke(target, kw(name)); + } + + public static Object setKw(Object target, String name, Object value) { + IFn setFn= var(CLOJURE_CORE, "assoc"); + return setFn.invoke(target, kw(name), value); + } + + public static IPersistentVector list(List list) { + IPersistentVector tmp = PersistentVector.EMPTY; + for(Object e : list) { + tmp = tmp.cons(e); + } + + return tmp; + } + + public static List toJavaList(List xs) { + ArrayList tmp = new ArrayList<>(); + IFn firstFn= var(CLOJURE_CORE, "first"); + IFn restFn= var(CLOJURE_CORE, "rest"); + IFn emptyFn= var(CLOJURE_CORE, "empty?"); + + while(! (Boolean) emptyFn.invoke(xs)) { + tmp.add((T) firstFn.invoke(xs)); + xs = (List) restFn.invoke(xs); + } + + return tmp; + } + + public static IPersistentMap map() { + return PersistentHashMap.EMPTY; + } +} diff --git a/project.clj b/project.clj index ca3df49..f64bf9c 100644 --- a/project.clj +++ b/project.clj @@ -19,6 +19,8 @@ ;; dev only [difform "1.1.2"]] + :aot [api-modeling-framework.model.domain] + :plugins [[lein-cljsbuild "1.1.5"] [lein-npm "0.6.2"] [lein-doo "0.1.7"]] @@ -27,7 +29,10 @@ [json-to-ast "2.0.0-alpha1.2"]]} :profiles {:build {:source-paths ["build"] - :main api-modeling-framework.build}} + :main api-modeling-framework.build} + :precomp {:aot [api-modeling-framework.model.domain] } + :java-compile {:source-paths [] + :java-source-paths ["java/src"]}} :aliases {"node" ["with-profile" "build" "run" "node"] "web" ["with-profile" "build" "run" "web"] diff --git a/src/api_modeling_framework/core.cljc b/src/api_modeling_framework/core.cljc index b772f65..598980d 100644 --- a/src/api_modeling_framework/core.cljc +++ b/src/api_modeling_framework/core.cljc @@ -1,6 +1,6 @@ (ns api-modeling-framework.core #?(:cljs (:require-macros [cljs.core.async.macros :refer [go]])) - #?(:clj (:require [clojure.core.async :refer [! go chan] :as async] + #?(:clj (:require [clojure.core.async :refer [! sync [f] + #?(:cljs (throw (js/Error "Synchronous version not supported")) + :clj (! c e) + (>! c res))))) + c)))) (defrecord ^:export RAMLParser [] Parser + (parse-file-sync [this uri] + (cb->sync (partial parse-file this uri))) + (parse-file-sync [this uri options] + (cb->sync (partial parse-file this uri options))) (parse-file [this uri cb] (parse-file this uri {} cb)) (parse-file [this uri options cb] (go (let [res (sync (partial parse-string this uri string))) + (parse-string-sync [this uri string options] + (cb->sync (partial parse-string this uri string options))) (parse-string [this uri string cb] (parse-string this uri string {} cb)) (parse-string [this uri string options cb] (go (let [res (sync (partial parse-file this uri))) + (parse-file-sync [this uri options] + (cb->sync (partial parse-file this uri options))) (parse-file [this uri cb] (parse-file this uri {} cb)) (parse-file [this uri options cb] (go (let [res (sync (partial parse-string this uri string))) + (parse-string-sync [this uri string options] + (cb->sync (partial parse-string this uri string options))) (parse-string [this uri string cb] (parse-string this uri string {} cb)) (parse-string [this uri string options cb] (go (let [res (sync (partial parse-file this uri))) + (parse-file-sync [this uri options] + (cb->sync (partial parse-file this uri options))) (parse-file [this uri cb] (parse-file this uri {} cb)) (parse-file [this uri options cb] (debug "Parsing APIModel file") @@ -138,6 +177,10 @@ (try (cb nil (to-model (jsonld-document-parser/from-jsonld res))) (catch #?(:clj Exception :cljs js/Error) ex (cb (platform/<-clj ex) nil))))))) + (parse-string-sync [this uri string] + (cb->sync (partial parse-string this uri string))) + (parse-string-sync [this uri string options] + (cb->sync (partial parse-string this uri string options))) (parse-string [this uri string cb] (parse-string this uri string {} cb)) (parse-string [this uri string options cb] (debug "Parsing APIModel string") @@ -150,6 +193,8 @@ (defrecord ^:export APIModelGenerator [] Generator + (generate-string-sync [this uri model options] (cb->sync (partial generate-string this uri model options))) + (generate-file-sync [this uri model options] (cb->sync (partial generate-file this uri model options))) (generate-string [this uri model options cb] (debug "Generating APIModel string") (go (try (let [options (keywordize-keys options) @@ -178,6 +223,8 @@ (defrecord ^:export RAMLGenerator [] Generator + (generate-string-sync [this uri model options] (cb->sync (partial generate-string this uri model options))) + (generate-file-sync [this uri model options] (cb->sync (partial generate-file this uri model options))) (generate-string [this uri model options cb] (debug "Generating RAML string") (go (try (let [options (keywordize-keys (merge (or (platform/->clj options) {}) @@ -207,6 +254,8 @@ (defrecord ^:export OpenAPIGenerator [] Generator + (generate-string-sync [this uri model options] (cb->sync (partial generate-string this uri model options))) + (generate-file-sync [this uri model options] (cb->sync (partial generate-file this uri model options))) (generate-string [this uri model options cb] (debug "Generating OpenAPI string") (go (try (let [options (keywordize-keys (merge (or (platform/->clj options) {}) @@ -278,6 +327,13 @@ (let [domain-cache (atom nil) lexical-cache-raml (atom {})] (reify Model + (unit-kind [_] + (cond + (and (satisfies? document/Module res) + (satisfies? document/Fragment res)) "document" + (satisfies? document/Module res) "module" + (satisfies? document/Fragment res) "fragment" + :else "unit")) (location [_] (document/location res)) (document-model [_] res) diff --git a/src/api_modeling_framework/model/domain.cljc b/src/api_modeling_framework/model/domain.cljc index f2c8987..0b672d6 100644 --- a/src/api_modeling_framework/model/domain.cljc +++ b/src/api_modeling_framework/model/domain.cljc @@ -32,8 +32,8 @@ CommonAPIProperties (host [this] host) (scheme [this] scheme) - (accepts [this] accepts) - (content-type [this] content-type) + (accepts [this] (or accepts [])) + (content-type [this] (or content-type [])) HeadersHolder (headers [this] (or headers [])) ParametersHolder