|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.graph.connector.federation.Projection.Rule
org.modeshape.graph.connector.federation.Projection.PathRule
@Immutable public static class Projection.PathRule
A rule that is defined with a single path in source
and a single path in repository
, and which has a set of path exceptions
(relative paths below the path
in source).
Constructor Summary | |
---|---|
Projection.PathRule(Path repositoryPath,
Path sourcePath)
|
|
Projection.PathRule(Path repositoryPath,
Path sourcePath,
List<Path> exceptions)
|
|
Projection.PathRule(Path repositoryPath,
Path sourcePath,
Path... exceptions)
|
Method Summary | |
---|---|
int |
compareTo(Projection.Rule other)
|
boolean |
equals(Object obj)
|
List<Path> |
getExceptionsToRule()
Get the paths that define the exceptions to this rule. |
Path |
getPathInRepository()
The path where the content is to be placed ("projected") into the repository. |
Path |
getPathInRepository(Path pathInSource,
PathFactory factory)
Get the path in repository that is projected from the supplied source path, or null if the supplied source path is not projected into the repository. |
Path |
getPathInSource()
The path of the content as known to the source |
Path |
getPathInSource(Path pathInRepository,
PathFactory factory)
Get the path in source that is projected from the supplied repository path, or null if the supplied repository path is not projected into the source. |
String |
getString()
|
String |
getString(NamespaceRegistry registry,
TextEncoder encoder)
|
String |
getString(TextEncoder encoder)
|
List<Path> |
getTopLevelPathsInRepository(PathFactory factory)
Get the paths in the repository that serve as top-level nodes exposed by this rule. |
boolean |
hasExceptionsToRule()
Get whether this rule has any exceptions. |
int |
hashCode()
|
protected boolean |
includes(Path pathInSource)
|
boolean |
isTopLevelPath(Path path)
Determine if the supplied path is the same as one of the top-level nodes exposed by this rule. |
protected Path |
projectPathInRepositoryToPathInSource(Path pathInRepository,
PathFactory factory)
Convert a path defined in the repository system into an equivalent path in the source system. |
protected Path |
projectPathInSourceToPathInRepository(Path pathInSource,
PathFactory factory)
Convert a path defined in the source system into an equivalent path in the repository system. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Projection.PathRule(Path repositoryPath, Path sourcePath)
public Projection.PathRule(Path repositoryPath, Path sourcePath, Path... exceptions)
public Projection.PathRule(Path repositoryPath, Path sourcePath, List<Path> exceptions)
Method Detail |
---|
public Path getPathInRepository()
public Path getPathInSource()
public boolean hasExceptionsToRule()
public List<Path> getExceptionsToRule()
path in source
.
protected boolean includes(Path pathInSource)
pathInSource
-
public List<Path> getTopLevelPathsInRepository(PathFactory factory)
getTopLevelPathsInRepository
in class Projection.Rule
factory
- the path factory that can be used to create new paths; may not be null
Projection.Rule.getTopLevelPathsInRepository(org.modeshape.graph.property.PathFactory)
public boolean isTopLevelPath(Path path)
isTopLevelPath
in class Projection.Rule
path
- the path; may not be null
top-level paths
, or false otherwiseProjection.Rule.isTopLevelPath(org.modeshape.graph.property.Path)
public Path getPathInSource(Path pathInRepository, PathFactory factory)
This method considers a path that is at or below the rule's source path
to be included,
except if there are exceptions
that explicitly disallow the path.
getPathInSource
in class Projection.Rule
pathInRepository
- the path in the repository; may not be nullfactory
- the path factory; may not be null
Projection.Rule.getPathInSource(Path, PathFactory)
public Path getPathInRepository(Path pathInSource, PathFactory factory)
getPathInRepository
in class Projection.Rule
pathInSource
- the path in the source; may not be nullfactory
- the path factory; may not be null
Projection.Rule.getPathInRepository(org.modeshape.graph.property.Path, org.modeshape.graph.property.PathFactory)
protected Path projectPathInSourceToPathInRepository(Path pathInSource, PathFactory factory)
pathInSource
- the path in the source system, which may include the getPathInSource()
factory
- the path factory; may not be null
getPathInRepository()
), or null if the path is not at or under the getPathInSource()
protected Path projectPathInRepositoryToPathInSource(Path pathInRepository, PathFactory factory)
pathInRepository
- the path in the repository system, which may include the getPathInRepository()
factory
- the path factory; may not be null
getPathInSource()
), or null if the path is not at or under the getPathInRepository()
public String getString(NamespaceRegistry registry, TextEncoder encoder)
getString
in class Projection.Rule
public String getString(TextEncoder encoder)
getString
in class Projection.Rule
Projection.Rule.getString(org.modeshape.common.text.TextEncoder)
public String getString()
getString
in class Projection.Rule
Projection.Rule.getString()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int compareTo(Projection.Rule other)
Comparable.compareTo(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |