public final class TypeUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TypeUtils.ValidationError |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkQueryName(String queryName)
Checks if a property query name is valid.
|
static TypeDefinition |
readFromJSON(InputStream stream)
Reads a type definition from a JSON stream.
|
static TypeDefinition |
readFromXML(InputStream stream)
Reads a type definition from a XML stream.
|
static List<TypeUtils.ValidationError> |
validatePropertyDefinition(PropertyDefinition<?> propDef)
Validates a property definition.
|
static List<TypeUtils.ValidationError> |
validateTypeDefinition(TypeDefinition type)
Validates a type definition.
|
static void |
writeToJSON(TypeDefinition type,
OutputStream stream)
Serializes the type definition to JSON, using the format defined in the
CMIS specification.
|
static void |
writeToXML(TypeDefinition type,
OutputStream stream)
Serializes the type definition to XML, using the format defined in the
CMIS specification.
|
public static void writeToXML(TypeDefinition type, OutputStream stream) throws XMLStreamException
XMLStreamException
public static void writeToJSON(TypeDefinition type, OutputStream stream) throws IOException
IOException
public static TypeDefinition readFromXML(InputStream stream) throws XMLStreamException
XMLStreamException
public static TypeDefinition readFromJSON(InputStream stream) throws IOException, org.apache.chemistry.opencmis.commons.impl.json.parser.JSONParseException
IOException
org.apache.chemistry.opencmis.commons.impl.json.parser.JSONParseException
public static boolean checkQueryName(String queryName)
queryName
- the query nametrue
if the query name is valid, false
otherwisepublic static List<TypeUtils.ValidationError> validateTypeDefinition(TypeDefinition type)
public static List<TypeUtils.ValidationError> validatePropertyDefinition(PropertyDefinition<?> propDef)
Copyright © 2009–2017 The Apache Software Foundation. All rights reserved.