org.codehaus.enunciate.contract.json
Class JsonSchemaInfo
java.lang.Object
org.codehaus.enunciate.contract.json.JsonSchemaInfo
public final class JsonSchemaInfo
- extends java.lang.Object
Information about JSON type structures present.
- Author:
- Steven Cummings
|
Constructor Summary |
JsonSchemaInfo(com.sun.mirror.declaration.PackageDeclaration schemaPackage)
Create a new JsonSchemaInfo. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonSchemaInfo
public JsonSchemaInfo(com.sun.mirror.declaration.PackageDeclaration schemaPackage)
- Create a new JsonSchemaInfo.
- Parameters:
schemaPackage - Declaration to create a JSON schema from.
schemaIdForType
public static java.lang.String schemaIdForType(com.sun.mirror.declaration.ClassDeclaration delegate)
- Get the schema ID associated with the given class.
- Parameters:
delegate - Class to get the associated schema ID for. Must not be null.
- Returns:
- Non-null Schema ID associated with the given class.
- Throws:
java.lang.AssertionError - if the parameter conditions are not met and assertions are enabled.
schemaIdForPackage
public static java.lang.String schemaIdForPackage(com.sun.mirror.declaration.PackageDeclaration schemaPackage)
- Parameters:
schemaPackage - Package to get the associated schema ID for. Must not be null.
- Returns:
- Non-null Schema ID associated with the given package.
- Throws:
java.lang.AssertionError - if the parameter conditions are not met and assertions are enabled.
getSchemaId
public java.lang.String getSchemaId()
- Returns:
- The schema id.
getDocumentation
public java.lang.String getDocumentation()
- Returns:
- Schema documentation.
getTopLevelTypesByName
public java.util.Map<java.lang.String,JsonRootElementDeclaration> getTopLevelTypesByName()
- Returns:
- Non-null Map of top-level JSON types by type name, keyed by type-name.
getTypesByName
public java.util.Map<java.lang.String,JsonTypeDefinition> getTypesByName()
- Returns:
- Non-null Map of available JSON types in this schema, keyed by type-name.
getTypes
public java.util.Collection<JsonTypeDefinition> getTypes()
- Returns:
- Non-null Collection of available JSON types in this schema.