public abstract class AbstractJsonResource extends AbstractFileResource<JsonResource> implements JsonResource
JsonResource
implementationsConstructor 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, toString
equals, getContents, getContents, getResourceFactory, hashCode, listResources, listResources, reify, resolveChildren, setParent, supports
getFacet, getFacetAsOptional, getFacets, getFacets, hasAllFacets, hasAllFacets, hasFacet, install, register, uninstall, unregister
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createNewFile, createTempResource, deleteOnExit, getLastModified, getParent, getSize, isDirectory, isExecutable, isReadable, isStale, isWritable, mkdir, mkdirs, monitor, monitor, moveTo, refresh, renameTo, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setWritable, setWritable
getResourceOutputStream, getResourceOutputStream, setContents, setContents, setContents, setContents
createFrom, delete, delete, exists, getChild, getContents, getContents, getFullyQualifiedName, getName, getResourceFactory, getResourceInputStream, getUnderlyingResourceObject, listResources, listResources, reify, resolveChildren
getFacet, getFacetAsOptional, getFacets, getFacets, hasAllFacets, hasAllFacets, hasFacet, supports
public AbstractJsonResource(ResourceFactory factory, File file)
public javax.json.JsonStructure getJsonStructure()
JsonResource
getJsonStructure
in interface JsonResource
public javax.json.JsonArray getJsonArray()
JsonResource
JsonArray
representing the underlying Json datagetJsonArray
in interface JsonResource
public javax.json.JsonObject getJsonObject()
JsonResource
JsonObject
representing the underlying Json datagetJsonObject
in interface JsonResource
public JsonResource setContents(InputStream data)
WriteableResource
WriteableResource
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)
JsonResource
JsonStructure
(could be an array or object)setContents
in interface JsonResource
public javax.json.JsonObjectBuilder getJsonObjectBuilder()
JsonResource
JsonObjectBuilder
pre-populated with the underlying Json datagetJsonObjectBuilder
in interface JsonResource
public javax.json.JsonArrayBuilder getJsonArrayBuilder()
JsonResource
JsonArrayBuilder
pre-populated with the underlying Json datagetJsonArrayBuilder
in interface JsonResource
protected List<Resource<?>> doListResources()
AbstractResource
doListResources
in class AbstractResource<File>
Copyright © 2016 JBoss by Red Hat. All rights reserved.