public abstract class AbstractProfile extends Object implements Profile
Object.equals(Object)
and Object.hashCode()
methods
to fulfill the equality contract between instances of Profile
.
Profiles are considered to be equal if each profile has the same constraints. Performing a validation using equivalent profiles should emit identical constraint violations. The ordering of the constraints is unimportant.
The profile name and version is not considered important for the purposes of profile equality, and is ignored.
Modifier and Type | Field and Description |
---|---|
protected Set<Constraint> |
constraints |
protected String |
profileName |
protected String |
profileVersion |
Modifier | Constructor and Description |
---|---|
protected |
AbstractProfile(String profileName,
String profileVersion,
Set<Constraint> constraints,
NamespaceContext namespaceContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Tests two profiles for equivalence.
|
Set<Constraint> |
getConstraints()
A set of constraints that can be used to validate documents.
|
NamespaceContext |
getNamespaceContext() |
String |
getProfileName()
Returns the name of the profile, or
null if the profile doesn't have a name. |
String |
getProfileVersion()
Returns the version of the profile, or
null if the profile doesn't have a name. |
int |
hashCode() |
String |
toString() |
protected final String profileName
protected final String profileVersion
protected final Set<Constraint> constraints
protected AbstractProfile(String profileName, String profileVersion, Set<Constraint> constraints, NamespaceContext namespaceContext)
public String getProfileName()
Profile
null
if the profile doesn't have a name.getProfileName
in interface Profile
public String getProfileVersion()
Profile
null
if the profile doesn't have a name.getProfileVersion
in interface Profile
public Set<Constraint> getConstraints()
Profile
getConstraints
in interface Profile
public NamespaceContext getNamespaceContext()
getNamespaceContext
in interface Profile
public boolean equals(Object obj)
Copyright © 2025 CESSDA ERIC. All rights reserved.