Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos method and parameter #8

Merged
merged 8 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions src/main/java/org/spdx/storage/IModelStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*
*/
public interface IModelStore extends AutoCloseable {

interface IModelStoreLock {
void unlock();
}
Expand All @@ -52,7 +52,7 @@ interface IModelStoreLock {
interface ModelUpdate {
void apply() throws InvalidSPDXAnalysisException;
}

/**
* Different types of ID's
*/
Expand All @@ -62,7 +62,8 @@ enum IdType {
SpdxId, // ID's that start with SpdxRef-
ListedLicense, // ID's associated with listed licenses
Anonymous, // ID's for object only referenced internally
Unkown} // ID's that just don't fit any pattern
Unkown // ID's that just don't fit any pattern (supposed to be "Unknown")
}

/**
* @param objectUri unique URI within the SPDX model store for the objects
Expand Down Expand Up @@ -223,17 +224,30 @@ boolean isPropertyValueAssignableTo(String objectUri, PropertyDescriptor propert
/**
* In SPDX 2.2 license refs are allowed to be matched case-insensitive. This function will return
* the case-sensitive ID (e.g. if you have LicenseRef-ABC, calling this function with licenseref-abc will return LicenseRef-ABC
* @param nameSpace the nameSpace used for the ID - the URI is formed by the nameSpace + "#" + caseInsensitiveId
* @param caseInsensitiveId ID - case will be ignored
* @return the case-sensitive ID if it exists
*/
Optional<String> getCaseSensitiveId(String nameSpace, String caseInsensitiveId);

/**
* Alias for getCaseSensitiveId
* @param nameSpace the nameSpace used for the ID - the URI is formed by the nameSpace + "#" + caseInsensisitiveId
* @param caseInsensisitiveId ID - case will be ignored
* @return the case-sensitive ID if it exists
* @deprecated As of release 1.0, replaced by {@link #getCaseSensitiveId(String, String)}
*/
Optional<String> getCaseSensisitiveId(String nameSpace, String caseInsensisitiveId);
@Deprecated
default Optional<String> getCaseSensisitiveId(String nameSpace, String caseInsensisitiveId) {
return getCaseSensitiveId(nameSpace, caseInsensisitiveId);
}

/**
* @param objectUri unique URI within the SPDX model store for the objects
* @return type TypedValue containing the type of the ModelObject related to the ID
*/
Optional<TypedValue> getTypedValue(String objectUri) throws InvalidSPDXAnalysisException;

/**
* Deletes an item from the document
* @param objectUri unique URI within the SPDX model store for the objects
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/spdx/storage/NullModelStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ public IdType getIdType(String objectUri) {
}

@Override
public Optional<String> getCaseSensisitiveId(String nameSpace,
String caseInsensisitiveId) {
public Optional<String> getCaseSensitiveId(String nameSpace,
String caseInsensitiveId) {
return Optional.empty();
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/spdx/storage/MockModelStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ public IdType getIdType(String objectUri) {
}

@Override
public Optional<String> getCaseSensisitiveId(String nameSpace,
String caseInsensisitiveId) {
public Optional<String> getCaseSensitiveId(String nameSpace,
String caseInsensitiveId) {
return Optional.empty();
}

Expand Down
Loading