org.apache.clerezza.platform.content
Interface DiscobitsHandler

All Known Implementing Classes:
AbstractDiscobitsHandler, CollectionTypeHandler, DiscobitsTypeHandler

public interface DiscobitsHandler

Provides utility methods to create, retrieve and remove binary contents. Binary contents are modeled as InfoDiscoBit from the discobit ontology at http://discobits.org/ontology

Author:
rbn

Method Summary
 byte[] getData(org.apache.clerezza.rdf.core.UriRef uriRef)
           
 javax.ws.rs.core.MediaType getMediaType(org.apache.clerezza.rdf.core.UriRef uriRef)
           
 void put(org.apache.clerezza.rdf.core.UriRef infoDiscoBitUri, javax.ws.rs.core.MediaType mediaType, byte[] data)
          Creates an InfoDiscoBit
 void remove(org.apache.clerezza.rdf.core.NonLiteral node)
          Removes InfoDiscoBits (aka binary contents), other DiscoBits and the context of the specified node.
 

Method Detail

put

void put(org.apache.clerezza.rdf.core.UriRef infoDiscoBitUri,
         javax.ws.rs.core.MediaType mediaType,
         byte[] data)
Creates an InfoDiscoBit

Parameters:
infoDiscoBitUri -
mediaType -
data -

remove

void remove(org.apache.clerezza.rdf.core.NonLiteral node)
Removes InfoDiscoBits (aka binary contents), other DiscoBits and the context of the specified node. If it is in a hierarchy then it will be removed also form its container.

Parameters:
node -

getMediaType

javax.ws.rs.core.MediaType getMediaType(org.apache.clerezza.rdf.core.UriRef uriRef)
Parameters:
uriRef -
Returns:
the media type of the InfoDiscoBit with the specified URI or null if no MediaType for that URI is known

getData

byte[] getData(org.apache.clerezza.rdf.core.UriRef uriRef)
Parameters:
uriRef -
Returns:
a byte[] with the data of the InfoDiscoBit with the specified URI or null if no data for that URI is known


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.