public class XmlRamlTypeLoader extends Object implements TypeLoader
TypeLoader
that takes the internal TypeDeclaration
and transforms it into a MetadataType
through
TypeDeclaration.toXmlSchema()
in conjunction with XmlTypeLoader
.
Supported fragments so far: RamlFragment.DataType
and RamlFragment.Library
, any other will fail while loading t
he RAML fileConstructor and Description |
---|
XmlRamlTypeLoader(File ramlFile)
Constructs a RAML type loader
|
XmlRamlTypeLoader(String content,
String ramlLocation)
Constructs a RAML type loader
|
Modifier and Type | Method and Description |
---|---|
Optional<MetadataType> |
load(String typeIdentifier)
Returns the MetadataType of the specified identifier if found
|
Optional<MetadataType> |
load(String typeIdentifier,
String typeAlias)
Returns the MetadataType of the specified identifier if found, optionally assigning specified type alias
|
public XmlRamlTypeLoader(File ramlFile)
ramlFile
- file pointing to the RAML resourcepublic Optional<MetadataType> load(String typeIdentifier)
TypeLoader
load
in interface TypeLoader
typeIdentifier
- The identifier namepublic Optional<MetadataType> load(String typeIdentifier, String typeAlias)
TypeLoader
load
in interface TypeLoader
typeIdentifier
- The identifier nametypeAlias
- The nullable type aliasCopyright © 2018. All rights reserved.