public class Metadata extends SaxRepresentation
XML_SECURE_PROCESSING
XML_EXPANDING_ENTITY_REFS, XML_VALIDATING_DTD
UNKNOWN_SIZE
Constructor and Description |
---|
Metadata(Representation metadata,
Reference metadataRef)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
AssociationEnd |
getAssociation(EntityType type,
String propertyName)
Returns the Association object that corresponds to the given property of
the given entity type.
|
ComplexType |
getComplexType(Class<?> entityClass)
Returns the complectType that corresponds to a given entity class.
|
List<EntityContainer> |
getContainers()
Returns the list of entity containers.
|
String |
getEntitySetSubpath(EntityType entityType)
Returns the subpath of the entitySet of the given entity type.
|
EntityType |
getEntityType(Class<?> entityClass)
Returns the entityType that corresponds to a given entity class.
|
String |
getKeyValue(EntityType type,
Object entity)
Returns the String representation of the value of the key of the given
entity that should be used in all URIs.
|
String |
getKeyValue(Object entity)
Returns the value of the key of the given entity that should be used in
all URIs.
|
List<Mapping> |
getMappings()
Returns the list of declared property mappings.
|
Reference |
getMetadataRef()
Returns the URI of the metadata resource.
|
Property |
getProperty(Object entity,
String propertyName)
Returns the EDM type of the given property of the given entity.
|
List<Schema> |
getSchemas()
Returns the data service schema.
|
String |
getSubpath(Object entity)
According to the metadata of the service, returns the path of the given
entity relatively to the current WCF service.
|
String |
getSubpath(Object entity,
String propertyName)
According to the metadata of the service, returns the path of the given
entity's property relatively to the current WCF service.
|
String |
getSubpath(Object source,
String sourceProperty,
Object target)
According to the metadata of the service, returns the relative path of
the given target entity linked to the source entity via the source
property.
|
void |
setContainers(List<EntityContainer> containers)
Sets the list of entity containers.
|
void |
setSchemas(List<Schema> schemas)
Sets the data service schemas
|
getInputSource, getSaxSource, isSecureProcessing, parse, release, setSaxSource, setSecureProcessing, write, write
getBoolean, getDocument, getDocumentBuilder, getDomSource, getEntityResolver, getErrorHandler, getNamespaces, getNamespaceURI, getNode, getNodes, getNumber, getPrefix, getPrefixes, getSaxSource, getSchema, getStreamSource, getText, isCoalescing, isExpandingEntityRefs, isIgnoringComments, isIgnoringExtraWhitespaces, isNamespaceAware, isValidatingDtd, isXIncludeAware, setCoalescing, setEntityResolver, setErrorHandler, setExpandingEntityRefs, setIgnoringComments, setIgnoringExtraWhitespaces, setNamespaceAware, setNamespaces, setSchema, setSchema, setValidatingDtd, setXIncludeAware, validate, validate, validate, validate
getReader
getChannel, getStream, write, write
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public Metadata(Representation metadata, Reference metadataRef) throws IOException
metadata
- The representation of the metadata.metadataRef
- Its optional URI.IOException
public AssociationEnd getAssociation(EntityType type, String propertyName)
type
- The entity type.propertyName
- The property name.public ComplexType getComplexType(Class<?> entityClass)
entityClass
- The entity class.public List<EntityContainer> getContainers()
public String getEntitySetSubpath(EntityType entityType)
entity
- The entity.public EntityType getEntityType(Class<?> entityClass)
entityClass
- The entity class.public String getKeyValue(EntityType type, Object entity)
type
- The type descriptor of the object.entity
- The entity.public String getKeyValue(Object entity)
entity
- The entity.public List<Mapping> getMappings()
public Reference getMetadataRef()
public Property getProperty(Object entity, String propertyName)
entity
- The entity.propertyName
- The name of the property.public List<Schema> getSchemas()
public String getSubpath(Object entity)
entity
- The entity.public String getSubpath(Object entity, String propertyName)
entity
- The entity.propertyName
- The name of the property.public String getSubpath(Object source, String sourceProperty, Object target)
source
- The source entity to update.sourceProperty
- The name of the property of the source entity.target
- The entity linked to the source entity.public void setContainers(List<EntityContainer> containers)
containers
- The list of entity containers.Copyright © 2005–2017. All rights reserved.