public class CoAPLDPServer extends CoapServer
| Constructor and Description |
|---|
CoAPLDPServer(java.lang.String BASE_URI)
Creates a new LDP-CoAP server.
|
CoAPLDPServer(java.lang.String BASE_URI,
NetworkConfig config,
int port)
Creates a new LDP-CoAP server.
|
| Modifier and Type | Method and Description |
|---|---|
CoapServer |
add(Resource... resources)
Deprecated.
|
void |
addHandledNamespace(java.lang.String prefix,
java.lang.String namespace)
Adds a well-known namespace
|
CoAPLDPBasicContainer |
createBasicContainer(java.lang.String container)
Creates a new LDP Basic Container as contained object.
|
CoAPLDPDirectContainer |
createDirectContainer(java.lang.String container,
java.lang.String member,
java.lang.String memberType,
java.lang.String memberRelation,
java.lang.String isMemberOfRelation)
Creates a new LDP Direct Container as contained object.
|
CoAPLDPIndirectContainer |
createIndirectContainer(java.lang.String container,
java.lang.String member,
java.lang.String memberType,
java.lang.String memberRelation,
java.lang.String insertedContentRelation)
Creates a new LDP Indirect Container as contained object.
|
CoAPLDPNonRDFSource |
createNonRDFSource(java.lang.String name,
int mediaType)
Creates a new LDP Non-RDF Source as contained object.
|
CoAPLDPRDFSource |
createRDFSource(java.lang.String name)
Creates a new LDP RDF Source.
|
CoAPLDPRDFSource |
createRDFSource(java.lang.String name,
java.lang.String type)
Creates a new LDP RDF Source.
|
CoAPLDPResourceManager |
getCoAPLDPResourceManager()
Returns the resource manager.
|
void |
setConstrainedByURI(java.lang.String uri)
Sets the LDP constrainedBy URI
|
void |
setNotPersistedProperty(java.lang.String uri)
Adds a not-persisted property constraint
|
void |
setReadOnlyProperty(java.lang.String uri)
Adds a read-only property constraint
|
void |
shutdown()
Stops the LDP-CoAP server.
|
addEndpoint, destroy, getEndpoint, getEndpoint, getEndpoints, getMessageDeliverer, getRoot, remove, setExecutor, setMessageDeliverer, start, stoppublic CoAPLDPServer(java.lang.String BASE_URI)
BASE_URI - the base URI for the RDF repositorypublic CoAPLDPServer(java.lang.String BASE_URI,
NetworkConfig config,
int port)
BASE_URI - the repository base URIconfig - a custom CoAP network configurationport - the reference port for the server (default 5683)@Deprecated public CoapServer add(Resource... resources)
CoapServeradd in interface ServerInterfaceadd in class CoapServerresources - the resource(s)public void shutdown()
public void addHandledNamespace(java.lang.String prefix,
java.lang.String namespace)
prefix - the namespace prefixnamespace - the namespace URIpublic void setReadOnlyProperty(java.lang.String uri)
uri - the URI of the read-only propertypublic void setConstrainedByURI(java.lang.String uri)
uri - the URI of the LDP constrainedBy propertypublic void setNotPersistedProperty(java.lang.String uri)
uri - the URI of the not-persisted propertypublic CoAPLDPRDFSource createRDFSource(java.lang.String name)
name - the name of the contained resourcepublic CoAPLDPRDFSource createRDFSource(java.lang.String name, java.lang.String type)
name - the name of the contained resourcetype - the type of the contained resourcepublic CoAPLDPNonRDFSource createNonRDFSource(java.lang.String name, int mediaType)
name - the name of the contained resourcemediaType - the content-type value of the contained resource as defined in MediaTypeRegistryMediaTypeRegistrypublic CoAPLDPBasicContainer createBasicContainer(java.lang.String container)
container - the name of the contained resourcepublic CoAPLDPDirectContainer createDirectContainer(java.lang.String container, java.lang.String member, java.lang.String memberType, java.lang.String memberRelation, java.lang.String isMemberOfRelation)
container - the name of the contained resourcemember - the name of the member resource of the created Direct ContainermemberType - the type of the member resource of the created Direct ContainermemberRelation - the memberRelation property of the created Direct Container (if present)isMemberOfRelation - the isMemberOfRelation property of the created Direct Container (if present)public CoAPLDPIndirectContainer createIndirectContainer(java.lang.String container, java.lang.String member, java.lang.String memberType, java.lang.String memberRelation, java.lang.String insertedContentRelation)
container - the name of the contained resourcemember - the name of the member resource of the created Indirect ContainermemberType - the type of the member resource of the created Indirect ContainermemberRelation - the memberRelation property of the created Indirect ContainerinsertedContentRelation - the insertedContentRelation property of the created Indirect Containerpublic CoAPLDPResourceManager getCoAPLDPResourceManager()