public abstract class AbstractJsonResource extends AbstractFileResource<JsonResource> implements JsonResource
JsonResource implementations| Constructor and Description |
|---|
AbstractJsonResource(ResourceFactory factory,
File file) |
| Modifier and Type | Method and Description |
|---|---|
protected List<Resource<?>> |
doListResources()
Strategy method for returning child resources.
|
javax.json.JsonArray |
getJsonArray()
Return the
JsonArray representing the underlying Json data |
javax.json.JsonArrayBuilder |
getJsonArrayBuilder()
Return a
JsonArrayBuilder pre-populated with the underlying Json data |
javax.json.JsonObject |
getJsonObject()
Return the
JsonObject representing the underlying Json data |
javax.json.JsonObjectBuilder |
getJsonObjectBuilder()
Return a
JsonObjectBuilder pre-populated with the underlying Json data |
javax.json.JsonStructure |
getJsonStructure()
Returns a JSON array or object that is represented in the input source
Use this method if you are unsure of the json data format
|
JsonResource |
setContents(InputStream data)
Set the contents of this
WriteableResource to the contents of the given InputStream. |
JsonResource |
setContents(javax.json.JsonStructure structure)
Sets the content to this
JsonStructure (could be an array or object) |
createFrom, createNewFile, createTempResource, delete, delete, deleteOnExit, exists, getChild, getFileOperations, getFullyQualifiedName, getLastModified, getName, getParent, getResourceInputStream, getResourceOutputStream, getResourceOutputStream, getSize, getUnderlyingResourceObject, isDirectory, isExecutable, isReadable, isStale, isWritable, mkdir, mkdirs, monitor, monitor, moveTo, refresh, renameTo, renameTo, setContents, setContents, setContents, setContents, setExecutable, setLastModified, setReadable, setWritable, toStringequals, getContents, getContents, getResourceFactory, hashCode, listResources, listResources, reify, resolveChildren, setParent, supportsgetFacet, getFacetAsOptional, getFacets, getFacets, hasAllFacets, hasAllFacets, hasFacet, install, register, uninstall, unregisterclone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateNewFile, createTempResource, deleteOnExit, getLastModified, getParent, getSize, isDirectory, isExecutable, isReadable, isStale, isWritable, mkdir, mkdirs, monitor, monitor, moveTo, refresh, renameTo, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setWritable, setWritablegetResourceOutputStream, getResourceOutputStream, setContents, setContents, setContents, setContentscreateFrom, delete, delete, exists, getChild, getContents, getContents, getFullyQualifiedName, getName, getResourceFactory, getResourceInputStream, getUnderlyingResourceObject, listResources, listResources, reify, resolveChildrengetFacet, getFacetAsOptional, getFacets, getFacets, hasAllFacets, hasAllFacets, hasFacet, supportspublic AbstractJsonResource(ResourceFactory factory, File file)
public javax.json.JsonStructure getJsonStructure()
JsonResourcegetJsonStructure in interface JsonResourcepublic javax.json.JsonArray getJsonArray()
JsonResourceJsonArray representing the underlying Json datagetJsonArray in interface JsonResourcepublic javax.json.JsonObject getJsonObject()
JsonResourceJsonObject representing the underlying Json datagetJsonObject in interface JsonResourcepublic JsonResource setContents(InputStream data)
WriteableResourceWriteableResource to the contents of the given InputStream.setContents in interface WriteableResource<FileResource<JsonResource>,File>setContents in class AbstractFileResource<JsonResource>public JsonResource setContents(javax.json.JsonStructure structure)
JsonResourceJsonStructure (could be an array or object)setContents in interface JsonResourcepublic javax.json.JsonObjectBuilder getJsonObjectBuilder()
JsonResourceJsonObjectBuilder pre-populated with the underlying Json datagetJsonObjectBuilder in interface JsonResourcepublic javax.json.JsonArrayBuilder getJsonArrayBuilder()
JsonResourceJsonArrayBuilder pre-populated with the underlying Json datagetJsonArrayBuilder in interface JsonResourceprotected List<Resource<?>> doListResources()
AbstractResourcedoListResources in class AbstractResource<File>Copyright © 2016 JBoss by Red Hat. All rights reserved.