Package org.spdx.v3jsonldstore
Class JsonLDStore
java.lang.Object
org.spdx.storage.simple.ExtendedSpdxStore
org.spdx.v3jsonldstore.JsonLDStore
- All Implemented Interfaces:
AutoCloseable,org.spdx.storage.IModelStore,org.spdx.storage.ISerializableModelStore
public class JsonLDStore
extends org.spdx.storage.simple.ExtendedSpdxStore
implements org.spdx.storage.ISerializableModelStore
- Author:
- Gary O'Neall Serializable store which reads and writes the SPDX Spec version 3 JSON LD format
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spdx.storage.IModelStore
org.spdx.storage.IModelStore.IdType, org.spdx.storage.IModelStore.IModelStoreLock, org.spdx.storage.IModelStore.ModelUpdate -
Constructor Summary
ConstructorsConstructorDescriptionJsonLDStore(org.spdx.storage.IModelStore baseStore) JsonLDStore(org.spdx.storage.IModelStore baseStore, boolean pretty) -
Method Summary
Modifier and TypeMethodDescriptionorg.spdx.library.model.v3_0_1.core.SpdxDocumentdeSerialize(InputStream stream, boolean overwrite) booleanvoidserialize(OutputStream stream) voidserialize(OutputStream stream, org.spdx.core.CoreModelObject objectToSerialize) voidsetPretty(boolean pretty) voidsetUseExternalListedElements(boolean useExternalListedElements) Methods inherited from class org.spdx.storage.simple.ExtendedSpdxStore
addValueToCollection, clear, clearValueCollection, close, collectionContains, collectionSize, create, delete, enterCriticalSection, exists, getAllItems, getCaseSensisitiveId, getIdType, getNextId, getPropertyValueDescriptors, getTypedValue, getValue, isAnon, isCollectionMembersAssignableTo, isCollectionProperty, isPropertyValueAssignableTo, leaveCriticalSection, listValues, removeProperty, removeValueFromCollection, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface org.spdx.storage.IModelStore
addValueToCollection, clearValueCollection, collectionContains, collectionSize, create, delete, enterCriticalSection, exists, getAllItems, getCaseSensisitiveId, getIdType, getNextId, getPropertyValueDescriptors, getTypedValue, getValue, isAnon, isCollectionMembersAssignableTo, isCollectionProperty, isPropertyValueAssignableTo, leaveCriticalSection, listValues, removeProperty, removeValueFromCollection, setValue
-
Constructor Details
-
JsonLDStore
public JsonLDStore(org.spdx.storage.IModelStore baseStore, boolean pretty) - Parameters:
baseStore- underlying store to usepretty- if true, use less compact prettier JSON LD format on output
-
JsonLDStore
public JsonLDStore(org.spdx.storage.IModelStore baseStore) - Parameters:
baseStore- underlying store to use
-
-
Method Details
-
getPretty
public boolean getPretty()- Returns:
- if true, use less compact prettier JSON LD format on output
-
setPretty
public void setPretty(boolean pretty) - Parameters:
pretty- if true, use less compact prettier JSON LD format on output
-
serialize
public void serialize(OutputStream stream) throws org.spdx.core.InvalidSPDXAnalysisException, IOException - Specified by:
serializein interfaceorg.spdx.storage.ISerializableModelStore- Throws:
org.spdx.core.InvalidSPDXAnalysisExceptionIOException
-
serialize
public void serialize(OutputStream stream, @Nullable org.spdx.core.CoreModelObject objectToSerialize) throws org.spdx.core.InvalidSPDXAnalysisException, IOException - Specified by:
serializein interfaceorg.spdx.storage.ISerializableModelStore- Throws:
org.spdx.core.InvalidSPDXAnalysisExceptionIOException
-
deSerialize
public org.spdx.library.model.v3_0_1.core.SpdxDocument deSerialize(InputStream stream, boolean overwrite) throws org.spdx.core.InvalidSPDXAnalysisException, IOException - Specified by:
deSerializein interfaceorg.spdx.storage.ISerializableModelStore- Throws:
org.spdx.core.InvalidSPDXAnalysisExceptionIOException
-
setUseExternalListedElements
public void setUseExternalListedElements(boolean useExternalListedElements) - Parameters:
useExternalListedElements- if true, don't serialize any listed licenses or exceptions - treat them as external
-